From 5a2c4a386e482fe0a217d4a29aec9fcc21b60cac Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 8 May 2026 15:12:55 -0300 Subject: [PATCH] dotnet: don't evaluate missing packages This allows the update scripts to work when the generated files have been removed. --- pkgs/development/compilers/dotnet/default.nix | 2 -- pkgs/development/compilers/dotnet/dotnet.nix | 9 +++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/dotnet/default.nix b/pkgs/development/compilers/dotnet/default.nix index b0629746d176..3eadb90bfa24 100644 --- a/pkgs/development/compilers/dotnet/default.nix +++ b/pkgs/development/compilers/dotnet/default.nix @@ -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 { diff --git a/pkgs/development/compilers/dotnet/dotnet.nix b/pkgs/development/compilers/dotnet/dotnet.nix index b484ef3e3ef4..fd9783f9d980 100644 --- a/pkgs/development/compilers/dotnet/dotnet.nix +++ b/pkgs/development/compilers/dotnet/dotnet.nix @@ -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; }));