mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
build(nix): wrap veloren-voxygen in wrapper derivation
This commit is contained in:
parent
8c4c0c2021
commit
7a2d647400
13
flake.nix
13
flake.nix
@ -165,6 +165,15 @@
|
|||||||
};
|
};
|
||||||
wrapWithAssets = system: old: let
|
wrapWithAssets = system: old: let
|
||||||
pkgs = inputs.nci.inputs.nixpkgs.legacyPackages.${system};
|
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" {} ''
|
assets = pkgs.runCommand "veloren-assets" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
ln -sf ${./assets} $out/assets
|
ln -sf ${./assets} $out/assets
|
||||||
@ -181,7 +190,9 @@
|
|||||||
rm -rf $out/bin
|
rm -rf $out/bin
|
||||||
mkdir $out/bin
|
mkdir $out/bin
|
||||||
ln -sf ${old}/bin/* $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
|
in
|
||||||
wrapped;
|
wrapped;
|
||||||
|
@ -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.
|
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]
|
[features]
|
||||||
hot-anim = ["anim/use-dyn-lib"]
|
hot-anim = ["anim/use-dyn-lib"]
|
||||||
|
Loading…
Reference in New Issue
Block a user