Merge pull request #278242 from raphaelr/mknugetsource-remove-ifd

mkNugetSource: Remove meta.licenses attribute
This commit is contained in:
Weijia Wang 2024-01-18 09:22:38 +01:00 committed by GitHub
commit b0fb3f62d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,10 +3,10 @@
{ name
, description ? ""
, deps ? []
}:
, ...
}@args:
let
nuget-source = stdenvNoCC.mkDerivation {
stdenvNoCC.mkDerivation (lib.recursiveUpdate {
inherit name;
nativeBuildInputs = [ python3 ];
@ -25,14 +25,4 @@ let
'';
meta.description = description;
} // { # We need data from `$out` for `meta`, so we have to use overrides as to not hit infinite recursion.
meta = nuget-source.meta // {
licenses = let
# TODO: avoid IFD
depLicenses = lib.splitString "\n" (builtins.readFile "${nuget-source}/share/licenses");
in lib.flatten (lib.forEach depLicenses (spdx:
lib.optionals (spdx != "") (lib.getLicenseFromSpdxId spdx)
));
};
};
in nuget-source
} (removeAttrs args [ "name" "description" "deps" ]))