dotnetCorePackages.dotnet_9.vmr: 9.0.0-preview.1 -> 9.0.0-preview.2

This commit is contained in:
David McFarland 2024-04-03 15:47:33 -03:00
parent bbf28447f2
commit 62801bb1ec
9 changed files with 115 additions and 75 deletions

View File

@ -1,11 +1,10 @@
{ fetchNuGet }: [
(fetchNuGet { pname = "System.CommandLine"; sha256 = "0i343zwgcnila8pxxgsk12a284mw0jkg3m82607shdbxjrwadz8n"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/516521bf-6417-457e-9a9c-0a4bdfde03e7/nuget/v3/flat2/system.commandline/2.0.0-beta4.23307.1/system.commandline.2.0.0-beta4.23307.1.nupkg"; version = "2.0.0-beta4.23307.1"; })
(fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILAsm"; sha256 = "4edcd01d72a239df9506a124544aba8e8f18757b2b5398a658a68a920f58b1c8"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ilasm/9.0.0-alpha.1.24061.26/runtime.linux-arm64.microsoft.netcore.ilasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "55c2b7eab77aee7c22fcd3c44c0602fb767f800337b9740c2d29be31ac92b66f"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ildasm/9.0.0-alpha.1.24061.26/runtime.linux-arm64.microsoft.netcore.ildasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILAsm"; sha256 = "1vbxs72aq6k6ibcjqibswm51zdj6k3vxd1gxpw1aqbk8b6vaqqwf"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ilasm/9.0.0-alpha.1.24061.26/runtime.linux-x64.microsoft.netcore.ilasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILDAsm"; sha256 = "0qwbjv0di5rnxaik7bxlfbr14y7w24fqp9vn6x5z2v464zdz02q5"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ildasm/9.0.0-alpha.1.24061.26/runtime.linux-x64.microsoft.netcore.ildasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILAsm"; sha256 = "8af8a1cbbe485ce344612b2482197a9ced5de567e384aea7cc0307741131990e"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ilasm/9.0.0-alpha.1.24061.26/runtime.osx-arm64.microsoft.netcore.ilasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "ccf1cc88a8b555e0f514d71c8d5adc60fd06ec3a7e4c7a0b0acd6d4b1b81e0f3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ildasm/9.0.0-alpha.1.24061.26/runtime.osx-arm64.microsoft.netcore.ildasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILAsm"; sha256 = "8d9346877885235b4267363d323a3f15122fb3667d7fbceb7c685f68163102e0"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ilasm/9.0.0-alpha.1.24061.26/runtime.osx-x64.microsoft.netcore.ilasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILDAsm"; sha256 = "562eb0ea029d008798e50d423c3beaa5b509886751d446ce53f676b1a0281365"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ildasm/9.0.0-alpha.1.24061.26/runtime.osx-x64.microsoft.netcore.ildasm.9.0.0-alpha.1.24061.26.nupkg"; version = "9.0.0-alpha.1.24061.26"; })
(fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILAsm"; sha256 = "83ea1b2eaf1035365d25ed1119e7c69f72893b9ece82a0771b1f2e342a23bdf3"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ilasm/9.0.0-preview.2.24080.1/runtime.linux-arm64.microsoft.netcore.ilasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.linux-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "96166f18c89084cd4b11dd2cd5cb949d088dd33f1c3446ba95c74b2c88273a22"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-arm64.microsoft.netcore.ildasm/9.0.0-preview.2.24080.1/runtime.linux-arm64.microsoft.netcore.ildasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILAsm"; sha256 = "09nd4ymm06cqia4r5laikgfffjhjk5m4c1snlz6sbpa29nhh5smr"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ilasm/9.0.0-preview.2.24080.1/runtime.linux-x64.microsoft.netcore.ilasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.linux-x64.Microsoft.NETCore.ILDAsm"; sha256 = "0iarbcblf33lcx19xgaa40bjgfsrskfp1205kpl4pv1jw3l4hgkd"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.linux-x64.microsoft.netcore.ildasm/9.0.0-preview.2.24080.1/runtime.linux-x64.microsoft.netcore.ildasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILAsm"; sha256 = "5ff20db7bef1c0adb9473a71b95dcfc02034fa40295fdf6bcbd826027d51d47d"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ilasm/9.0.0-preview.2.24080.1/runtime.osx-arm64.microsoft.netcore.ilasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.osx-arm64.Microsoft.NETCore.ILDAsm"; sha256 = "7e91613aeda779d2722f818ce137f5c969b7b05888db204d50c32e403ec4729b"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-arm64.microsoft.netcore.ildasm/9.0.0-preview.2.24080.1/runtime.osx-arm64.microsoft.netcore.ildasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILAsm"; sha256 = "d38c42cd85d1491a6db85e2800c5a4c19d14580968074a1ff2248b3ea3a0b57a"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ilasm/9.0.0-preview.2.24080.1/runtime.osx-x64.microsoft.netcore.ilasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
(fetchNuGet { pname = "runtime.osx-x64.Microsoft.NETCore.ILDAsm"; sha256 = "0d4879e7d02cdd818ff97f1cb1400ef00ad253691d561a354d34606e818e9c21"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/runtime.osx-x64.microsoft.netcore.ildasm/9.0.0-preview.2.24080.1/runtime.osx-x64.microsoft.netcore.ildasm.9.0.0-preview.2.24080.1.nupkg"; version = "9.0.0-preview.2.24080.1"; })
]

View File

@ -1,5 +1,5 @@
{
"tarballHash": "sha256-eLvH9Voeey9NvGy515CMGuvQIBgQoP3Abvbv0sZNkkY=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.9.0.100-alpha.1.24067.1.centos.8-x64.tar.gz",
"artifactsHash": "sha256-qH8MYzgEk0h9GwvZLUbmIM5Fe6uIAZrwHT/p8DIdy8E="
"tarballHash": "sha256-RbKpnIwSVPhOFCMGtm+Q6p1m0tiAEAV8YwAdIobzMXA=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.9.0.100-preview.2.24104.1.centos.8-x64.tar.gz",
"artifactsHash": "sha256-Ou1Efq+iWhsqsIDNPZeceoyxGhBST7MOQNpSrWUUKRI="
}

View File

@ -1,10 +1,10 @@
{
"release": "9.0.0-preview.1",
"release": "9.0.0-preview.2",
"channel": "9.0",
"tag": "v9.0.0-preview.1.24080.9",
"sdkVersion": "9.0.100-preview.1.24101.1",
"runtimeVersion": "9.0.0-preview.1.24080.9",
"aspnetcoreRuntimeVersion": "9.0.0-preview.1.24081.5",
"tag": "v9.0.0-preview.2.24128.5",
"sdkVersion": "9.0.100-preview.2.24158.1",
"runtimeVersion": "9.0.0-preview.2.24128.5",
"aspnetcoreRuntimeVersion": "9.0.0-preview.2.24128.4",
"sourceRepository": "https://github.com/dotnet/dotnet",
"sourceVersion": "1337fabdb46697adfbfe4a6f681fc1c2cb5d5b66"
"sourceVersion": "14eb446d301de0fa50afd32daf0dcbf1b3716ae5"
}

View File

@ -38,7 +38,7 @@ let
(map (changePackageRid package) otherRids);
allPackages =
sortOn (package: [ package.pname package.version package ])
sortOn (package: [ package.pname package.version ])
(concatMap expandPackage packages);
fetchExpr = package:

View File

@ -1,27 +0,0 @@
From e0bd79c04c3647dd5abec5e60c031b1f2762a84c Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Wed, 10 Jan 2024 02:25:46 -0400
Subject: [PATCH] fix-tmp-path
---
build.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.sh b/build.sh
index a1224e4369..555a88fc95 100755
--- a/build.sh
+++ b/build.sh
@@ -211,8 +211,8 @@ elif [ -d "$packagesArchiveDir" ]; then
if [ -f "${packagesPreviouslySourceBuiltDir}}PackageVersions.props" ]; then
packageVersionsPath=${packagesPreviouslySourceBuiltDir}PackageVersions.props
elif [ -f "$sourceBuiltArchive" ]; then
- tar -xzf "$sourceBuiltArchive" -C /tmp PackageVersions.props
- packageVersionsPath=/tmp/PackageVersions.props
+ tar -xzf "$sourceBuiltArchive" PackageVersions.props
+ packageVersionsPath=$PWD/PackageVersions.props
fi
fi
--
2.40.1

View File

@ -0,0 +1,5 @@
<Project>
<Target Name="PatchNpmPackages" AfterTargets="RestoreNpmPackages">
<Exec Command="source '$(RepoRoot)/patch-shebangs.sh' &amp;&amp; patchShebangs %24(find '$(RepoRoot)' -name node_modules -type d) 2>&amp;1"/>
</Target>
</Project>

View File

@ -63,6 +63,15 @@ let
[[ ! -v prebuiltPackages ]] || ln -sf "$prebuiltPackages"/* prereqs/packages/prebuilt/
'';
buildFlags =
old.buildFlags
++ lib.optionals (lib.versionAtLeast old.version "9") [
# We need to set this as long as we have something in deps.nix. Currently
# that's the portable ilasm/ildasm which aren't in the centos sourcebuilt
# artifacts.
"-p:SkipErrorOnPrebuilts=true"
];
passthru = old.passthru or {} // { fetch-deps =
let
inherit (vmr) targetRid updateScript;

View File

@ -22,7 +22,7 @@ index b847f5c3cd..cf8344ead0 100644
add_custom_command(
OUTPUT pal_swiftbindings.o
- COMMAND xcrun swiftc -emit-object -static -parse-as-library -runtime-compatibility-version none -sdk ${CMAKE_OSX_SYSROOT} -target ${SWIFT_COMPILER_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift -o pal_swiftbindings.o
+ COMMAND xcrun swiftc -emit-object -static -parse-as-library -runtime-compatibility-version none ${SWIFT_ARGS} -target ${SWIFT_COMPILER_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift -o pal_swiftbindings.o
+ COMMAND swiftc -module-cache-path "$ENV{HOME}/.cache/module-cache" -emit-object -static -parse-as-library -runtime-compatibility-version none ${SWIFT_ARGS} -target ${SWIFT_COMPILER_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift -o pal_swiftbindings.o
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift
COMMENT "Compiling Swift file pal_swiftbindings.swift"
)

View File

@ -24,6 +24,7 @@
, makeWrapper
, python3
, xmlstarlet
, nodejs
, callPackage
, dotnetSdk
@ -90,6 +91,9 @@ in stdenv.mkDerivation rec {
python3
xmlstarlet
]
++ lib.optionals (lib.versionAtLeast version "9") [
nodejs
]
++ lib.optionals isDarwin [
getconf
];
@ -108,7 +112,7 @@ in stdenv.mkDerivation rec {
lttng-ust_2_12
]
++ lib.optionals isDarwin (with apple_sdk.frameworks; [
xcbuild.xcrun
xcbuild
swift
(libkrb5.overrideAttrs (old: {
# the propagated build inputs break swift compilation
@ -121,7 +125,8 @@ in stdenv.mkDerivation rec {
CoreFoundation
CryptoKit
System
]);
]
++ lib.optional (lib.versionAtLeast version "9") GSS);
# This is required to fix the error:
# > CSSM_ModuleLoad(): One or more parameters passed to a function were not valid.
@ -138,11 +143,15 @@ in stdenv.mkDerivation rec {
(global-name "com.apple.system.opendirectoryd.membership"))
'';
patches = [
patches = lib.optionals (lib.versionOlder version "9") [
./fix-aspnetcore-portable-build.patch
./fix-tmp-path.patch
]
++ lib.optionals isDarwin [
# stop passing -sdk without a path
# stop using xcrun
# add -module-cache-path to fix swift errors, see sandboxProfile
# <unknown>:0: error: unable to open output file '/var/folders/[...]/C/clang/ModuleCache/[...]/SwiftShims-[...].pcm': 'Operation not permitted'
# <unknown>:0: error: could not build Objective-C module 'SwiftShims'
./stop-passing-bare-sdk-arg-to-swiftc.patch
];
@ -196,6 +205,36 @@ in stdenv.mkDerivation rec {
-s \$prev -t elem -n KeepNativeSymbols -v false \
src/runtime/Directory.Build.props
''
+ lib.optionalString (lib.versionAtLeast version "9") ''
# repro.csproj fails to restore due to missing freebsd packages
xmlstarlet ed \
--inplace \
-s //Project -t elem -n PropertyGroup \
-s \$prev -t elem -n RuntimeIdentifiers -v ${targetRid} \
src/runtime/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
# https://github.com/dotnet/runtime/pull/98559#issuecomment-1965338627
xmlstarlet ed \
--inplace \
-s //Project -t elem -n PropertyGroup \
-s \$prev -t elem -n NoWarn -v '$(NoWarn);CS9216' \
src/runtime/Directory.Build.props
# patch packages installed from npm cache
xmlstarlet ed \
--inplace \
-s //Project -t elem -n Import \
-i \$prev -t attr -n Project -v "${./patch-npm-packages.proj}" \
src/aspnetcore/eng/SourceBuild.props
''
+ lib.optionalString (lib.versionAtLeast version "9") ''
# https://github.com/dotnet/source-build/issues/3131#issuecomment-2030215805
substituteInPlace \
src/aspnetcore/eng/Dependencies.props \
--replace-fail \
"'\$(DotNetBuildSourceOnly)' == 'true'" \
"'\$(DotNetBuildSourceOnly)' == 'true' and \$(PortableBuild) == 'false'"
''
+ lib.optionalString isLinux ''
substituteInPlace \
src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c \
@ -218,7 +257,7 @@ in stdenv.mkDerivation rec {
--replace-warn 'libicuucName[64]' 'libicuucName[256]' \
--replace-warn 'libicui18nName[64]' 'libicui18nName[256]'
''
+ lib.optionalString isDarwin ''
+ lib.optionalString isDarwin (''
substituteInPlace \
src/runtime/src/mono/CMakeLists.txt \
src/runtime/src/native/libs/System.Globalization.Native/CMakeLists.txt \
@ -229,6 +268,25 @@ in stdenv.mkDerivation rec {
src/sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets \
--replace-fail '/usr/bin/codesign' '${sigtool}/bin/codesign'
# fix: strip: error: unknown argument '-n'
substituteInPlace \
src/runtime/eng/native/functions.cmake \
--replace-fail ' -no_code_signature_warning' ""
# [...]/installer.singlerid.targets(434,5): error MSB3073: The command "pkgbuild [...]" exited with code 127
xmlstarlet ed \
--inplace \
-s //Project -t elem -n PropertyGroup \
-s \$prev -t elem -n SkipInstallerBuild -v true \
src/runtime/Directory.Build.props
''
+ lib.optionalString (lib.versionAtLeast version "9") ''
# fix: strip: error: unknown argument '-n'
substituteInPlace \
src/runtime/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets \
--replace-fail ' -no_code_signature_warning' ""
''
+ lib.optionalString (lib.versionOlder version "9") ''
# [...]/build.proj(123,5): error : Did not find PDBs for the following SDK files:
# [...]/build.proj(123,5): error : sdk/8.0.102/System.Resources.Extensions.dll
# [...]/build.proj(123,5): error : sdk/8.0.102/System.CodeDom.dll
@ -236,27 +294,8 @@ in stdenv.mkDerivation rec {
# [...]/build.proj(123,5): error : sdk/8.0.102/FSharp/System.CodeDom.dll
substituteInPlace \
build.proj \
--replace-warn 'FailOnMissingPDBs="true"' 'FailOnMissingPDBs="false"'
# [...]/installer.singlerid.targets(434,5): error MSB3073: The command "pkgbuild [...]" exited with code 127
xmlstarlet ed \
--inplace \
-s //Project -t elem -n PropertyGroup \
-s \$prev -t elem -n InnerBuildArgs -v '$(InnerBuildArgs) /p:SkipInstallerBuild=true' \
src/runtime/eng/SourceBuild.props
# fixes swift errors, see sandboxProfile
# <unknown>:0: error: unable to open output file '/var/folders/[...]/C/clang/ModuleCache/[...]/SwiftShims-[...].pcm': 'Operation not permitted'
# <unknown>:0: error: could not build Objective-C module 'SwiftShims'
substituteInPlace \
src/runtime/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt \
--replace-fail 'xcrun swiftc' 'xcrun swiftc -module-cache-path "$ENV{HOME}/.cache/module-cache"'
# fix: strip: error: unknown argument '-n'
substituteInPlace \
src/runtime/eng/native/functions.cmake \
--replace-fail ' -no_code_signature_warning' ""
'';
--replace-fail 'FailOnMissingPDBs="true"' 'FailOnMissingPDBs="false"'
'');
prepFlags = [
"--no-artifacts"
@ -276,6 +315,11 @@ in stdenv.mkDerivation rec {
runHook postConfigure
'';
postConfigure = lib.optionalString (lib.versionAtLeast version "9") ''
# see patch-npm-packages.proj
typeset -f isScript patchShebangs > src/aspnetcore/patch-shebangs.sh
'';
dontUseCmakeConfigure = true;
# https://github.com/NixOS/nixpkgs/issues/38991
@ -287,6 +331,11 @@ in stdenv.mkDerivation rec {
"--with-packages" dotnetSdk.artifacts
"--clean-while-building"
"--release-manifest" releaseManifestFile
]
++ lib.optionals (lib.versionAtLeast version "9") [
"--source-build"
]
++ [
"--"
"-p:PortableBuild=true"
] ++ lib.optional (targetRid != buildRid) "-p:TargetRid=${targetRid}";
@ -300,20 +349,25 @@ in stdenv.mkDerivation rec {
# CLR_CC/CXX need to be set to stop the build system from using clang-11,
# which is unwrapped
# dotnet needs to be in PATH to fix:
# src/sdk/eng/restore-toolset.sh: line 114: /nix/store/[...]-dotnet-sdk-9.0.100-preview.2.24157.14//.version: Read-only file system
version= \
CLR_CC=$(command -v clang) \
CLR_CXX=$(command -v clang++) \
PATH=$PWD/.dotnet:$PATH \
./build.sh $buildFlags
runHook postBuild
'';
installPhase = ''
installPhase = let
assets = if (lib.versionAtLeast version "9") then "assets" else targetArch;
in ''
runHook preInstall
mkdir "$out"
pushd "artifacts/${targetArch}/Release"
pushd "artifacts/${assets}/Release"
for archive in *.tar.gz; do
target=$out/''${archive%.tar.gz}
mkdir "$target"