diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 75d1be9deede..b61adce0ad1d 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -23,6 +23,7 @@ assert if type == "sdk" then packages != null else true; , lttng-ust_2_12 , testers , runCommand +, writeShellScript }: let @@ -121,6 +122,24 @@ stdenv.mkDerivation (finalAttrs: rec { "aarch64-darwin" = "osx-arm64"; }; + 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 + let + majorVersion = + with lib; + concatStringsSep "." (take 2 (splitVersion version)); + in + writeShellScript "update-dotnet-${majorVersion}" '' + pushd pkgs/development/compilers/dotnet + exec ${./update.sh} "${majorVersion}" + ''; + # Convert a "stdenv.hostPlatform.system" to a dotnet RID systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");