2020-01-17 13:54:22 +00:00
|
|
|
/*
|
|
|
|
How to combine packages for use in development:
|
2023-03-21 21:27:19 +00:00
|
|
|
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
|
2021-04-14 18:01:52 +00:00
|
|
|
|
2023-03-21 21:27:19 +00:00
|
|
|
Hashes and urls 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
|
|
|
*/
|
2024-02-21 03:21:08 +00:00
|
|
|
{ lib, config, callPackage, recurseIntoAttrs }:
|
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"; });
|
|
|
|
};
|
|
|
|
|
2023-03-21 21:27:19 +00:00
|
|
|
## Files in versions/ are generated automatically by update.sh ##
|
|
|
|
dotnet_6_0 = import ./versions/6.0.nix buildAttrs;
|
|
|
|
dotnet_7_0 = import ./versions/7.0.nix buildAttrs;
|
|
|
|
dotnet_8_0 = import ./versions/8.0.nix buildAttrs;
|
2024-02-21 03:11:45 +00:00
|
|
|
dotnet_9_0 = import ./versions/9.0.nix buildAttrs;
|
2023-03-21 21:27:19 +00:00
|
|
|
|
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}");
|
2020-04-26 05:41:02 +00:00
|
|
|
in
|
2023-06-21 15:06:26 +00:00
|
|
|
{
|
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) {};
|
2024-02-21 03:21:08 +00:00
|
|
|
|
2024-03-25 01:54:34 +00:00
|
|
|
dotnet_8 = recurseIntoAttrs (callPackage ./8 { bootstrapSdk = dotnet_8_0.sdk_8_0_1xx; });
|
2024-02-21 03:22:29 +00:00
|
|
|
dotnet_9 = recurseIntoAttrs (callPackage ./9 {});
|
2023-12-22 18:32:13 +00:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
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)";
|
2023-03-21 21:27:19 +00:00
|
|
|
sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
2023-01-22 16:36:31 +00:00
|
|
|
sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
2024-02-21 03:11:45 +00:00
|
|
|
} // dotnet_6_0 // dotnet_7_0 // dotnet_8_0 // dotnet_9_0
|