about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorCharlotte Van Petegem <charlotte.vanpetegem@ugent.be>2022-08-05 13:37:48 +0200
committerCharlotte Van Petegem <charlotte.vanpetegem@ugent.be>2022-08-05 13:59:58 +0200
commit70c49766aff96c3c2957bb44a3e16fe84019f5c1 (patch)
tree6c389ef0226ee5baae0a71a2f17deef1c9a434f7 /pkgs/games
parent6f73b0ca7225f532879c8d6b13d8cdebf143eeb3 (diff)
zeroad: apply patch to fix build with gcc 11 and glibc 2.35
0ad defines a variabel M_PIf, which is also included in math.h since gcc 11. This leads to the following build failure: https://hydra.nixos.org/build/186330284
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/0ad/game.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix
index 34a2cdddac820..e51aab519a490 100644
--- a/pkgs/games/0ad/game.nix
+++ b/pkgs/games/0ad/game.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, perl, fetchurl, python3, fmt, libidn
+{ stdenv, lib, fetchpatch, perl, fetchurl, python3, fmt, libidn
 , pkg-config, spidermonkey_78, boost, icu, libxml2, libpng, libsodium
 , libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc
 , openal, libGLU, libGL, xorgproto, libX11, libXcursor, nspr, SDL2
@@ -50,7 +50,14 @@ stdenv.mkDerivation rec {
     "-I${fmt.dev}/include"
   ];
 
-  patches = [ ./rootdir_env.patch ];
+  patches = [
+    ./rootdir_env.patch
+    (fetchpatch {
+      # fix build with gcc11 and glibc 2.35
+      url = "https://github.com/0ad/0ad/commit/7df614338cbd41f5e254ce75f649490b2637e1d0.patch";
+      hash = "sha256-QZvcNm8Zni3aJnMPueft0OITf8zeMDXWBjOLYoirJs0=";
+    })
+  ];
 
   configurePhase = ''
     # Delete shipped libraries which we don't need.