nixpkgs/pkgs/build-support/dotnet/make-nuget-deps/default.nix
mdarocha c277bd86a5 make-nuget-deps: support an url field in fetchNuGet
If a package source defines an url field, use it instead of the
url based on package name and version, which assumes nuget.org as
a package source.
2022-06-21 12:13:37 +02:00

10 lines
311 B
Nix

{ linkFarmFromDrvs, fetchurl }:
{ name, nugetDeps }:
linkFarmFromDrvs "${name}-nuget-deps" (nugetDeps {
fetchNuGet = { pname, version, sha256
, url ? "https://www.nuget.org/api/v2/package/${pname}/${version}" }:
fetchurl {
name = "${pname}-${version}.nupkg";
inherit url sha256;
};
})