diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generators.nix | 2 | ||||
-rw-r--r-- | lib/sources.nix | 4 | ||||
-rw-r--r-- | lib/systems/examples.nix | 3 | ||||
-rw-r--r-- | lib/trivial.nix | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/lib/generators.nix b/lib/generators.nix index 863ba847423e..a71654bec6c3 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -178,7 +178,7 @@ rec { toPlist = {}: v: let isFloat = builtins.isFloat or (x: false); expr = ind: x: with builtins; - if isNull x then "" else + if x == null then "" else if isBool x then bool ind x else if isInt x then int ind x else if isString x then str ind x else diff --git a/lib/sources.nix b/lib/sources.nix index f02ddad17c6d..0ffadea8f1bc 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -83,7 +83,7 @@ rec { # Sometimes git stores the commitId directly in the file but # sometimes it stores something like: «ref: refs/heads/branch-name» matchRef = match "^ref: (.*)$" fileContent; - in if isNull matchRef + in if matchRef == null then fileContent else readCommitFromFile (lib.head matchRef) path # Sometimes, the file isn't there at all and has been packed away in the @@ -92,7 +92,7 @@ rec { then let fileContent = readFile packedRefsName; matchRef = match (".*\n([^\n ]*) " + file + "\n.*") fileContent; - in if isNull matchRef + in if matchRef == null then throw ("Could not find " + file + " in " + packedRefsName) else lib.head matchRef else throw ("Not a .git directory: " + path); diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 94c7cfd7570f..d17af9fcc148 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -88,6 +88,9 @@ rec { config = "aarch64-unknown-linux-musl"; }; + gnu64 = { config = "x86_64-unknown-linux-gnu"; }; + gnu32 = { config = "i686-unknown-linux-gnu"; }; + musl64 = { config = "x86_64-unknown-linux-musl"; }; musl32 = { config = "i686-unknown-linux-musl"; }; diff --git a/lib/trivial.nix b/lib/trivial.nix index 2d682961035f..f2710a6f0338 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -112,7 +112,7 @@ rec { # Function to call f: # Argument to check for null before passing it to `f` - a: if isNull a then a else f a; + a: if a == null then a else f a; # Pull in some builtins not included elsewhere. inherit (builtins) |