Merge 4a3faa5e86 into haskell-updates

This commit is contained in:
nixpkgs-ci[bot]
2025-01-29 00:17:24 +00:00
committed by GitHub
208 changed files with 3398 additions and 2783 deletions

View File

@@ -5,5 +5,5 @@
releaseInfoFile = ./release-info.json;
bootstrapSdkFile = ./bootstrap-sdk.nix;
depsFile = ./deps.json;
fallbackTargetPackages = dotnetCorePackages.sdk_8_0.targetPackages;
fallbackTargetPackages = dotnetCorePackages.sdk_8_0-bin.targetPackages;
}

View File

@@ -6,5 +6,5 @@
bootstrapSdkFile = ./bootstrap-sdk.nix;
allowPrerelease = true;
depsFile = ./deps.json;
fallbackTargetPackages = dotnetCorePackages.sdk_9_0.targetPackages;
fallbackTargetPackages = dotnetCorePackages.sdk_9_0-bin.targetPackages;
}

View File

@@ -18,7 +18,7 @@ in
assert lib.assertMsg ((builtins.length dotnetPackages) > 0) ''
You must include at least one package, e.g
`with dotnetCorePackages; combinePackages [
sdk_6_0 aspnetcore_7_0
sdk_9_0 aspnetcore_8_0
];`'';
mkWrapper "sdk" (buildEnv {
name = "dotnet-combined";

View File

@@ -1,6 +1,6 @@
/*
How to combine packages for use in development:
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_6_0 aspnetcore_7_0 ];
dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_9_0 aspnetcore_8_0 ];
Hashes and urls are retrieved from:
https://dotnet.microsoft.com/download/dotnet
@@ -13,74 +13,115 @@
makeScopeWithSplicing',
}:
makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "dotnetCorePackages";
f = (
self:
let
callPackage = self.callPackage;
let
pkgs = makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "dotnetCorePackages";
f = (
self:
let
callPackage = self.callPackage;
fetchNupkg = callPackage ../../../build-support/dotnet/fetch-nupkg { };
fetchNupkg = callPackage ../../../build-support/dotnet/fetch-nupkg { };
buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) { };
buildDotnetSdk =
version:
import version {
inherit fetchNupkg;
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; });
buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) { };
buildDotnetSdk =
version:
import version {
inherit fetchNupkg;
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-bin = lib.mergeAttrsList (
map buildDotnetSdk [
./versions/6.0.nix
./versions/7.0.nix
./versions/8.0.nix
./versions/9.0.nix
]
);
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";
};
## Files in versions/ are generated automatically by update.sh ##
dotnet_6_0 = buildDotnetSdk ./versions/6.0.nix;
dotnet_7_0 = buildDotnetSdk ./versions/7.0.nix;
dotnet_8_0 = buildDotnetSdk ./versions/8.0.nix;
dotnet_9_0 = buildDotnetSdk ./versions/9.0.nix;
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)";
}
// dotnet-bin
)
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-bin" v) dotnet-bin
// {
inherit callPackage fetchNupkg buildDotnetSdk;
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}");
in
{
inherit callPackage fetchNupkg buildDotnetSdk;
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };
# Convert a "stdenv.hostPlatform.system" to a dotnet RID
systemToDotnetRid =
system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
patchNupkgs = callPackage ./patch-nupkgs.nix { };
nugetPackageHook = callPackage ./nuget-package-hook.nix { };
combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };
buildDotnetModule = callPackage ../../../build-support/dotnet/build-dotnet-module { };
buildDotnetGlobalTool = callPackage ../../../build-support/dotnet/build-dotnet-global-tool { };
patchNupkgs = callPackage ./patch-nupkgs.nix { };
nugetPackageHook = callPackage ./nuget-package-hook.nix { };
mkNugetSource = callPackage ../../../build-support/dotnet/make-nuget-source { };
mkNugetDeps = callPackage ../../../build-support/dotnet/make-nuget-deps { };
addNuGetDeps = callPackage ../../../build-support/dotnet/add-nuget-deps { };
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 { });
dotnet_9 = recurseIntoAttrs (callPackage ./9 { });
}
// 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)";
}
// dotnet_6_0
// dotnet_7_0
// dotnet_8_0
// dotnet_9_0
dotnet_8 = recurseIntoAttrs (callPackage ./8 { });
dotnet_9 = recurseIntoAttrs (callPackage ./9 { });
}
);
};
in
pkgs
// rec {
# use binary SDK here to avoid downgrading feature band
sdk_8_0_1xx = if !pkgs.dotnet_8.vmr.meta.broken then pkgs.dotnet_8.sdk else pkgs.sdk_8_0_1xx-bin;
# source-built SDK only exists for _1xx feature band
sdk_8_0_4xx = pkgs.callPackage ./wrapper.nix { } "sdk" (
pkgs.sdk_8_0_4xx-bin.unwrapped.overrideAttrs (old: {
passthru =
old.passthru
// {
inherit (sdk_8_0_1xx)
runtime
aspnetcore
;
}
# We can't use the source-built packages until ilcompiler is fixed (see vmr.nix)
// lib.optionalAttrs sdk_8_0_1xx.hasILCompiler {
inherit (sdk_8_0_1xx)
packages
targetPackages
;
};
})
);
sdk_8_0 = sdk_8_0_4xx;
sdk_8_0-source = sdk_8_0_1xx;
runtime_8_0 = sdk_8_0.runtime;
aspnetcore_8_0 = sdk_8_0.aspnetcore;
}
// rec {
sdk_9_0_1xx = if !pkgs.dotnet_9.vmr.meta.broken then pkgs.dotnet_9.sdk else pkgs.sdk_9_0_1xx-bin;
sdk_9_0 = sdk_9_0_1xx;
runtime_9_0 = sdk_9_0.runtime;
aspnetcore_9_0 = sdk_9_0.aspnetcore;
}

View File

@@ -25,6 +25,11 @@ let
+ ''
ln -s ${vmr.man} $man
'';
propagatedSandboxProfile = lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
(allow file-read* (subpath "/private/var/db/mds/system"))
(allow mach-lookup (global-name "com.apple.SecurityServer")
(global-name "com.apple.system.opendirectoryd.membership"))
'';
}
)
);
@@ -66,8 +71,12 @@ let
version=''${version,,}
mkdir -p "$out"/share/nuget/packages/"$id"
cp -r . "$out"/share/nuget/packages/"$id"/"$version"
chmod +w "$out"/share/nuget/packages/"$id"/"$version"
echo {} > "$out"/share/nuget/packages/"$id"/"$version"/.nupkg.metadata
cd "$out"/share/nuget/packages/"$id"/"$version"
chmod +w .
for dir in tools runtimes/*/native; do
[[ ! -d "$dir" ]] || chmod -R +x "$dir"
done
echo {} > .nupkg.metadata
)
popd

View File

@@ -481,5 +481,8 @@ stdenv.mkDerivation rec {
"x86_64-darwin"
"aarch64-darwin"
];
# build deadlocks intermittently on rosetta
# https://github.com/dotnet/runtime/issues/111628
broken = stdenv.hostPlatform.system == "x86_64-darwin";
};
}

View File

@@ -204,6 +204,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runtime = null;
run = checkConsoleOutput "$src/bin/test";
};
ready-to-run = mkConsoleTest {
name = "ready-to-run";
usePackageSource = true;
build = "dotnet publish --use-current-runtime -p:PublishReadyToRun=true -o $out/bin";
run = checkConsoleOutput "$src/bin/test";
};
}
// lib.optionalAttrs finalAttrs.finalPackage.hasILCompiler {
aot = mkConsoleTest {

View File

@@ -0,0 +1,13 @@
--- a/tools/polly/cmake/polly_macros.cmake 2024-03-15 17:36:20.550893344 -0700
+++ b/tools/polly/cmake/polly_macros.cmake 2024-03-15 17:37:06.277332960 -0700
@@ -45,8 +45,8 @@
install(TARGETS ${name}
COMPONENT ${name}
${exports}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
add_llvm_install_targets(install-${name}
COMPONENT ${name})
endif()

View File

@@ -130,6 +130,11 @@ let
];
"llvm/gnu-install-dirs-polly.patch" = [
{
after = "20";
path = ../20;
}
{
before = "20";
after = "18";
path = ../18;
}
@@ -519,7 +524,8 @@ let
(metadata.getVersionFile "clang/purity.patch")
# https://reviews.llvm.org/D51899
(metadata.getVersionFile "clang/gnu-install-dirs.patch")
]
++ lib.optionals (lib.versionOlder metadata.release_version "20") [
# https://github.com/llvm/llvm-project/pull/116476
# prevent clang ignoring warnings / errors for unsuppored
# options when building & linking a source file with trailing
@@ -1063,7 +1069,7 @@ let
++ lib.optionals (lib.versionAtLeast metadata.release_version "13") [
(metadata.getVersionFile "compiler-rt/armv6-scudo-libatomic.patch")
]
++ lib.optional (lib.versionAtLeast metadata.release_version "19") (fetchpatch {
++ lib.optional (lib.versions.major metadata.release_version == "19") (fetchpatch {
url = "https://github.com/llvm/llvm-project/pull/99837/commits/14ae0a660a38e1feb151928a14f35ff0f4487351.patch";
hash = "sha256-JykABCaNNhYhZQxCvKiBn54DZ5ZguksgCHnpdwWF2no=";
relative = "compiler-rt";

View File

@@ -31,9 +31,9 @@ let
"18.1.8".officialRelease.sha256 = "sha256-iiZKMRo/WxJaBXct9GdAcAT3cz9d9pnAcO1mmR6oPNE=";
"19.1.6".officialRelease.sha256 = "sha256-LD4nIjZTSZJtbgW6tZopbTF5Mq0Tenj2gbuPXhtOeUI=";
"20.0.0-git".gitRelease = {
rev = "1ef5b987a464611a60e873650726b5e02fda0feb";
rev-version = "20.0.0-unstable-2024-12-17";
sha256 = "sha256-QCY9z9h3z5gPvwq6bNzAB5xFFStwOCfKh4VnWInhxU4=";
rev = "6383a12e3b4339fa4743bb97da4d51dea6d2e2ea";
rev-version = "20.0.0-unstable-2025-01-25";
sha256 = "sha256-LMew+lFm+HrR5iwFDnoXA6B2LiU/pVqsy1YrP9xr5GU=";
};
} // llvmVersions;