mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
dotnet: add passthru.runtime/aspnetcore to sdk packages
This commit is contained in:
parent
6e919bf975
commit
112a4c48c6
@ -9,8 +9,10 @@
|
|||||||
dotnetCorePackages,
|
dotnetCorePackages,
|
||||||
cacert,
|
cacert,
|
||||||
addNuGetDeps,
|
addNuGetDeps,
|
||||||
|
dotnet-sdk,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
default-sdk = dotnet-sdk;
|
||||||
transformArgs =
|
transformArgs =
|
||||||
finalAttrs:
|
finalAttrs:
|
||||||
{
|
{
|
||||||
@ -82,9 +84,9 @@ let
|
|||||||
# Whether to explicitly enable UseAppHost when building. This is redundant if useDotnetFromEnv is enabled
|
# Whether to explicitly enable UseAppHost when building. This is redundant if useDotnetFromEnv is enabled
|
||||||
useAppHost ? true,
|
useAppHost ? true,
|
||||||
# The dotnet SDK to use.
|
# The dotnet SDK to use.
|
||||||
dotnet-sdk ? dotnetCorePackages.sdk_6_0,
|
dotnet-sdk ? default-sdk,
|
||||||
# The dotnet runtime to use.
|
# The dotnet runtime to use.
|
||||||
dotnet-runtime ? dotnetCorePackages.runtime_6_0,
|
dotnet-runtime ? dotnet-sdk.runtime,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
let
|
let
|
||||||
|
@ -284,6 +284,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_8_0;
|
||||||
|
aspnetcore = aspnetcore_8_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk = sdk_8_0;
|
sdk = sdk_8_0;
|
||||||
|
@ -240,6 +240,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_9_0;
|
||||||
|
aspnetcore = aspnetcore_9_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk = sdk_9_0;
|
sdk = sdk_9_0;
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
commonPackages ? null,
|
commonPackages ? null,
|
||||||
hostPackages ? null,
|
hostPackages ? null,
|
||||||
targetPackages ? null,
|
targetPackages ? null,
|
||||||
|
runtime ? null,
|
||||||
|
aspnetcore ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert builtins.elem type [
|
assert builtins.elem type [
|
||||||
@ -14,7 +16,11 @@ assert builtins.elem type [
|
|||||||
];
|
];
|
||||||
assert
|
assert
|
||||||
if type == "sdk" then
|
if type == "sdk" then
|
||||||
commonPackages != null && hostPackages != null && targetPackages != null
|
commonPackages != null
|
||||||
|
&& hostPackages != null
|
||||||
|
&& targetPackages != null
|
||||||
|
&& runtime != null
|
||||||
|
&& aspnetcore != null
|
||||||
else
|
else
|
||||||
true;
|
true;
|
||||||
|
|
||||||
@ -190,7 +196,7 @@ mkWrapper type (
|
|||||||
}
|
}
|
||||||
// lib.optionalAttrs (type == "sdk") {
|
// lib.optionalAttrs (type == "sdk") {
|
||||||
packages = commonPackages ++ hostPackages.${hostRid} ++ targetPackages.${targetRid};
|
packages = commonPackages ++ hostPackages.${hostRid} ++ targetPackages.${targetRid};
|
||||||
inherit targetPackages;
|
inherit targetPackages runtime aspnetcore;
|
||||||
|
|
||||||
updateScript =
|
updateScript =
|
||||||
let
|
let
|
||||||
|
@ -156,7 +156,12 @@ let
|
|||||||
passthru = {
|
passthru = {
|
||||||
inherit (vmr) icu targetRid hasILCompiler;
|
inherit (vmr) icu targetRid hasILCompiler;
|
||||||
|
|
||||||
inherit packages targetPackages;
|
inherit
|
||||||
|
packages
|
||||||
|
targetPackages
|
||||||
|
runtime
|
||||||
|
aspnetcore
|
||||||
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = vmr.meta // {
|
meta = vmr.meta // {
|
||||||
|
@ -348,6 +348,8 @@ in rec {
|
|||||||
version = \"${sdk_version}\";
|
version = \"${sdk_version}\";
|
||||||
$sdk_sources
|
$sdk_sources
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_$major_minor_underscore;
|
||||||
|
aspnetcore = aspnetcore_$major_minor_underscore;
|
||||||
};"
|
};"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -274,6 +274,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_6_0;
|
||||||
|
aspnetcore = aspnetcore_6_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_6_0_1xx = buildNetSdk {
|
sdk_6_0_1xx = buildNetSdk {
|
||||||
@ -313,6 +315,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_6_0;
|
||||||
|
aspnetcore = aspnetcore_6_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_6_0 = sdk_6_0_4xx;
|
sdk_6_0 = sdk_6_0_4xx;
|
||||||
|
@ -282,6 +282,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_7_0;
|
||||||
|
aspnetcore = aspnetcore_7_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_7_0_3xx = buildNetSdk {
|
sdk_7_0_3xx = buildNetSdk {
|
||||||
@ -321,6 +323,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_7_0;
|
||||||
|
aspnetcore = aspnetcore_7_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_7_0_1xx = buildNetSdk {
|
sdk_7_0_1xx = buildNetSdk {
|
||||||
@ -360,6 +364,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_7_0;
|
||||||
|
aspnetcore = aspnetcore_7_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_7_0 = sdk_7_0_4xx;
|
sdk_7_0 = sdk_7_0_4xx;
|
||||||
|
@ -284,6 +284,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_8_0;
|
||||||
|
aspnetcore = aspnetcore_8_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_8_0_3xx = buildNetSdk {
|
sdk_8_0_3xx = buildNetSdk {
|
||||||
@ -323,6 +325,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_8_0;
|
||||||
|
aspnetcore = aspnetcore_8_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_8_0_1xx = buildNetSdk {
|
sdk_8_0_1xx = buildNetSdk {
|
||||||
@ -362,6 +366,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_8_0;
|
||||||
|
aspnetcore = aspnetcore_8_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_8_0 = sdk_8_0_4xx;
|
sdk_8_0 = sdk_8_0_4xx;
|
||||||
|
@ -240,6 +240,8 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit commonPackages hostPackages targetPackages;
|
inherit commonPackages hostPackages targetPackages;
|
||||||
|
runtime = runtime_9_0;
|
||||||
|
aspnetcore = aspnetcore_9_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk_9_0 = sdk_9_0_1xx;
|
sdk_9_0 = sdk_9_0_1xx;
|
||||||
|
@ -82,8 +82,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
usePackageSource ? false,
|
usePackageSource ? false,
|
||||||
build,
|
build,
|
||||||
buildInputs ? [ ],
|
buildInputs ? [ ],
|
||||||
# TODO: use correct runtimes instead of sdk
|
runtime ? finalAttrs.finalPackage.runtime,
|
||||||
runtime ? finalAttrs.finalPackage,
|
|
||||||
runInputs ? [ ],
|
runInputs ? [ ],
|
||||||
run ? null,
|
run ? null,
|
||||||
runAllowNetworking ? false,
|
runAllowNetworking ? false,
|
||||||
@ -188,6 +187,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
name = "web";
|
name = "web";
|
||||||
template = "web";
|
template = "web";
|
||||||
build = "dotnet publish -o $out/bin";
|
build = "dotnet publish -o $out/bin";
|
||||||
|
runtime = finalAttrs.finalPackage.aspnetcore;
|
||||||
runInputs = [
|
runInputs = [
|
||||||
expect
|
expect
|
||||||
curl
|
curl
|
||||||
|
Loading…
Reference in New Issue
Block a user