Skip to content

Commit

Permalink
Merge pull request #159975 from fgaz/vengi-tools/0.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin authored Feb 14, 2022
2 parents 69a4d38 + 97879bb commit 736ba9a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
26 changes: 3 additions & 23 deletions pkgs/applications/graphics/vengi-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,15 @@

stdenv.mkDerivation rec {
pname = "vengi-tools";
version = "0.0.17";
version = "0.0.18";

src = fetchFromGitHub {
owner = "mgerhardy";
repo = "vengi";
rev = "v${version}";
sha256 = "sha256-h+R9L0BBD3NSFWUh43g4V2LBcNyqVInBeJiOLY03nRk=";
sha256 = "sha256-Ur1X5FhOa87jbjWBXievBfCHW+qP/8bqLiyKAC8+KU4=";
};

# Patch from the project's author for fixing an issue with AnimationShaders.h
# not being included when turning off some components
patches = [(writeText "vengi-tools-fix-build.patch" ''
diff --git a/src/modules/voxelworldrender/CMakeLists.txt b/src/modules/voxelworldrender/CMakeLists.txt
index aebe5f97b..903e62b37 100644
--- a/src/modules/voxelworldrender/CMakeLists.txt
+++ b/src/modules/voxelworldrender/CMakeLists.txt
@@ -27,7 +27,7 @@ set(FILES
voxel/models/plants/3.qb
voxel/models/plants/4.qb
)
-engine_add_module(TARGET ''${LIB} SRCS ''${SRCS} ''${SRCS_SHADERS} FILES ''${FILES} DEPENDENCIES frontend voxelrender)
+engine_add_module(TARGET ''${LIB} SRCS ''${SRCS} ''${SRCS_SHADERS} FILES ''${FILES} DEPENDENCIES animation frontend voxelrender)
generate_shaders(''${LIB} world water postprocess)
set(TEST_SRCS
'')];

nativeBuildInputs = [
cmake
pkg-config
Expand Down Expand Up @@ -105,9 +87,7 @@ stdenv.mkDerivation rec {
'';

passthru.tests = {
# There used to be a roundtrip test here, but it started failing on 0.0.17
# Relevant upstream ticket:
# https://github.com/mgerhardy/vengi/issues/113
voxconvert-roundtrip = callPackage ./test-voxconvert-roundtrip.nix {};
voxconvert-all-formats = callPackage ./test-voxconvert-all-formats.nix {};
run-voxedit = nixosTests.vengi-tools;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ stdenv
, vengi-tools
}:

stdenv.mkDerivation {
name = "vengi-tools-test-voxconvert-roundtrip";
meta.timeout = 10;
buildCommand = ''
${vengi-tools}/bin/vengi-voxconvert --input ${vengi-tools}/share/vengi-voxedit/chr_knight.qb --output chr_knight.vox
${vengi-tools}/bin/vengi-voxconvert --input chr_knight.vox --output chr_knight.qb
${vengi-tools}/bin/vengi-voxconvert --input chr_knight.qb --output chr_knight1.vox
diff chr_knight.vox chr_knight1.vox
touch $out
'';
}

0 comments on commit 736ba9a

Please sign in to comment.