about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2024-02-11 10:33:08 +0000
committerSergei Trofimovich <slyich@gmail.com>2024-02-11 10:33:08 +0000
commit2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973 (patch)
tree2fb8b9f4b1e54affddeac67f73f8d51b720d9782 /pkgs/games
parentef6206934d5726ed9315ac78879f5ba2a6b55785 (diff)
downloadnixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar.gz
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar.bz2
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar.lz
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar.xz
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.tar.zst
nixlib-2f76c2ee8bfa8d2ed412b6d14fc4f5c43a61a973.zip
the-powder-toy: fix `gcc-13` build failure
Without the change build fails on `master` as
https://hydra.nixos.org/build/248966234:

    ../src/graphics/FontReader.cpp: In function 'bool InitFontData()':
    ../src/graphics/FontReader.cpp:40:52: error: 'uint32_t' does not name a type
       40 |                 auto codePoint = *reinterpret_cast<uint32_t *>(ptr) & 0xFFFFFFU;
          |                                                    ^~~~~~~~
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/the-powder-toy/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/games/the-powder-toy/default.nix b/pkgs/games/the-powder-toy/default.nix
index c1c9415b90df..2cb972344fd6 100644
--- a/pkgs/games/the-powder-toy/default.nix
+++ b/pkgs/games/the-powder-toy/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , meson
 , ninja
 , pkg-config
@@ -27,6 +28,16 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-LYohsqFU9LBgTXMaV6cf8/zf3fBvT+s5A1JBpPHekH8=";
   };
 
+  patches = [
+    # Fix gcc-13 build failure:
+    #   https://github.com/The-Powder-Toy/The-Powder-Toy/pull/898
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/The-Powder-Toy/The-Powder-Toy/commit/162bce9a1036e0c233399941410364c4a4370980.patch";
+      hash = "sha256-oQNwKemV3BjMLSUd6zMCKqiClcc3Ouxwn3jagf/Q1/I=";
+    })
+  ];
+
   nativeBuildInputs = [ meson ninja pkg-config python3 ];
 
   buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib jsoncpp libpng ]