From 6fe44ff4f2c9a739aa01d9e08280b08bc65602d2 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 21 Aug 2025 09:01:06 +0200 Subject: [PATCH] recastnavigation: fix for CMake v4 while here: - update catch to catch2_3 - remove patches fixed upstream - remove use of "with lib;" --- pkgs/by-name/re/recastnavigation/package.nix | 29 ++++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/re/recastnavigation/package.nix b/pkgs/by-name/re/recastnavigation/package.nix index b93d17aecbb9..716c577b8b44 100644 --- a/pkgs/by-name/re/recastnavigation/package.nix +++ b/pkgs/by-name/re/recastnavigation/package.nix @@ -6,31 +6,23 @@ libGL, SDL2, libGLU, - catch, + catch2_3, }: stdenv.mkDerivation { pname = "recastai"; - # use latest revision for the CMake build process and OpenMW + # use latest revision for CMake v4 # OpenMW use e75adf86f91eb3082220085e42dda62679f9a3ea - version = "unstable-2023-01-02"; + version = "unstable-2025-08-12"; src = fetchFromGitHub { owner = "recastnavigation"; repo = "recastnavigation"; - rev = "405cc095ab3a2df976a298421974a2af83843baf"; - sha256 = "sha256-WVzDI7+UuAl10Tm1Zjkea/FMk0cIe7pWg0iyFLbwAdI="; + rev = "40ec6fcd6c0263a3d7798452aee531066072d15d"; + hash = "sha256-4flJMJsuCecpHDtgAsnDU7WoAtUg/XJfRXx096Zw6bE="; }; - postPatch = '' - cp ${catch}/include/catch/catch.hpp Tests/catch.hpp - - # https://github.com/recastnavigation/recastnavigation/issues/524 - substituteInPlace CMakeLists.txt \ - --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \ - --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} - '' - + lib.optionalString stdenv.hostPlatform.isDarwin '' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' # Expects SDL2.framework in specific location, which we don't have # Change where SDL2 headers are searched for to match what we do have substituteInPlace RecastDemo/CMakeLists.txt \ @@ -40,6 +32,7 @@ stdenv.mkDerivation { doCheck = true; nativeBuildInputs = [ cmake ]; + checkInputs = [ catch2_3 ]; buildInputs = [ libGL @@ -47,12 +40,12 @@ stdenv.mkDerivation { libGLU ]; - meta = with lib; { + meta = { homepage = "https://github.com/recastnavigation/recastnavigation"; description = "Navigation-mesh Toolset for Games"; mainProgram = "RecastDemo"; - license = licenses.zlib; - maintainers = with maintainers; [ marius851000 ]; - platforms = platforms.all; + license = lib.licenses.zlib; + maintainers = with lib.maintainers; [ marius851000 ]; + platforms = lib.platforms.all; }; }