cargo-raze: increase open file descriptors limits for tests on darwin
https://hydra.nixos.org/build/239024688/nixlog/2 https://hydra.nixos.org/build/239009073/nixlog/2 ``` thread '<unnamed>' panicked at 'Cannot build local tokio runtime: Os { code: 24, kind: Uncategorized, message: "Too many open files" }', /private/tmp/nix-build-cargo-raze-0.16.0.drv-0/cargo-raze-0.16.0-vendor.tar.gz/httpmock/src/lib.rs:1436:14 ``` Seems to be a typical darwin failure, some packages already bump file descriptors limit to 1024 (same as default in some Linux distros, default darwin value seems to be 256 these days) Also has a report upstream https://github.com/google/cargo-raze/issues/544 ZHF: #265948
This commit is contained in:
@@ -31,6 +31,12 @@ rustPlatform.buildRustPackage rec {
|
||||
]
|
||||
++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
preCheck = lib.optionalString stdenv.isDarwin ''
|
||||
# Darwin issue: Os { code: 24, kind: Uncategorized, message: "Too many open files" }
|
||||
# https://github.com/google/cargo-raze/issues/544
|
||||
ulimit -n 1024
|
||||
'';
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user