nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 28 lines 819 B view raw
1{ lib, python3, stdenvNoCC }: 2 3{ name 4, description ? "" 5, deps ? [] 6, ... 7}@args: 8 9stdenvNoCC.mkDerivation (lib.recursiveUpdate { 10 inherit name; 11 12 nativeBuildInputs = [ python3 ]; 13 14 buildCommand = '' 15 mkdir -p $out/{lib,share} 16 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 ';' 21 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 ''; 26 27 meta.description = description; 28} (removeAttrs args [ "name" "description" "deps" ]))