Something went wrong. Try again.
lol
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130/* How to combine packages for use in development: dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_9_0 aspnetcore_8_0 ];
Hashes and urls are retrieved from: https://dotnet.microsoft.com/download/dotnet*/{ lib, config, generateSplicesForMkScope, makeScopeWithSplicing', writeScriptBin, buildPackages, newScope,}:
makeScopeWithSplicing' { otherSplices = generateSplicesForMkScope "dotnetCorePackages"; f = ( self: let callPackage = self.callPackage;
fetchNupkg = callPackage ../../../build-support/dotnet/fetch-nupkg { };
buildDotnetSdk = let buildDotnet = attrs: callWithUtils (import ./binary/build-dotnet.nix attrs) { }; in version: import version { inherit fetchNupkg; buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; }); buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; }); buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; }); };
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"; };
# used to break cycle in attribute names callWithUtils = newScope (utils // { callPackage = callWithUtils; });
utils = { inherit callPackage fetchNupkg buildDotnetSdk ;
generate-dotnet-sdk = writeScriptBin "generate-dotnet-sdk" ( # Don't include current nixpkgs in the exposed version. We want to make the script runnable without nixpkgs repo. builtins.replaceStrings [ " -I nixpkgs=./." ] [ "" ] (builtins.readFile ./binary/update.sh) );
# Convert a "stdenv.hostPlatform.system" to a dotnet RID systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };
patchNupkgs = buildPackages.callPackage ./patch-nupkgs.nix { }; nugetPackageHook = callPackage ./nuget-package-hook.nix { }; autoPatchcilHook = callPackage ../../../build-support/dotnet/auto-patchcil-hook { };
buildDotnetModule = callPackage ../../../build-support/dotnet/build-dotnet-module { }; buildDotnetGlobalTool = callPackage ../../../build-support/dotnet/build-dotnet-global-tool { };
mkNugetSource = callPackage ../../../build-support/dotnet/make-nuget-source { }; mkNugetDeps = callPackage ../../../build-support/dotnet/make-nuget-deps { }; addNuGetDeps = callPackage ../../../build-support/dotnet/add-nuget-deps { }; };
in utils // ( let dotnet_6 = callWithUtils ./dotnet.nix { channel = "6.0"; withVMR = false; };
dotnet_7 = callWithUtils ./dotnet.nix { channel = "7.0"; withVMR = false; };
dotnet_8 = callWithUtils ./dotnet.nix { channel = "8.0"; };
dotnet_9 = callWithUtils ./dotnet.nix { channel = "9.0"; };
dotnet_10 = callWithUtils ./dotnet.nix { channel = "10.0"; };
dotnet_11 = callWithUtils ./dotnet.nix { channel = "11.0"; }; in lib.optionalAttrs config.allowAliases { # EOL sdk_2_1 = throw "Dotnet SDK 2.1 is EOL, please use 8.0 (LTS) or 9.0 (Current)"; sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 8.0 (LTS) or 9.0 (Current)"; sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 8.0 (LTS) or 9.0 (Current)"; sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 8.0 (LTS) or 9.0 (Current)"; sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 8.0 (LTS) or 9.0 (Current)"; } // lib.mergeAttrsList [ dotnet_6 dotnet_7 dotnet_8 dotnet_9 dotnet_10 dotnet_11 ] ) );}