mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
This commit is contained in:
parent
794f34657e
commit
d10e69c86b
30 changed files with 62 additions and 63 deletions
|
@ -16,7 +16,7 @@ let
|
|||
if (any (str: k == str) secretKeys) then v
|
||||
else if isString v then "'${v}'"
|
||||
else if isBool v then boolToString v
|
||||
else if isNull v then "null"
|
||||
else if v == null then "null"
|
||||
else toString v
|
||||
;
|
||||
in
|
||||
|
|
|
@ -10,12 +10,11 @@ let
|
|||
format = pkgs.formats.ini {
|
||||
mkKeyValue = key: value:
|
||||
let
|
||||
value' = if builtins.isNull value then
|
||||
""
|
||||
else if builtins.isBool value then
|
||||
if value == true then "true" else "false"
|
||||
else
|
||||
toString value;
|
||||
value' = lib.optionalString (value != null)
|
||||
(if builtins.isBool value then
|
||||
if value == true then "true" else "false"
|
||||
else
|
||||
toString value);
|
||||
in "${key} = ${value'}";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue