Merge pull request #173152 from veprbl/pr/bsdmake_fix

darwin.bsdmake: fix for systems with non-standard RLIMIT_NOFILE
This commit is contained in:
Dmitry Kalinkin 2022-06-05 12:03:40 -04:00 committed by GitHub
commit 5906c4f6fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,12 @@ appleDerivation {
--replace '-o ''${''${group}OWN_''${.ALLSRC:T}}' "" \
--replace '-g ''${''${group}GRP_''${.ALLSRC:T}}' "" \
--replace '-o ''${''${group}OWN} -g ''${''${group}GRP}' ""
# Workaround for https://github.com/NixOS/nixpkgs/issues/103172
# Prevents bsdmake from failing on systems that already had default limits
# increased.
substituteInPlace main.c \
--replace 'err(2, "setrlimit");' 'warn("setrlimit");'
'';
buildPhase = ''