From 5d7000df689f2ee654cbb45ec440764c54074430 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Feb 2015 11:57:36 +0100 Subject: Automatically set nix.nrBuildUsers to at least nix.maxJobs --- lib/trivial.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/trivial.nix') diff --git a/lib/trivial.nix b/lib/trivial.nix index e073da4900cc0..ed59eff484736 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -47,7 +47,11 @@ rec { readFile ../.version + (if pathExists suffixFile then readFile suffixFile else "pre-git"); - # Whether we're being called by nix-shell. This is useful to + # Whether we're being called by nix-shell. inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1"; + # Return minimum/maximum of two numbers. + min = x: y: if x < y then x else y; + max = x: y: if x > y then x else y; + } -- cgit 1.4.1