···422422 (if v then "True" else "False")
423423 else if isFunction v then
424424 abort "generators.toDhall: cannot convert a function to Dhall"
425425- else if isNull v then
425425+ else if v == null then
426426 abort "generators.toDhall: cannot convert a null to Dhall"
427427 else
428428 builtins.toJSON v;
+1-1
maintainers/scripts/haskell/dependencies.nix
···33 pkgs = import ../../.. {};
44 inherit (pkgs) lib;
55 getDeps = _: pkg: {
66- deps = builtins.filter (x: !isNull x) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
66+ deps = builtins.filter (x: x != null) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
77 broken = (pkg.meta.hydraPlatforms or [null]) == [];
88 };
99in
+4-4
nixos/modules/hardware/device-tree.nix
···6565 };
6666 };
67676868- filterDTBs = src: if isNull cfg.filter
6868+ filterDTBs = src: if cfg.filter == null
6969 then "${src}/dtbs"
7070 else
7171 pkgs.runCommand "dtbs-filtered" {} ''
···9393 # Fill in `dtboFile` for each overlay if not set already.
9494 # Existence of one of these is guarded by assertion below
9595 withDTBOs = xs: flip map xs (o: o // { dtboFile =
9696- if isNull o.dtboFile then
9797- if !isNull o.dtsFile then compileDTS o.name o.dtsFile
9696+ if o.dtboFile == null then
9797+ if o.dtsFile != null then compileDTS o.name o.dtsFile
9898 else compileDTS o.name (pkgs.writeText "dts" o.dtsText)
9999 else o.dtboFile; } );
100100···181181 config = mkIf (cfg.enable) {
182182183183 assertions = let
184184- invalidOverlay = o: isNull o.dtsFile && isNull o.dtsText && isNull o.dtboFile;
184184+ invalidOverlay = o: (o.dtsFile == null) && (o.dtsText == null) && (o.dtboFile == null);
185185 in lib.singleton {
186186 assertion = lib.all (o: !invalidOverlay o) cfg.overlays;
187187 message = ''
+3-3
nixos/modules/security/doas.nix
···1919 ];
20202121 mkArgs = rule:
2222- if (isNull rule.args) then ""
2222+ if (rule.args == null) then ""
2323 else if (length rule.args == 0) then "args"
2424 else "args ${concatStringsSep " " rule.args}";
2525···2727 let
2828 opts = mkOpts rule;
29293030- as = optionalString (!isNull rule.runAs) "as ${rule.runAs}";
3030+ as = optionalString (rule.runAs != null) "as ${rule.runAs}";
31313232- cmd = optionalString (!isNull rule.cmd) "cmd ${rule.cmd}";
3232+ cmd = optionalString (rule.cmd != null) "cmd ${rule.cmd}";
33333434 args = mkArgs rule;
3535 in
+2-2
nixos/modules/security/pam.nix
···793793 };
794794 }));
795795796796- motd = if isNull config.users.motdFile
796796+ motd = if config.users.motdFile == null
797797 then pkgs.writeText "motd" config.users.motd
798798 else config.users.motdFile;
799799···12331233 config = {
12341234 assertions = [
12351235 {
12361236- assertion = isNull config.users.motd || isNull config.users.motdFile;
12361236+ assertion = config.users.motd == null || config.users.motdFile == null;
12371237 message = ''
12381238 Only one of users.motd and users.motdFile can be set.
12391239 '';
···1616 if (any (str: k == str) secretKeys) then v
1717 else if isString v then "'${v}'"
1818 else if isBool v then boolToString v
1919- else if isNull v then "null"
1919+ else if v == null then "null"
2020 else toString v
2121 ;
2222 in
+5-6
nixos/modules/services/web-apps/writefreely.nix
···1010 format = pkgs.formats.ini {
1111 mkKeyValue = key: value:
1212 let
1313- value' = if builtins.isNull value then
1414- ""
1515- else if builtins.isBool value then
1616- if value == true then "true" else "false"
1717- else
1818- toString value;
1313+ value' = lib.optionalString (value != null)
1414+ (if builtins.isBool value then
1515+ if value == true then "true" else "false"
1616+ else
1717+ toString value);
1918 in "${key} = ${value'}";
2019 };
2120
···99 depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
1010 nativeBuildInputs = [ nim ] ++ nativeBuildInputs;
11111212- configurePhase = if isNull configurePhase then ''
1212+ configurePhase = if (configurePhase == null) then ''
1313 runHook preConfigure
1414 export NIX_NIM_BUILD_INPUTS=''${pkgsHostTarget[@]} $NIX_NIM_BUILD_INPUTS
1515 nim_builder --phase:configure
···1717 '' else
1818 configurePhase;
19192020- buildPhase = if isNull buildPhase then ''
2020+ buildPhase = if (buildPhase == null) then ''
2121 runHook preBuild
2222 nim_builder --phase:build
2323 runHook postBuild
2424 '' else
2525 buildPhase;
26262727- checkPhase = if isNull checkPhase then ''
2727+ checkPhase = if (checkPhase == null) then ''
2828 runHook preCheck
2929 nim_builder --phase:check
3030 runHook postCheck
3131 '' else
3232 checkPhase;
33333434- installPhase = if isNull installPhase then ''
3434+ installPhase = if (installPhase == null) then ''
3535 runHook preInstall
3636 nim_builder --phase:install
3737 runHook postInstall
+2-2
pkgs/development/python-modules/mip/default.nix
···3535 cffi
3636 ] ++ lib.optionals gurobiSupport ([
3737 gurobipy
3838- ] ++ lib.optional (builtins.isNull gurobiHome) gurobi);
3838+ ] ++ lib.optional (gurobiHome == null) gurobi);
39394040 # Source files have CRLF terminators, which make patch error out when supplied
4141 # with diffs made on *nix machines
···58585959 # Make MIP use the Gurobi solver, if configured to do so
6060 makeWrapperArgs = lib.optional gurobiSupport
6161- "--set GUROBI_HOME ${if builtins.isNull gurobiHome then gurobi.outPath else gurobiHome}";
6161+ "--set GUROBI_HOME ${if gurobiHome == null then gurobi.outPath else gurobiHome}";
62626363 # Tests that rely on Gurobi are activated only when Gurobi support is enabled
6464 disabledTests = lib.optional (!gurobiSupport) "gurobi";
···1616 pkgs' = lib.mapAttrs (_: mods: lib.filterAttrs isAvailable mods) pkgs;
17171818 isAvailable = _: mod:
1919- if isNull build then
1919+ if (build == null) then
2020 true
2121 else if build.isTiles then
2222 mod.forTiles or false
+1-1
pkgs/games/curseofwar/default.nix
···2020 SDL
2121 ];
22222323- makeFlags = (if isNull SDL then [] else [ "SDL=yes" ]) ++ [
2323+ makeFlags = (lib.optionals (SDL != null) [ "SDL=yes" ]) ++ [
2424 "PREFIX=$(out)"
2525 # force platform's cc on darwin, otherwise gcc is used
2626 "CC=${stdenv.cc.targetPrefix}cc"
+1-1
pkgs/servers/nosql/arangodb/default.nix
···2525 else "core";
26262727 targetArch =
2828- if isNull targetArchitecture
2828+ if targetArchitecture == null
2929 then defaultTargetArchitecture
3030 else targetArchitecture;
3131in
+1-1
pkgs/stdenv/generic/make-derivation.nix
···206206207207 checkDependencyList = checkDependencyList' [];
208208 checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
209209- if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
209209+ if lib.isDerivation dep || dep == null || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
210210 else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
211211 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}");
212212in if builtins.length erroneousHardeningFlags != 0