2020-04-24 23:36:52 +00:00
|
|
|
/*
|
|
|
|
How to combine packages for use in development:
|
2021-10-17 09:34:42 +00:00
|
|
|
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_5_0 aspnetcore_5_0 ];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
Hashes and urls below are retrieved from:
|
2021-04-17 00:35:05 +00:00
|
|
|
https://dotnet.microsoft.com/download/dotnet
|
2020-04-24 23:36:52 +00:00
|
|
|
*/
|
2022-05-18 14:49:53 +00:00
|
|
|
{ callPackage, icu70, icu }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
2020-08-20 17:08:02 +00:00
|
|
|
buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {};
|
2022-08-21 13:32:41 +00:00
|
|
|
buildAttrs = {
|
|
|
|
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
|
|
|
|
buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
|
|
|
|
buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
|
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
runtimeIdentifierMap = {
|
|
|
|
"x86_64-linux" = "linux-x64";
|
|
|
|
"aarch64-linux" = "linux-arm64";
|
|
|
|
"x86_64-darwin" = "osx-x64";
|
|
|
|
"aarch64-darwin" = "osx-arm64";
|
|
|
|
"x86_64-windows" = "win-x64";
|
|
|
|
"i686-windows" = "win-x86";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Convert a "stdenv.hostPlatform.system" to a dotnet RID
|
|
|
|
systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
## Files in versions/ are generated automatically by update.sh ##
|
|
|
|
dotnet_3_1 = import ./versions/3.1.nix (buildAttrs // { icu = icu70; });
|
|
|
|
dotnet_6_0 = import ./versions/6.0.nix (buildAttrs // { inherit icu; });
|
2022-09-09 14:08:57 +00:00
|
|
|
dotnet_7_0 = import ./versions/7.0.nix (buildAttrs // { inherit icu; });
|
2023-03-04 12:14:45 +00:00
|
|
|
dotnet_8_0 = import ./versions/8.0.nix (buildAttrs // { inherit icu; });
|
2020-05-03 17:38:23 +00:00
|
|
|
in
|
|
|
|
rec {
|
2022-12-28 21:21:41 +00:00
|
|
|
inherit systemToDotnetRid;
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
# EOL
|
2023-02-02 18:25: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)";
|
2023-03-04 12:14:45 +00:00
|
|
|
} // dotnet_3_1 // dotnet_6_0 // dotnet_7_0 // dotnet_8_0
|