Skip to content

Commit a4d88ee

Browse files
authored
Merge pull request #236229 from trofi/gnugrep-parallel
gnugrep: enable parallel build and tests
2 parents b7d4899 + bf442ea commit a4d88ee

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

pkgs/tools/text/gnugrep/default.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ stdenv.mkDerivation {
1616
hash = "sha256-HbKu3eidDepCsW2VKPiUyNFdrk4ZC1muzHj1qVEnbqs=";
1717
};
1818

19-
# Some gnulib tests fail on Musl: https://github.com/NixOS/nixpkgs/pull/228714
20-
postPatch = if stdenv.hostPlatform.isMusl then ''
19+
# Some gnulib tests fail
20+
# - on Musl: https://github.com/NixOS/nixpkgs/pull/228714
21+
# - on x86_64-darwin: https://github.com/NixOS/nixpkgs/pull/228714#issuecomment-1576826330
22+
postPatch = if stdenv.hostPlatform.isMusl || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then ''
2123
sed -i 's:gnulib-tests::g' Makefile.in
2224
'' else null;
2325

@@ -28,14 +30,17 @@ stdenv.mkDerivation {
2830

2931
# cygwin: FAIL: multibyte-white-space
3032
# freebsd: FAIL mb-non-UTF8-performance
31-
doCheck = !stdenv.isCygwin && !stdenv.isFreeBSD;
33+
# x86_64-darwin: fails 'stack-overflow' tests on Rosetta 2 emulator
34+
doCheck = !stdenv.isCygwin && !stdenv.isFreeBSD && !(stdenv.isDarwin && stdenv.hostPlatform.isx86_64);
3235

3336
# On macOS, force use of mkdir -p, since Grep's fallback
3437
# (./install-sh) is broken.
3538
preConfigure = ''
3639
export MKDIR_P="mkdir -p"
3740
'';
3841

42+
enableParallelBuilding = true;
43+
3944
# Fix reference to sh in bootstrap-tools, and invoke grep via
4045
# absolute path rather than looking at argv[0].
4146
postInstall =

0 commit comments

Comments
 (0)