From 7687d9cc595a2d5558846181c42ef986a8def170 Mon Sep 17 00:00:00 2001 From: mdarocha Date: Thu, 13 Oct 2022 19:20:04 +0200 Subject: [PATCH] dotnet-sdk: only set updateScript for sdk projects. As per suggestion in https://github.com/NixOS/nixpkgs/pull/191962#pullrequestreview-1136650360 --- pkgs/development/compilers/dotnet/build-dotnet.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 69f770900fdd..e25a8a1464fe 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -130,13 +130,7 @@ stdenv.mkDerivation (finalAttrs: rec { }; updateScript = - if type != "sdk" then - lib.warn "${pname}-${version}: only the SDK package can be updated - this script will do nothing!" - writeShellScript "dummy-update" '' - echo "Doing nothing..." - echo "Run the updateScript from the SDK package" - '' - else + if type == "sdk" then let majorVersion = with lib; @@ -145,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: rec { writeShellScript "update-dotnet-${majorVersion}" '' pushd pkgs/development/compilers/dotnet exec ${./update.sh} "${majorVersion}" - ''; + '' else null; # Convert a "stdenv.hostPlatform.system" to a dotnet RID systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");