diff --git a/flake.nix b/flake.nix index c5f717139f..63a2177839 100644 --- a/flake.nix +++ b/flake.nix @@ -165,6 +165,15 @@ }; wrapWithAssets = system: old: let pkgs = inputs.nci.inputs.nixpkgs.legacyPackages.${system}; + runtimeLibs = with pkgs; [ + xorg.libX11 + xorg.libXcursor + xorg.libXrandr + xorg.libXi + vulkan-loader + vulkan-extension-layer + shaderc.lib + ]; assets = pkgs.runCommand "veloren-assets" {} '' mkdir $out ln -sf ${./assets} $out/assets @@ -181,7 +190,9 @@ rm -rf $out/bin mkdir $out/bin ln -sf ${old}/bin/* $out/bin/ - wrapProgram $out/bin/* --set VELOREN_ASSETS ${assets} + wrapProgram $out/bin/* \ + ${lib.optionalString (old.pname == "veloren-voxygen") "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runtimeLibs}"} \ + --set VELOREN_ASSETS ${assets} ''; in wrapped; diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index ea9826dbf7..fb8fcdf8a3 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -18,7 +18,6 @@ It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, This package includes the official client, Voxygen. """ -runtimeLibs = ["libGL", "xorg.libX11", "xorg.libXcursor", "xorg.libXrandr", "xorg.libXi", "vulkan-loader", "vulkan-extension-layer", "shaderc.lib"] [features] hot-anim = ["anim/use-dyn-lib"]