diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index b4f8d593ee77..7b02b92b3c65 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -9,8 +9,10 @@ dotnetCorePackages, cacert, addNuGetDeps, + dotnet-sdk, }: let + default-sdk = dotnet-sdk; transformArgs = finalAttrs: { @@ -82,9 +84,9 @@ let # Whether to explicitly enable UseAppHost when building. This is redundant if useDotnetFromEnv is enabled useAppHost ? true, # The dotnet SDK to use. - dotnet-sdk ? dotnetCorePackages.sdk_6_0, + dotnet-sdk ? default-sdk, # The dotnet runtime to use. - dotnet-runtime ? dotnetCorePackages.runtime_6_0, + dotnet-runtime ? dotnet-sdk.runtime, ... }@args: let diff --git a/pkgs/development/compilers/dotnet/8/bootstrap-sdk.nix b/pkgs/development/compilers/dotnet/8/bootstrap-sdk.nix index 06153d33d4ce..7501f6bee8f5 100644 --- a/pkgs/development/compilers/dotnet/8/bootstrap-sdk.nix +++ b/pkgs/development/compilers/dotnet/8/bootstrap-sdk.nix @@ -284,6 +284,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_8_0; + aspnetcore = aspnetcore_8_0; }; sdk = sdk_8_0; diff --git a/pkgs/development/compilers/dotnet/9/bootstrap-sdk.nix b/pkgs/development/compilers/dotnet/9/bootstrap-sdk.nix index f01b54a350d3..9da60c17cac6 100644 --- a/pkgs/development/compilers/dotnet/9/bootstrap-sdk.nix +++ b/pkgs/development/compilers/dotnet/9/bootstrap-sdk.nix @@ -240,6 +240,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_9_0; + aspnetcore = aspnetcore_9_0; }; sdk = sdk_9_0; diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 68218f71bd42..8550d71d7cb0 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -5,6 +5,8 @@ commonPackages ? null, hostPackages ? null, targetPackages ? null, + runtime ? null, + aspnetcore ? null, }: assert builtins.elem type [ @@ -14,7 +16,11 @@ assert builtins.elem type [ ]; assert if type == "sdk" then - commonPackages != null && hostPackages != null && targetPackages != null + commonPackages != null + && hostPackages != null + && targetPackages != null + && runtime != null + && aspnetcore != null else true; @@ -190,7 +196,7 @@ mkWrapper type ( } // lib.optionalAttrs (type == "sdk") { packages = commonPackages ++ hostPackages.${hostRid} ++ targetPackages.${targetRid}; - inherit targetPackages; + inherit targetPackages runtime aspnetcore; updateScript = let diff --git a/pkgs/development/compilers/dotnet/packages.nix b/pkgs/development/compilers/dotnet/packages.nix index 606b62ce0cc4..e8819a14611c 100644 --- a/pkgs/development/compilers/dotnet/packages.nix +++ b/pkgs/development/compilers/dotnet/packages.nix @@ -156,7 +156,12 @@ let passthru = { inherit (vmr) icu targetRid hasILCompiler; - inherit packages targetPackages; + inherit + packages + targetPackages + runtime + aspnetcore + ; }; meta = vmr.meta // { diff --git a/pkgs/development/compilers/dotnet/update.sh b/pkgs/development/compilers/dotnet/update.sh index b7ebe92c0841..8e6f73114d8b 100755 --- a/pkgs/development/compilers/dotnet/update.sh +++ b/pkgs/development/compilers/dotnet/update.sh @@ -348,6 +348,8 @@ in rec { version = \"${sdk_version}\"; $sdk_sources inherit commonPackages hostPackages targetPackages; + runtime = runtime_$major_minor_underscore; + aspnetcore = aspnetcore_$major_minor_underscore; };" done diff --git a/pkgs/development/compilers/dotnet/versions/6.0.nix b/pkgs/development/compilers/dotnet/versions/6.0.nix index 388943cf2378..943d04fd044a 100644 --- a/pkgs/development/compilers/dotnet/versions/6.0.nix +++ b/pkgs/development/compilers/dotnet/versions/6.0.nix @@ -274,6 +274,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_6_0; + aspnetcore = aspnetcore_6_0; }; sdk_6_0_1xx = buildNetSdk { @@ -313,6 +315,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_6_0; + aspnetcore = aspnetcore_6_0; }; sdk_6_0 = sdk_6_0_4xx; diff --git a/pkgs/development/compilers/dotnet/versions/7.0.nix b/pkgs/development/compilers/dotnet/versions/7.0.nix index 21fa129c3363..0e954fd0739e 100644 --- a/pkgs/development/compilers/dotnet/versions/7.0.nix +++ b/pkgs/development/compilers/dotnet/versions/7.0.nix @@ -282,6 +282,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_7_0; + aspnetcore = aspnetcore_7_0; }; sdk_7_0_3xx = buildNetSdk { @@ -321,6 +323,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_7_0; + aspnetcore = aspnetcore_7_0; }; sdk_7_0_1xx = buildNetSdk { @@ -360,6 +364,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_7_0; + aspnetcore = aspnetcore_7_0; }; sdk_7_0 = sdk_7_0_4xx; diff --git a/pkgs/development/compilers/dotnet/versions/8.0.nix b/pkgs/development/compilers/dotnet/versions/8.0.nix index 56c405200a39..027fcc1448c7 100644 --- a/pkgs/development/compilers/dotnet/versions/8.0.nix +++ b/pkgs/development/compilers/dotnet/versions/8.0.nix @@ -284,6 +284,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_8_0; + aspnetcore = aspnetcore_8_0; }; sdk_8_0_3xx = buildNetSdk { @@ -323,6 +325,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_8_0; + aspnetcore = aspnetcore_8_0; }; sdk_8_0_1xx = buildNetSdk { @@ -362,6 +366,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_8_0; + aspnetcore = aspnetcore_8_0; }; sdk_8_0 = sdk_8_0_4xx; diff --git a/pkgs/development/compilers/dotnet/versions/9.0.nix b/pkgs/development/compilers/dotnet/versions/9.0.nix index e740d180f0aa..e5f05498b437 100644 --- a/pkgs/development/compilers/dotnet/versions/9.0.nix +++ b/pkgs/development/compilers/dotnet/versions/9.0.nix @@ -240,6 +240,8 @@ in rec { }; }; inherit commonPackages hostPackages targetPackages; + runtime = runtime_9_0; + aspnetcore = aspnetcore_9_0; }; sdk_9_0 = sdk_9_0_1xx; diff --git a/pkgs/development/compilers/dotnet/wrapper.nix b/pkgs/development/compilers/dotnet/wrapper.nix index d5d03e184661..3e492491afd7 100644 --- a/pkgs/development/compilers/dotnet/wrapper.nix +++ b/pkgs/development/compilers/dotnet/wrapper.nix @@ -82,8 +82,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { usePackageSource ? false, build, buildInputs ? [ ], - # TODO: use correct runtimes instead of sdk - runtime ? finalAttrs.finalPackage, + runtime ? finalAttrs.finalPackage.runtime, runInputs ? [ ], run ? null, runAllowNetworking ? false, @@ -188,6 +187,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { name = "web"; template = "web"; build = "dotnet publish -o $out/bin"; + runtime = finalAttrs.finalPackage.aspnetcore; runInputs = [ expect curl