From f60b221629b72265f04fd3ede48ce052bbedc18d Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Jul 2019 01:21:16 +0100 Subject: [PATCH] blockbook: increase ulimit -n on darwin for packr execution macos default can cause build failures due to too many open files --- pkgs/servers/blockbook/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/blockbook/default.nix b/pkgs/servers/blockbook/default.nix index 6a1d8a75cc1a..b95c3d41b396 100644 --- a/pkgs/servers/blockbook/default.nix +++ b/pkgs/servers/blockbook/default.nix @@ -1,4 +1,5 @@ -{ buildGoPackage +{ stdenv +, buildGoPackage , lib , fetchFromGitHub , rocksdb @@ -30,7 +31,9 @@ buildGoPackage rec { nativeBuildInputs = [ pkg-config packr ]; - preBuild = '' + preBuild = lib.optionalString stdenv.isDarwin '' + ulimit -n 8192 + '' + '' export CGO_CFLAGS="-I${rocksdb}/include" export CGO_LDFLAGS="-L${rocksdb}/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4" packr clean && packr