mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
mkNugetSource: Remove meta.licenses attribute
- It's useless. The correct attribute name would be `license` and not `licenses`. Meaning setting this never did anything useful. - It used IFD in its implementation, meaning to know what the licenses of a nuget source are, you first had to build that nuget source. This defeats the point of having license checks in the first place. - IFD is not allowed by the nixpkgs CI and build farm anyway.
This commit is contained in:
parent
2c5a053a9b
commit
5fb3301dad
|
@ -5,8 +5,7 @@
|
||||||
, deps ? []
|
, deps ? []
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenvNoCC.mkDerivation {
|
||||||
nuget-source = stdenvNoCC.mkDerivation {
|
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 ];
|
nativeBuildInputs = [ python3 ];
|
||||||
|
@ -25,14 +24,4 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta.description = description;
|
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
|
|
||||||
|
|
Loading…
Reference in a new issue