summary refs log tree commit diff
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 19:12:25 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 19:12:25 +0100
commita61b800da50ca3106a5e7ffe1d808f3023d337b8 (patch)
treee61351877968306d9ae0909271c3c9f2e8caece5 /lib/modules.nix
parentf3cdf9b47739d0018b2a022b3fdea1b940094803 (diff)
downloadnixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar.gz
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar.bz2
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar.lz
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar.xz
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.tar.zst
nixpkgs-a61b800da50ca3106a5e7ffe1d808f3023d337b8.zip
Fix backward compatibility with Nix < 1.6
"with" used to be less lazy, so don't rely on that.  Also don't use
the "<" operator.
Diffstat (limited to 'lib/modules.nix')
-rw-r--r--lib/modules.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 040ccf68214..071809daa58 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -1,5 +1,9 @@
-with import ./.. {};
-with lib;
+with import ./lists.nix;
+with import ./trivial.nix;
+with import ./attrsets.nix;
+with import ./options.nix;
+with import ./debug.nix;
+with import ./types.nix;
 
 rec {
 
@@ -244,7 +248,7 @@ rec {
     let
       defaultPrio = 100;
       getPrio = def: if def.value._type or "" == "override" then def.value.priority else defaultPrio;
-      min = x: y: if x < y then x else y;
+      min = x: y: if builtins.lessThan x y then x else y;
       highestPrio = fold (def: prio: min (getPrio def) prio) 9999 defs;
       strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
     in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;