From e00b6a5cdf05bee1de783ebbed6378db179ebeb1 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Feb 2025 01:40:37 +0100 Subject: Wipe LD_LIBRARY_PATH so nix-ld can ignore it completely, fixing some dynamic library loading Signed-off-by: Mel --- modules/nix-ld.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/nix-ld.nix b/modules/nix-ld.nix index 28a3966..c1fb6cf 100644 --- a/modules/nix-ld.nix +++ b/modules/nix-ld.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: { programs.nix-ld.enable = true; @@ -24,6 +24,7 @@ glib gtk3 icu + libjack2 libGL libappindicator-gtk3 libdrm @@ -59,4 +60,15 @@ xorg.libxshmfence zlib ]; + + # nix-ld really likes honoring the LD_LIRBARY_PATH, + # which is set by the pipewire module for `libjack2`. + # this makes it useless for most applications. + # + # make sure that no one sets LD_LIBRARY_PATH and that + # nix-ld can handle the entirety of dynamic object loading. + # NOTE: this should probably be upstreamed somewhere... + environment.sessionVariables = { + LD_LIBRARY_PATH = lib.mkForce [ ]; + }; } -- cgit 1.4.1