alacritty: --add-rpath instead of --set-rpath

As reported by @blucoat in
https://github.com/NixOS/nixpkgs/issues/219213 alacritty's RPATH is
missing many of the libraries which it links to, including for
example glibc.

The problem was diagnosed by @kchibisov as being caused by
alacritty's use of `--set-rpath` (which completely replaces the
rpath) instead of `--add-rpath` (which adds additional entries to
the rpath):

  https://github.com/NixOS/nixpkgs/issues/219213#issuecomment-1507655801

This commit implements @kchibisov's idea to change `--set-rpath` to
`--add-rpath`:

  https://github.com/NixOS/nixpkgs/issues/219213#issuecomment-1507691822

Closes #219213
This commit is contained in:
Adam Joseph 2023-06-30 11:16:28 -07:00
parent 05b84a2b83
commit 64d0029e28

View File

@ -104,7 +104,7 @@ rustPlatform.buildRustPackage rec {
# As a workaround, strip manually before running patchelf.
$STRIP -S $out/bin/alacritty
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
''
) + ''