alacritty: use patchelf instead of LD_LIBRARY_PATH
If we use LD_LIBRARY_PATH then anything typed into Alacritty inherits it. This
breaks a lot of applications if the versions are different. For me this breaks
everything from Git to every program which uses Gtk.
commit9aafecd28bfe93cb012d6274f001c8dedaa4d937
authorBrian McKenna <bmckenna@atlassian.com>
dateSat 29 Jul 2017, 21:41 (9 years ago)
parent321438d
pkgs/applications/misc/alacritty/default.nix+15−9
@@ -16,6 +16,18 @@
1616
1717with rustPlatform;
1818
19+let
20+ rpathLibs = [
21+ expat
22+ freetype
23+ fontconfig
24+ libX11
25+ libXcursor
26+ libXxf86vm
27+ libXi
28+ ];
29+in
30+
1931buildRustPackage rec {
2032 name = "alacritty-unstable-2017-07-25";
2133
@@ -31,25 +43,19 @@ buildRustPackage rec {
3143 buildInputs = [
3244 cmake
3345 makeWrapper
34− freetype
35− fontconfig
3646 xclip
3747 pkgconfig
38− expat
39− libX11
40− libXcursor
41− libXxf86vm
42− libXi
43− ];
48+ ] ++ rpathLibs;
4449
4550 installPhase = ''
4651 mkdir -p $out/bin
4752 for f in $(find target/release -maxdepth 1 -type f); do
4853 cp $f $out/bin
4954 done;
50− wrapProgram $out/bin/alacritty --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath buildInputs}"
55+ patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
5156 '';
5257
58+ dontPatchELF = true;
5359
5460 meta = with stdenv.lib; {
5561 description = "GPU-accelerated terminal emulator";