Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1/* 2How to combine packages for use in development: 3dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ]; 4 5Hashes and urls are retrieved from: 6https://dotnet.microsoft.com/download/dotnet 7*/ 8{ callPackage,}: 9let 10 buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {}; 11 buildAttrs = { 12 buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; }); 13 buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; }); 14 buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; }); 15 }; 16 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; 21 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"; 29 }; 30 31 # Convert a "stdenv.hostPlatform.system" to a dotnet RID 32 systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}"); 33in 34rec { 35 inherit systemToDotnetRid; 36 37 combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {}; 38 39 # EOL 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