darwin.bsdmake: fix for systems with non-standard RLIMIT_NOFILE

This commit is contained in:
Dmitry Kalinkin 2022-05-15 10:53:50 -04:00
parent a41870fcba
commit df2ded87a3
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

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 = ''