ninja: patch issues on 32-bit platforms

Fixes #68241
> Value too large for defined data type
https://hydra.nixos.org/build/213266252
This commit is contained in:
Vladimír Čunát 2023-03-21 09:52:12 +01:00
parent bb48723d63
commit 9434136df3
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -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])"