From 9434136df388462ad7562f16b78cd94ff8a3c5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 21 Mar 2023 09:52:12 +0100 Subject: [PATCH] ninja: patch issues on 32-bit platforms Fixes #68241 > Value too large for defined data type https://hydra.nixos.org/build/213266252 --- pkgs/development/tools/build-managers/ninja/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix index 84897e43f786..7c2c79bf9e92 100644 --- a/pkgs/development/tools/build-managers/ninja/default.nix +++ b/pkgs/development/tools/build-managers/ninja/default.nix @@ -38,6 +38,15 @@ stdenv.mkDerivation rec { libxslt.bin ]; + patches = lib.optionals stdenv.is32bit [ + # Otherwise ninja may fail on some files in a larger FS. + (fetchpatch { + name = "stat64.patch"; + url = "https://github.com/ninja-build/ninja/commit/7bba11ae704efc84cac5fde5e9be53f653f237d1.diff"; + hash = "sha256-tINS57xLh1lwnYFWCQs5OudfgtIShaOh5zbmv7w5BnQ="; + }) + ]; + postPatch = '' # write rebuild args to file after bootstrap substituteInPlace configure.py --replace "subprocess.check_call(rebuild_args)" "open('rebuild_args','w').write(rebuild_args[0])"