diff --git a/pkgs/development/compilers/dotnet/patch-nupkgs.nix b/pkgs/development/compilers/dotnet/patch-nupkgs.nix index 7f3f1d2643f4..572211b1b378 100644 --- a/pkgs/development/compilers/dotnet/patch-nupkgs.nix +++ b/pkgs/development/compilers/dotnet/patch-nupkgs.nix @@ -54,6 +54,14 @@ in writeShellScriptBin "patch-nupkgs" '' patchelf \ --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \ "$tmp" ||: + # This makes sure that if the binary requires some specific runtime dependencies, it can find it. + # This fixes dotnet-built binaries like crossgen2 + patchelf \ + --add-needed libicui18n.so \ + --add-needed libicuuc.so \ + --add-needed libz.so \ + --add-needed libssl.so \ + "$tmp" patchelf \ --add-rpath "${binaryRPath}" \ "$tmp" ||: