nixpkgs/pkgs/build-support/dotnet/nuget-to-nix/default.nix
mdarocha 2f07f578b2 nuget-to-nix: support custom package sources
If the package was not restored from nuget.org (determinted by checking
the "source" field of ".nupkg.metadata"), query the custom source for
the package endpoint (the way nuget api is built we can't determine it
without an API query) and build a custom package URL to save in the
generated deps file.
2022-06-21 12:13:34 +02:00

31 lines
496 B
Nix

{ lib
, runCommandLocal
, runtimeShell
, substituteAll
, nix
, coreutils
, findutils
, gnused
, jq
, curl
}:
runCommandLocal "nuget-to-nix" {
script = substituteAll {
src = ./nuget-to-nix.sh;
inherit runtimeShell;
binPath = lib.makeBinPath [
nix
coreutils
findutils
gnused
jq
curl
];
};
meta.description = "Convert a nuget packages directory to a lockfile for buildDotnetModule";
} ''
install -Dm755 $script $out/bin/nuget-to-nix
''