diff options
Diffstat (limited to 'alacritty')
-rw-r--r-- | alacritty/default.nix | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/alacritty/default.nix b/alacritty/default.nix index e9a955d..9350884 100644 --- a/alacritty/default.nix +++ b/alacritty/default.nix @@ -57,27 +57,20 @@ alacritty = pkgs.writeShellScriptBin "alacritty" '' set -e -x - host_ld_lib_path="$( - ldconfig -v 2>/dev/null \ - | grep -v ^$'\t' \ - | tr -s ':\n' ':' \ - | head -c-1 \ - )" + source "${pkgs.ldUtils}" - bin_ld_lib_path="$( - objdump -x ${pkgs.alacritty}/bin/alacritty \ - | grep "RUNPATH" \ - | awk '{print $2}' \ - )" + host_ld_lib_path="$(host_ld_lib_path)" host_dri_path="$( - echo "$host_ld_lib_path" \ + echo "$host_lib_path" \ | tr -s ':' '\n' \ | while read d; do if [ -d "$d/dri" ]; then echo "$d"/dri; fi; done \ | tr '\n' ':' \ | head -c-1 )" + bin_ld_lib_path="$(bin_ld_lib_path "${pkgs.alacritty}/bin/alacritty")" + # overwrite LD_LIBRARY_PATH such that the binary's ld search path is still # searched first, but afterwards the host's ld search path is looked # through. Similarly, the dri paths are set to be the hosts. This allows us |