From 017561209e933f3de086e04211dc48cf37d1ee82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 1 Sep 2017 12:24:47 +0200 Subject: [PATCH] chromium: try to hack around Hydra problems Discussion: https://github.com/NixOS/nixpkgs/commit/e8f1ddcbd1d --- pkgs/applications/networking/browsers/chromium/common.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 7802e1bf1b56..33b8ee220ba2 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -228,9 +228,14 @@ let ''; buildPhase = let + # Build paralelism: on Hydra the build was frequently running into memory + # exhaustion, and even other users might be running into similar issues. + # -j is halved to avoid memory problems, and -l is slightly increased + # so that the build gets slight preference before others + # (it will often be on "critical path" and at risk of timing out) buildCommand = target: '' ninja -C "${buildPath}" \ - -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \ + -j$(( ($NIX_BUILD_CORES+1) / 2 )) -l$(( $NIX_BUILD_CORES+1 )) \ "${target}" '' + optionalString (target == "mksnapshot" || target == "chrome") '' paxmark m "${buildPath}/${target}"