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; }));