2 How to combine packages for use in development:
3 dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
5 Hashes and urls are retrieved from:
6 https://dotnet.microsoft.com/download/dotnet
10 buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {};
12 buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
13 buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
14 buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
17 ## Files in versions/ are generated automatically by update.sh ##
18 dotnet_6_0 = import ./versions/6.0.nix buildAttrs;
19 dotnet_7_0 = import ./versions/7.0.nix buildAttrs;
20 dotnet_8_0 = import ./versions/8.0.nix buildAttrs;
22 runtimeIdentifierMap = {
23 "x86_64-linux" = "linux-x64";
24 "aarch64-linux" = "linux-arm64";
25 "x86_64-darwin" = "osx-x64";
26 "aarch64-darwin" = "osx-arm64";
27 "x86_64-windows" = "win-x64";
28 "i686-windows" = "win-x86";
31 # Convert a "stdenv.hostPlatform.system" to a dotnet RID
32 systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
35 inherit systemToDotnetRid;
37 combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {};
40 sdk_2_1 = throw "Dotnet SDK 2.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
41 sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
42 sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
43 sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
44 sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
45 } // dotnet_6_0 // dotnet_7_0 // dotnet_8_0