summary refs log tree commit diff
path: root/pkgs/development/compilers/dotnet/build-dotnet.nix
diff options
context:
space:
mode:
authormdarocha <git@mdarocha.pl>2022-10-13 19:20:04 +0200
committermdarocha <git@mdarocha.pl>2022-10-13 19:20:04 +0200
commit7687d9cc595a2d5558846181c42ef986a8def170 (patch)
tree1de35504ca99c9a0fa454f5338bc68e19cfda1a2 /pkgs/development/compilers/dotnet/build-dotnet.nix
parentd0c935df26d69847ddca8f5feda9752a6ae29e52 (diff)
downloadnixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar.gz
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar.bz2
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar.lz
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar.xz
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.tar.zst
nixpkgs-7687d9cc595a2d5558846181c42ef986a8def170.zip
dotnet-sdk: only set updateScript for sdk projects.
As per suggestion in https://github.com/NixOS/nixpkgs/pull/191962#pullrequestreview-1136650360
Diffstat (limited to 'pkgs/development/compilers/dotnet/build-dotnet.nix')
-rw-r--r--pkgs/development/compilers/dotnet/build-dotnet.nix10
1 files changed, 2 insertions, 8 deletions
diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix
index 69f770900fd..e25a8a1464f 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}");