fix gltfpack not found for nix build

This commit is contained in:
Robin Appelman 2023-12-26 21:43:08 +01:00
commit 1161fcf2ad
2 changed files with 5 additions and 3 deletions

View file

@ -103,7 +103,7 @@
preConfigure = '' preConfigure = ''
cargo_build_options="--features server $cargo_build_options" cargo_build_options="--features server $cargo_build_options"
''; '';
buildInputs = with pkgs; [meshoptimizer]; GLTFPACK = "${pkgs.meshoptimizer}/bin/gltfpack";
}); });
assets = pkgs.fetchSteam { assets = pkgs.fetchSteam {
name = "tf2-vpks"; name = "tf2-vpks";

View file

@ -10,7 +10,9 @@ pub async fn pack(map: &str, data: &[u8]) -> Result<Vec<u8>> {
input.write_all(data).await?; input.write_all(data).await?;
let out = Command::new("gltfpack") let pack_cmd = option_env!("GLTFPACK").unwrap_or("gltfpack");
let out = Command::new(pack_cmd)
.arg("-kn") .arg("-kn")
.arg("-mm") .arg("-mm")
.arg("-tc") .arg("-tc")