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.

+15 -26
+15 -26
pkgs/build-support/dotnet/make-nuget-source/default.nix
··· 5 5 , deps ? [] 6 6 }: 7 7 8 - let 9 - nuget-source = stdenvNoCC.mkDerivation { 10 - inherit name; 8 + stdenvNoCC.mkDerivation { 9 + inherit name; 11 10 12 - nativeBuildInputs = [ python3 ]; 11 + nativeBuildInputs = [ python3 ]; 13 12 14 - buildCommand = '' 15 - mkdir -p $out/{lib,share} 13 + buildCommand = '' 14 + mkdir -p $out/{lib,share} 16 15 17 - # use -L to follow symbolic links. When `projectReferences` is used in 18 - # buildDotnetModule, one of the deps will be a symlink farm. 19 - find -L ${lib.concatStringsSep " " deps} -type f -name '*.nupkg' -exec \ 20 - ln -s '{}' -t $out/lib ';' 16 + # use -L to follow symbolic links. When `projectReferences` is used in 17 + # buildDotnetModule, one of the deps will be a symlink farm. 18 + find -L ${lib.concatStringsSep " " deps} -type f -name '*.nupkg' -exec \ 19 + ln -s '{}' -t $out/lib ';' 21 20 22 - # Generates a list of all licenses' spdx ids, if available. 23 - # Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt") 24 - python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses 25 - ''; 21 + # Generates a list of all licenses' spdx ids, if available. 22 + # Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt") 23 + python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses 24 + ''; 26 25 27 - meta.description = description; 28 - } // { # We need data from `$out` for `meta`, so we have to use overrides as to not hit infinite recursion. 29 - meta = nuget-source.meta // { 30 - licenses = let 31 - # TODO: avoid IFD 32 - depLicenses = lib.splitString "\n" (builtins.readFile "${nuget-source}/share/licenses"); 33 - in lib.flatten (lib.forEach depLicenses (spdx: 34 - lib.optionals (spdx != "") (lib.getLicenseFromSpdxId spdx) 35 - )); 36 - }; 37 - }; 38 - in nuget-source 26 + meta.description = description; 27 + }