2020-01-17 13:54:22 +00:00
|
|
|
/*
|
|
|
|
How to combine packages for use in development:
|
2021-09-26 21:06:38 +00:00
|
|
|
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_5_0 aspnetcore_5_0 ];
|
2021-04-14 18:01:52 +00:00
|
|
|
|
2022-03-14 11:49:47 +00:00
|
|
|
Hashes and urls below are retrieved from:
|
2021-04-14 18:01:52 +00:00
|
|
|
https://dotnet.microsoft.com/download/dotnet
|
2020-01-17 13:54:22 +00:00
|
|
|
*/
|
2022-05-10 12:45:41 +00:00
|
|
|
{ callPackage, icu70, icu }:
|
2020-01-17 13:54:22 +00:00
|
|
|
let
|
2020-07-16 21:07:25 +00:00
|
|
|
buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {};
|
2022-07-15 14:53:52 +00:00
|
|
|
buildAttrs = {
|
|
|
|
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
|
|
|
|
buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
|
|
|
|
buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
|
|
|
|
};
|
|
|
|
|
2022-10-03 14:13:17 +00:00
|
|
|
runtimeIdentifierMap = {
|
|
|
|
"x86_64-linux" = "linux-x64";
|
|
|
|
"aarch64-linux" = "linux-arm64";
|
|
|
|
"x86_64-darwin" = "osx-x64";
|
|
|
|
"aarch64-darwin" = "osx-arm64";
|
2022-12-11 17:48:55 +00:00
|
|
|
"x86_64-windows" = "win-x64";
|
|
|
|
"i686-windows" = "win-x86";
|
2022-10-03 14:13:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Convert a "stdenv.hostPlatform.system" to a dotnet RID
|
|
|
|
systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
|
|
|
|
|
2022-08-05 13:40:43 +00:00
|
|
|
## Files in versions/ are generated automatically by update.sh ##
|
2022-07-15 14:53:58 +00:00
|
|
|
dotnet_3_1 = import ./versions/3.1.nix (buildAttrs // { icu = icu70; });
|
|
|
|
dotnet_6_0 = import ./versions/6.0.nix (buildAttrs // { inherit icu; });
|
2022-08-17 13:39:50 +00:00
|
|
|
dotnet_7_0 = import ./versions/7.0.nix (buildAttrs // { inherit icu; });
|
2020-04-26 05:41:02 +00:00
|
|
|
in
|
|
|
|
rec {
|
2022-10-03 14:13:17 +00:00
|
|
|
inherit systemToDotnetRid;
|
|
|
|
|
2020-07-16 21:07:25 +00:00
|
|
|
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {};
|
2020-01-17 13:54:22 +00:00
|
|
|
|
2021-09-26 21:06:38 +00:00
|
|
|
# EOL
|
2023-01-22 16:36:31 +00:00
|
|
|
sdk_2_1 = throw "Dotnet SDK 2.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
|
|
|
sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
|
|
|
sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
|
|
|
sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
|
|
|
} // dotnet_3_1 // dotnet_6_0 // dotnet_7_0
|