2f07f578b2
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.
31 lines
496 B
Nix
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
|
|
''
|