From 722ed87c7b2f7e3d8cce2a26fd0f4b31eb53558f Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 6 Jan 2020 10:52:24 -0500
Subject: [PATCH] Use the correct number of cores

---
 zkapauthorizer.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zkapauthorizer.nix b/zkapauthorizer.nix
index 3edef94..af01d19 100644
--- a/zkapauthorizer.nix
+++ b/zkapauthorizer.nix
@@ -10,7 +10,7 @@
 let
   hypothesisProfile' = if hypothesisProfile == null then "default" else hypothesisProfile;
   testSuite' = if testSuite == null then "_zkapauthorizer" else testSuite;
-  defaultTrialArgs = [ "--rterrors" ] ++ ( lib.optional ( ! collectCoverage ) "--jobs=4" );
+  defaultTrialArgs = [ "--rterrors" ] ++ ( lib.optional ( ! collectCoverage ) "--jobs=$NIX_BUILD_CORES" );
   trialArgs' = if trialArgs == null then defaultTrialArgs else trialArgs;
   extraTrialArgs = builtins.concatStringsSep " " trialArgs';
 in
-- 
GitLab