lol

dotnet: patch apphost as well as singlefilehost

This fixes library loading in self-contained builds.

+7 -4
+7 -4
pkgs/development/compilers/dotnet/build-dotnet.nix
··· 25 25 , writeShellScript 26 26 , mkNugetDeps 27 27 , callPackage 28 + , dotnetCorePackages 28 29 }: 29 30 30 31 let ··· 43 44 }; 44 45 45 46 mkCommon = callPackage ./common.nix {}; 47 + 48 + targetRid = dotnetCorePackages.systemToDotnetRid stdenv.targetPlatform.system; 46 49 47 50 in 48 51 mkCommon type rec { ··· 88 91 89 92 # Tell autoPatchelf about runtime dependencies. 90 93 # (postFixup phase is run before autoPatchelfHook.) 91 - postFixup = lib.optionalString stdenv.isLinux '' 94 + postFixup = lib.optionalString stdenv.targetPlatform.isLinux '' 92 95 patchelf \ 93 96 --add-needed libicui18n.so \ 94 97 --add-needed libicuuc.so \ 95 98 $out/shared/Microsoft.NETCore.App/*/libcoreclr.so \ 96 99 $out/shared/Microsoft.NETCore.App/*/*System.Globalization.Native.so \ 97 - $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost 100 + $out/packs/Microsoft.NETCore.App.Host.${targetRid}/*/runtimes/${targetRid}/native/*host 98 101 patchelf \ 99 102 --add-needed libgssapi_krb5.so \ 100 103 $out/shared/Microsoft.NETCore.App/*/*System.Net.Security.Native.so \ 101 - $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost 104 + $out/packs/Microsoft.NETCore.App.Host.${targetRid}/*/runtimes/${targetRid}/native/*host 102 105 patchelf \ 103 106 --add-needed libssl.so \ 104 107 $out/shared/Microsoft.NETCore.App/*/*System.Security.Cryptography.Native.OpenSsl.so \ 105 - $out/packs/Microsoft.NETCore.App.Host.linux-x64/*/runtimes/linux-x64/native/singlefilehost 108 + $out/packs/Microsoft.NETCore.App.Host.${targetRid}/*/runtimes/${targetRid}/native/*host 106 109 ''; 107 110 108 111 passthru = {