dotnet: don't evaluate missing packages

This allows the update scripts to work when the generated files have
been removed.
This commit is contained in:
David McFarland
2026-05-08 15:12:55 -03:00
parent f72ac56df2
commit 5a2c4a386e
2 changed files with 7 additions and 4 deletions
@@ -84,12 +84,10 @@ makeScopeWithSplicing' {
let
dotnet_6 = callWithUtils ./dotnet.nix {
channel = "6.0";
withVMR = false;
};
dotnet_7 = callWithUtils ./dotnet.nix {
channel = "7.0";
withVMR = false;
};
dotnet_8 = callWithUtils ./dotnet.nix {
+7 -2
View File
@@ -5,12 +5,17 @@
channel,
dir ? ./. + ("/" + channel),
buildDotnetSdk,
withVMR ? true,
...
}@attrs:
let
binary = buildDotnetSdk (dir + "/releases.nix");
binary =
let
path = dir + "/releases.nix";
in
if lib.pathExists path then buildDotnetSdk path else { };
withVMR = lib.pathExists (dir + "/release.json");
sourcePackages = lib.optionalAttrs withVMR (callPackage ./source (attrs // { inherit binary; }));