From 05a57af1258eaf12f4996d82ea59531f710fe58a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 24 Jan 2024 10:37:36 +0000 Subject: [PATCH] lzwolf: fix the build against `gcc-13` Without the change build fails against `gcc-13` on `master` as https://hydra.nixos.org/build/246520454: In file included from /build/source/src/actor.h:40, from /build/source/src/g_blake/a_smartanim.cpp:36: /build/source/src/gamemap.h:255:64: error: 'std::uint16_t' has not been declared 255 | void OperateConcession(std::uint16_t concession); | ^~~~~~~~ --- pkgs/games/lzwolf/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/games/lzwolf/default.nix b/pkgs/games/lzwolf/default.nix index 37bcc7fc8e06..3f1e37c258a3 100644 --- a/pkgs/games/lzwolf/default.nix +++ b/pkgs/games/lzwolf/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromBitbucket +, fetchpatch , p7zip , cmake , SDL2 @@ -26,6 +27,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-CtBdvk6LXb/ll92Fxig/M4t4QNj8dNFJYd8F99b47kQ="; }; + patches = [ + # Pull fix pending upstream inclusion for `gcc-13` support: + # https://bitbucket.org/linuxwolf6/lzwolf/pull-requests/5 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://bitbucket.org/soturi/lzwolf/commits/41f212026dff4f089d1c0921cb49ab1a2b81e0d6/raw"; + hash = "sha256-EgSdDaZovD7DyZ0BkuX8ZdsrX7J7v8/D6y5P1NWGJew="; + }) + ]; + postPatch = '' # SDL2_net-2.2.0 changed CMake component name slightly. substituteInPlace src/CMakeLists.txt \