From e175845d6171778ff49b615b5ed7a08dda1387b4 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sun, 23 Jan 2022 15:36:47 +0100 Subject: [PATCH] vengi-tools: 0.0.14 -> 0.0.17 --- .../graphics/vengi-tools/default.nix | 30 ++++++++++++++++--- .../vengi-tools/test-voxconvert-roundtrip.nix | 6 ++-- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/graphics/vengi-tools/default.nix b/pkgs/applications/graphics/vengi-tools/default.nix index 00b3d80adf04..96d3c35cb278 100644 --- a/pkgs/applications/graphics/vengi-tools/default.nix +++ b/pkgs/applications/graphics/vengi-tools/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchFromGitHub , fetchurl +, writeText , cmake , pkg-config @@ -18,6 +19,7 @@ , libuuid , wayland-protocols , Carbon +, CoreServices # optionals , opencl-headers , OpenCL @@ -39,15 +41,33 @@ let cmake3_22 = cmake.overrideAttrs (old: { in stdenv.mkDerivation rec { pname = "vengi-tools"; - version = "0.0.14"; + version = "0.0.17"; src = fetchFromGitHub { owner = "mgerhardy"; repo = "engine"; rev = "v${version}"; - sha256 = "sha256-v82hKskTSwM0NDgLVHpHZNRQW6tWug4pPIt91MrUwUo="; + sha256 = "sha256-h+R9L0BBD3NSFWUh43g4V2LBcNyqVInBeJiOLY03nRk="; }; + # 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 = [ cmake3_22 pkg-config @@ -69,7 +89,7 @@ in stdenv.mkDerivation rec { #libpqxx #mosquitto ] ++ lib.optional stdenv.isLinux wayland-protocols - ++ lib.optionals stdenv.isDarwin [ Carbon OpenCL ] + ++ lib.optionals stdenv.isDarwin [ Carbon CoreServices OpenCL ] ++ lib.optional (!stdenv.isDarwin) opencl-headers; cmakeFlags = [ @@ -82,7 +102,7 @@ in stdenv.mkDerivation rec { "-DGAMES=OFF" "-DMAPVIEW=OFF" "-DAIDEBUG=OFF" - ]; + ] ++ lib.optional stdenv.isDarwin "-DCORESERVICES_LIB=${CoreServices}"; # Set the data directory for each executable. We cannot set it at build time # with the PKGDATADIR cmake variable because each executable needs a specific @@ -115,5 +135,7 @@ in stdenv.mkDerivation rec { license = [ licenses.mit licenses.cc-by-sa-30 ]; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; + # Requires SDK 10.14 https://github.com/NixOS/nixpkgs/issues/101229 + broken = stdenv.isDarwin && stdenv.isx86_64; }; } diff --git a/pkgs/applications/graphics/vengi-tools/test-voxconvert-roundtrip.nix b/pkgs/applications/graphics/vengi-tools/test-voxconvert-roundtrip.nix index 27b0305615a8..3d324d2c38d4 100644 --- a/pkgs/applications/graphics/vengi-tools/test-voxconvert-roundtrip.nix +++ b/pkgs/applications/graphics/vengi-tools/test-voxconvert-roundtrip.nix @@ -6,9 +6,9 @@ stdenv.mkDerivation { name = "vengi-tools-test-voxconvert-roundtrip"; meta.timeout = 10; buildCommand = '' - ${vengi-tools}/bin/vengi-voxconvert ${vengi-tools}/share/vengi-voxedit/chr_knight.qb chr_knight.vox - ${vengi-tools}/bin/vengi-voxconvert chr_knight.vox chr_knight.qb - ${vengi-tools}/bin/vengi-voxconvert chr_knight.qb chr_knight1.vox + ${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 ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf403030224f..88c0e971fac0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29238,7 +29238,7 @@ with pkgs; vdpauinfo = callPackage ../tools/X11/vdpauinfo { }; vengi-tools = callPackage ../applications/graphics/vengi-tools { - inherit (darwin.apple_sdk.frameworks) Carbon OpenCL; + inherit (darwin.apple_sdk.frameworks) Carbon CoreServices OpenCL; }; verbiste = callPackage ../applications/misc/verbiste {