summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2025-02-08 01:40:37 +0100
committerMel <einebeere@gmail.com>2025-02-08 01:40:37 +0100
commite00b6a5cdf05bee1de783ebbed6378db179ebeb1 (patch)
treec832623780e3770b07d969636cbb372c0ef10641 /modules
parent7fb42afa6e056dd0161469996ad46858e51caead (diff)
downloadminerals-e00b6a5cdf05bee1de783ebbed6378db179ebeb1.tar.zst
minerals-e00b6a5cdf05bee1de783ebbed6378db179ebeb1.zip
Wipe LD_LIBRARY_PATH so nix-ld can ignore it completely, fixing some dynamic library loading
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/nix-ld.nix14
1 files changed, 13 insertions, 1 deletions
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 [ ];
+  };
 }