From 4b7a8b4a797467d1544bac3d81b7956caa7e0a74 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 10 Feb 2024 21:59:43 +0000 Subject: [PATCH] reactphysics3d: fix `gcc-13` build failure Without the change build fails in `master` as https://hydra.nixos.org/build/247669747: In file included from /build/source/include/reactphysics3d/engine/Entity.h:30, from /build/source/include/reactphysics3d/body/CollisionBody.h:31, from /build/source/src/body/CollisionBody.cpp:27: /build/source/include/reactphysics3d/configuration.h:68:19: error: 'int8_t' in namespace 'std' does not name a type; did you mean 'wint_t'? 68 | using int8 = std::int8_t; | ^~~~~~ | wint_t --- pkgs/by-name/re/reactphysics3d/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/re/reactphysics3d/package.nix b/pkgs/by-name/re/reactphysics3d/package.nix index f775d7d54240..4e69b9b41cb9 100644 --- a/pkgs/by-name/re/reactphysics3d/package.nix +++ b/pkgs/by-name/re/reactphysics3d/package.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: stdenv.mkDerivation (finalAttrs: { pname = "reactphysics3d"; @@ -11,6 +11,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-AUdsUXsygsGfS8H+AHEV1fSrrX7zGmfsaTONYUG3zqk="; }; + patches = [ + # Fix gcc-13 build failure: + # https://github.com/DanielChappuis/reactphysics3d/pull/371 + (fetchpatch { + name ="gcc-13.patch"; + url = "https://github.com/DanielChappuis/reactphysics3d/commit/9335856664fdc3bd1073209f0b4f6eae24c35848.patch"; + hash = "sha256-pCiAHfv66tbE8+hpVvjS22jLi7I+pPofSy8w7eWEp9o="; + }) + ]; + nativeBuildInputs = [ cmake ]; meta = with lib; {