From 9fa4a14d5414922e13438190d2a992404bfc437b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Apr 2025 16:44:25 +0200 Subject: [PATCH] Refactor flake.nix to use LD_LIBRARY_PATH for dependencies. Replaced direct buildInputs with LD_LIBRARY_PATH configuration to streamline dependency handling. This makes library paths explicitly managed and simplifies runtime linking for the required packages. Updated the devShells configuration accordingly. --- flake.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index b827459..93a25da 100644 --- a/flake.nix +++ b/flake.nix @@ -14,15 +14,22 @@ ... }: extendDerivations { + env.LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${ + with pkgs; + pkgs.lib.makeLibraryPath [ + xorg.libX11 + xorg.libXcursor + xorg.libXi + libxkbcommon + xorg.libxcb + pkgs.vulkan-loader + pkgs.glfw + ] + }"; buildInputs = with pkgs; [ pkgs.pkg-config pkgs.alsa-lib.dev pkgs.udev.dev - xorg.libX11 - xorg.libXcursor - xorg.libxcb - xorg.libXi - libxkbcommon ]; } devShells;