···422 (if v then "True" else "False")
423 else if isFunction v then
424 abort "generators.toDhall: cannot convert a function to Dhall"
425- else if isNull v then
426 abort "generators.toDhall: cannot convert a null to Dhall"
427 else
428 builtins.toJSON v;
···422 (if v then "True" else "False")
423 else if isFunction v then
424 abort "generators.toDhall: cannot convert a function to Dhall"
425+ else if v == null then
426 abort "generators.toDhall: cannot convert a null to Dhall"
427 else
428 builtins.toJSON v;
···9 listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { });
10 };
1112- pkg = if isNull cfg.package then
13 pkgs.radicale
14 else
15 cfg.package;
···117 }
118 ];
119120- warnings = optional (isNull cfg.package && versionOlder config.system.stateVersion "17.09") ''
121 The configuration and storage formats of your existing Radicale
122 installation might be incompatible with the newest version.
123 For upgrade instructions see
124 https://radicale.org/2.1.html#documentation/migration-from-1xx-to-2xx.
125 Set services.radicale.package to suppress this warning.
126- '' ++ optional (isNull cfg.package && versionOlder config.system.stateVersion "20.09") ''
127 The configuration format of your existing Radicale installation might be
128 incompatible with the newest version. For upgrade instructions see
129 https://github.com/Kozea/Radicale/blob/3.0.6/NEWS.md#upgrade-checklist.
···9 listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { });
10 };
1112+ pkg = if cfg.package == null then
13 pkgs.radicale
14 else
15 cfg.package;
···117 }
118 ];
119120+ warnings = optional (cfg.package == null && versionOlder config.system.stateVersion "17.09") ''
121 The configuration and storage formats of your existing Radicale
122 installation might be incompatible with the newest version.
123 For upgrade instructions see
124 https://radicale.org/2.1.html#documentation/migration-from-1xx-to-2xx.
125 Set services.radicale.package to suppress this warning.
126+ '' ++ optional (cfg.package == null && versionOlder config.system.stateVersion "20.09") ''
127 The configuration format of your existing Radicale installation might be
128 incompatible with the newest version. For upgrade instructions see
129 https://github.com/Kozea/Radicale/blob/3.0.6/NEWS.md#upgrade-checklist.
···16 if (any (str: k == str) secretKeys) then v
17 else if isString v then "'${v}'"
18 else if isBool v then boolToString v
19- else if isNull v then "null"
20 else toString v
21 ;
22 in
···16 if (any (str: k == str) secretKeys) then v
17 else if isString v then "'${v}'"
18 else if isBool v then boolToString v
19+ else if v == null then "null"
20 else toString v
21 ;
22 in
+5-6
nixos/modules/services/web-apps/writefreely.nix
···10 format = pkgs.formats.ini {
11 mkKeyValue = key: value:
12 let
13- value' = if builtins.isNull value then
14- ""
15- else if builtins.isBool value then
16- if value == true then "true" else "false"
17- else
18- toString value;
19 in "${key} = ${value'}";
20 };
21
···10 format = pkgs.formats.ini {
11 mkKeyValue = key: value:
12 let
13+ value' = lib.optionalString (value != null)
14+ (if builtins.isBool value then
15+ if value == true then "true" else "false"
16+ else
17+ toString value);
018 in "${key} = ${value'}";
19 };
20
···35 cffi
36 ] ++ lib.optionals gurobiSupport ([
37 gurobipy
38- ] ++ lib.optional (builtins.isNull gurobiHome) gurobi);
3940 # Source files have CRLF terminators, which make patch error out when supplied
41 # with diffs made on *nix machines
···5859 # Make MIP use the Gurobi solver, if configured to do so
60 makeWrapperArgs = lib.optional gurobiSupport
61- "--set GUROBI_HOME ${if builtins.isNull gurobiHome then gurobi.outPath else gurobiHome}";
6263 # Tests that rely on Gurobi are activated only when Gurobi support is enabled
64 disabledTests = lib.optional (!gurobiSupport) "gurobi";
···35 cffi
36 ] ++ lib.optionals gurobiSupport ([
37 gurobipy
38+ ] ++ lib.optional (gurobiHome == null) gurobi);
3940 # Source files have CRLF terminators, which make patch error out when supplied
41 # with diffs made on *nix machines
···5859 # Make MIP use the Gurobi solver, if configured to do so
60 makeWrapperArgs = lib.optional gurobiSupport
61+ "--set GUROBI_HOME ${if gurobiHome == null then gurobi.outPath else gurobiHome}";
6263 # Tests that rely on Gurobi are activated only when Gurobi support is enabled
64 disabledTests = lib.optional (!gurobiSupport) "gurobi";
···16 pkgs' = lib.mapAttrs (_: mods: lib.filterAttrs isAvailable mods) pkgs;
1718 isAvailable = _: mod:
19- if isNull build then
20 true
21 else if build.isTiles then
22 mod.forTiles or false
···16 pkgs' = lib.mapAttrs (_: mods: lib.filterAttrs isAvailable mods) pkgs;
1718 isAvailable = _: mod:
19+ if (build == null) then
20 true
21 else if build.isTiles then
22 mod.forTiles or false
+1-1
pkgs/games/curseofwar/default.nix
···20 SDL
21 ];
2223- makeFlags = (if isNull SDL then [] else [ "SDL=yes" ]) ++ [
24 "PREFIX=$(out)"
25 # force platform's cc on darwin, otherwise gcc is used
26 "CC=${stdenv.cc.targetPrefix}cc"
···20 SDL
21 ];
2223+ makeFlags = (lib.optionals (SDL != null) [ "SDL=yes" ]) ++ [
24 "PREFIX=$(out)"
25 # force platform's cc on darwin, otherwise gcc is used
26 "CC=${stdenv.cc.targetPrefix}cc"
+1-1
pkgs/servers/nosql/arangodb/default.nix
···25 else "core";
2627 targetArch =
28- if isNull targetArchitecture
29 then defaultTargetArchitecture
30 else targetArchitecture;
31in
···25 else "core";
2627 targetArch =
28+ if targetArchitecture == null
29 then defaultTargetArchitecture
30 else targetArchitecture;
31in
+1-1
pkgs/stdenv/generic/make-derivation.nix
···206207 checkDependencyList = checkDependencyList' [];
208 checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
209- if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
210 else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
211 else throw "Dependency is not of a valid type: ${lib.concatMapStrings (ix: "element ${toString ix} of ") ([index] ++ positions)}${name} for ${attrs.name or attrs.pname}");
212in if builtins.length erroneousHardeningFlags != 0
···206207 checkDependencyList = checkDependencyList' [];
208 checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
209+ if lib.isDerivation dep || dep == null || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
210 else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
211 else throw "Dependency is not of a valid type: ${lib.concatMapStrings (ix: "element ${toString ix} of ") ([index] ++ positions)}${name} for ${attrs.name or attrs.pname}");
212in if builtins.length erroneousHardeningFlags != 0