2020-04-24 23:36:52 +00:00
|
|
|
/*
|
|
|
|
How to combine packages for use in development:
|
2023-03-30 22:05:00 +00:00
|
|
|
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
Hashes and urls 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
|
|
|
*/
|
2023-07-15 17:15:38 +00:00
|
|
|
{ callPackage }:
|
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"; });
|
|
|
|
};
|
|
|
|
|
2023-03-30 22:05:00 +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;
|
|
|
|
|
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}");
|
2020-05-03 17:38:23 +00:00
|
|
|
in
|
2023-07-15 17:15:38 +00:00
|
|
|
{
|
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)";
|
2023-03-30 22:05:00 +00:00
|
|
|
sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
2023-02-02 18:25:31 +00:00
|
|
|
sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
2023-03-30 22:05:00 +00:00
|
|
|
} // dotnet_6_0 // dotnet_7_0 // dotnet_8_0
|