{ lib, pkgs, ... }: { programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ # provide compiler libraries and tools stdenv.cc.cc.lib stdenv.cc.cc alsa-lib at-spi2-atk at-spi2-core atk cairo cups curl dbus expat fontconfig freetype fuse3 gdk-pixbuf glib gtk3 icu libjack2 libGL libappindicator-gtk3 libdrm libglvnd libnotify libpulseaudio libunwind libusb1 libuuid libxkbcommon libxml2 mesa nspr nss openssl pango pipewire systemd vulkan-loader xorg.libX11 xorg.libXScrnSaver xorg.libXcomposite xorg.libXcursor xorg.libXdamage xorg.libXext xorg.libXfixes xorg.libXi xorg.libXrandr xorg.libXrender xorg.libXtst xorg.libxcb xorg.libxkbfile 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 [ ]; }; }