2020-04-24 23:36:52 +00:00
|
|
|
/*
|
2024-09-26 11:04:55 +00:00
|
|
|
How to combine packages for use in development:
|
|
|
|
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
Hashes and urls are retrieved from:
|
|
|
|
https://dotnet.microsoft.com/download/dotnet
|
2020-04-24 23:36:52 +00:00
|
|
|
*/
|
2024-09-26 11:04:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
recurseIntoAttrs,
|
|
|
|
generateSplicesForMkScope,
|
|
|
|
makeScopeWithSplicing',
|
2024-09-19 14:19:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
makeScopeWithSplicing' {
|
|
|
|
otherSplices = generateSplicesForMkScope "dotnetCorePackages";
|
2024-09-26 11:04:55 +00:00
|
|
|
f = (
|
|
|
|
self:
|
2024-09-19 14:19:46 +00:00
|
|
|
let
|
|
|
|
callPackage = self.callPackage;
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
fetchNupkg = callPackage ../../../build-support/dotnet/fetch-nupkg { };
|
|
|
|
|
|
|
|
buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) { };
|
2024-09-19 14:19:46 +00:00
|
|
|
buildAttrs = {
|
2024-09-26 11:04:55 +00:00
|
|
|
inherit fetchNupkg;
|
2024-09-19 14:19:46 +00:00
|
|
|
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
|
|
|
|
buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
|
|
|
|
buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
|
|
|
|
};
|
|
|
|
|
|
|
|
## 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;
|
|
|
|
dotnet_9_0 = import ./versions/9.0.nix buildAttrs;
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit callPackage fetchNupkg;
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# Convert a "stdenv.hostPlatform.system" to a dotnet RID
|
2024-09-26 11:04:55 +00:00
|
|
|
systemToDotnetRid =
|
|
|
|
system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
patchNupkgs = callPackage ./patch-nupkgs.nix { };
|
|
|
|
nugetPackageHook = callPackage ./nuget-package-hook.nix { };
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
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 { };
|
|
|
|
|
|
|
|
dotnet_8 = recurseIntoAttrs (callPackage ./8 { bootstrapSdk = dotnet_8_0.sdk_8_0_1xx; });
|
2024-09-26 11:04:55 +00:00
|
|
|
dotnet_9 = recurseIntoAttrs (callPackage ./9 { });
|
|
|
|
}
|
|
|
|
// lib.optionalAttrs config.allowAliases {
|
2024-09-19 14:19:46 +00:00
|
|
|
# EOL
|
|
|
|
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)";
|
|
|
|
sdk_3_1 = throw "Dotnet SDK 3.1 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
|
|
|
sdk_5_0 = throw "Dotnet SDK 5.0 is EOL, please use 6.0 (LTS) or 7.0 (Current)";
|
2024-09-26 11:04:55 +00:00
|
|
|
}
|
|
|
|
// dotnet_6_0
|
|
|
|
// dotnet_7_0
|
|
|
|
// dotnet_8_0
|
|
|
|
// dotnet_9_0
|
|
|
|
);
|
2024-09-19 14:19:46 +00:00
|
|
|
}
|