diff options
author | Brian McKenna <bmckenna@atlassian.com> | 2017-07-29 21:41:04 +1000 |
---|---|---|
committer | Brian McKenna <bmckenna@atlassian.com> | 2017-07-29 22:29:07 +1000 |
commit | 9aafecd28bfe93cb012d6274f001c8dedaa4d937 (patch) | |
tree | f7ec8fa565554190a246617a2da029d33fa90cd5 /pkgs/applications/misc/alacritty/default.nix | |
parent | 321438d786bb00009f1fdea349eaac4c799c9257 (diff) | |
download | nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar.gz nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar.bz2 nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar.lz nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar.xz nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.tar.zst nixpkgs-9aafecd28bfe93cb012d6274f001c8dedaa4d937.zip |
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.
Diffstat (limited to 'pkgs/applications/misc/alacritty/default.nix')
-rw-r--r-- | pkgs/applications/misc/alacritty/default.nix | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix index a00e0ec8a48..4f072c45144 100644 --- a/pkgs/applications/misc/alacritty/default.nix +++ b/pkgs/applications/misc/alacritty/default.nix @@ -16,6 +16,18 @@ with rustPlatform; +let + rpathLibs = [ + expat + freetype + fontconfig + libX11 + libXcursor + libXxf86vm + libXi + ]; +in + buildRustPackage rec { name = "alacritty-unstable-2017-07-25"; @@ -31,25 +43,19 @@ buildRustPackage rec { buildInputs = [ cmake makeWrapper - freetype - fontconfig xclip pkgconfig - expat - libX11 - libXcursor - libXxf86vm - libXi - ]; + ] ++ rpathLibs; installPhase = '' mkdir -p $out/bin for f in $(find target/release -maxdepth 1 -type f); do cp $f $out/bin done; - wrapProgram $out/bin/alacritty --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath buildInputs}" + patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty ''; + dontPatchELF = true; meta = with stdenv.lib; { description = "GPU-accelerated terminal emulator"; |