diff options
30 files changed, 62 insertions, 63 deletions
diff --git a/lib/generators.nix b/lib/generators.nix index 968331a0ebde8..4357a03533984 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -422,7 +422,7 @@ ${expr "" v} (if v then "True" else "False") else if isFunction v then abort "generators.toDhall: cannot convert a function to Dhall" - else if isNull v then + else if v == null then abort "generators.toDhall: cannot convert a null to Dhall" else builtins.toJSON v; diff --git a/maintainers/scripts/haskell/dependencies.nix b/maintainers/scripts/haskell/dependencies.nix index f0620902c0ee0..fd8338c0029a9 100644 --- a/maintainers/scripts/haskell/dependencies.nix +++ b/maintainers/scripts/haskell/dependencies.nix @@ -3,7 +3,7 @@ let pkgs = import ../../.. {}; inherit (pkgs) lib; getDeps = _: pkg: { - deps = builtins.filter (x: !isNull x) (map (x: x.pname or null) (pkg.propagatedBuildInputs or [])); + deps = builtins.filter (x: x != null) (map (x: x.pname or null) (pkg.propagatedBuildInputs or [])); broken = (pkg.meta.hydraPlatforms or [null]) == []; }; in diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index 2807313a5a9c4..c568f52ab677d 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -65,7 +65,7 @@ let }; }; - filterDTBs = src: if isNull cfg.filter + filterDTBs = src: if cfg.filter == null then "${src}/dtbs" else pkgs.runCommand "dtbs-filtered" {} '' @@ -93,8 +93,8 @@ let # Fill in `dtboFile` for each overlay if not set already. # Existence of one of these is guarded by assertion below withDTBOs = xs: flip map xs (o: o // { dtboFile = - if isNull o.dtboFile then - if !isNull o.dtsFile then compileDTS o.name o.dtsFile + if o.dtboFile == null then + if o.dtsFile != null then compileDTS o.name o.dtsFile else compileDTS o.name (pkgs.writeText "dts" o.dtsText) else o.dtboFile; } ); @@ -181,7 +181,7 @@ in config = mkIf (cfg.enable) { assertions = let - invalidOverlay = o: isNull o.dtsFile && isNull o.dtsText && isNull o.dtboFile; + invalidOverlay = o: (o.dtsFile == null) && (o.dtsText == null) && (o.dtboFile == null); in lib.singleton { assertion = lib.all (o: !invalidOverlay o) cfg.overlays; message = '' diff --git a/nixos/modules/security/doas.nix b/nixos/modules/security/doas.nix index 4d15ed9a80259..be30a6b92e267 100644 --- a/nixos/modules/security/doas.nix +++ b/nixos/modules/security/doas.nix @@ -19,7 +19,7 @@ let ]; mkArgs = rule: - if (isNull rule.args) then "" + if (rule.args == null) then "" else if (length rule.args == 0) then "args" else "args ${concatStringsSep " " rule.args}"; @@ -27,9 +27,9 @@ let let opts = mkOpts rule; - as = optionalString (!isNull rule.runAs) "as ${rule.runAs}"; + as = optionalString (rule.runAs != null) "as ${rule.runAs}"; - cmd = optionalString (!isNull rule.cmd) "cmd ${rule.cmd}"; + cmd = optionalString (rule.cmd != null) "cmd ${rule.cmd}"; args = mkArgs rule; in diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 4224722f8792c..9b00b91e12818 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -793,7 +793,7 @@ let }; })); - motd = if isNull config.users.motdFile + motd = if config.users.motdFile == null then pkgs.writeText "motd" config.users.motd else config.users.motdFile; @@ -1233,7 +1233,7 @@ in config = { assertions = [ { - assertion = isNull config.users.motd || isNull config.users.motdFile; + assertion = config.users.motd == null || config.users.motdFile == null; message = '' Only one of users.motd and users.motdFile can be set. ''; diff --git a/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix index 26fe0f5e9e097..38682701ea151 100644 --- a/nixos/modules/services/cluster/kubernetes/pki.nix +++ b/nixos/modules/services/cluster/kubernetes/pki.nix @@ -270,7 +270,7 @@ in ''; })]); - environment.etc.${cfg.etcClusterAdminKubeconfig}.source = mkIf (!isNull cfg.etcClusterAdminKubeconfig) + environment.etc.${cfg.etcClusterAdminKubeconfig}.source = mkIf (cfg.etcClusterAdminKubeconfig != null) clusterAdminKubeconfig; environment.systemPackages = mkIf (top.kubelet.enable || top.proxy.enable) [ diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix index c49d944cdc188..944777475401b 100644 --- a/nixos/modules/services/hardware/undervolt.nix +++ b/nixos/modules/services/hardware/undervolt.nix @@ -5,8 +5,8 @@ let cfg = config.services.undervolt; mkPLimit = limit: window: - if (isNull limit && isNull window) then null - else assert asserts.assertMsg (!isNull limit && !isNull window) "Both power limit and window must be set"; + if (limit == null && window == null) then null + else assert asserts.assertMsg (limit != null && window != null) "Both power limit and window must be set"; "${toString limit} ${toString window}"; cliArgs = lib.cli.toGNUCommandLine {} { inherit (cfg) diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index 6adc58ec58ec4..cea8a2b14cc22 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -362,7 +362,7 @@ in { config = mkIf cfg.enable { assertions = [ { - assertion = cfg.openFirewall -> !isNull cfg.config; + assertion = cfg.openFirewall -> cfg.config != null; message = "openFirewall can only be used with a declarative config"; } ]; diff --git a/nixos/modules/services/networking/multipath.nix b/nixos/modules/services/networking/multipath.nix index b20ec76ddf594..bd403e109c2af 100644 --- a/nixos/modules/services/networking/multipath.nix +++ b/nixos/modules/services/networking/multipath.nix @@ -513,22 +513,22 @@ in { ${indentLines 2 devices} } - ${optionalString (!isNull defaults) '' + ${optionalString (defaults != null) '' defaults { ${indentLines 2 defaults} } ''} - ${optionalString (!isNull blacklist) '' + ${optionalString (blacklist != null) '' blacklist { ${indentLines 2 blacklist} } ''} - ${optionalString (!isNull blacklist_exceptions) '' + ${optionalString (blacklist_exceptions != null) '' blacklist_exceptions { ${indentLines 2 blacklist_exceptions} } ''} - ${optionalString (!isNull overrides) '' + ${optionalString (overrides != null) '' overrides { ${indentLines 2 overrides} } diff --git a/nixos/modules/services/networking/radicale.nix b/nixos/modules/services/networking/radicale.nix index 8e4789c7ca597..00dbd6bbe386d 100644 --- a/nixos/modules/services/networking/radicale.nix +++ b/nixos/modules/services/networking/radicale.nix @@ -9,7 +9,7 @@ let listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { }); }; - pkg = if isNull cfg.package then + pkg = if cfg.package == null then pkgs.radicale else cfg.package; @@ -117,13 +117,13 @@ in { } ]; - warnings = optional (isNull cfg.package && versionOlder config.system.stateVersion "17.09") '' + warnings = optional (cfg.package == null && versionOlder config.system.stateVersion "17.09") '' The configuration and storage formats of your existing Radicale installation might be incompatible with the newest version. For upgrade instructions see https://radicale.org/2.1.html#documentation/migration-from-1xx-to-2xx. Set services.radicale.package to suppress this warning. - '' ++ optional (isNull cfg.package && versionOlder config.system.stateVersion "20.09") '' + '' ++ optional (cfg.package == null && versionOlder config.system.stateVersion "20.09") '' The configuration format of your existing Radicale installation might be incompatible with the newest version. For upgrade instructions see https://github.com/Kozea/Radicale/blob/3.0.6/NEWS.md#upgrade-checklist. diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 16a793a42253c..5f9ee06124cb4 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -132,7 +132,7 @@ in requires = lib.mkIf (!(isPathType cfg.repository)) [ "network-online.target" ]; - environment.GIT_SSH_COMMAND = lib.mkIf (!(isNull cfg.sshKeyFile)) + environment.GIT_SSH_COMMAND = lib.mkIf (cfg.sshKeyFile != null) "${pkgs.openssh}/bin/ssh -i ${lib.escapeShellArg cfg.sshKeyFile}"; restartIfChanged = false; diff --git a/nixos/modules/services/web-apps/dolibarr.nix b/nixos/modules/services/web-apps/dolibarr.nix index a9df391128ee5..453229c130c22 100644 --- a/nixos/modules/services/web-apps/dolibarr.nix +++ b/nixos/modules/services/web-apps/dolibarr.nix @@ -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 diff --git a/nixos/modules/services/web-apps/writefreely.nix b/nixos/modules/services/web-apps/writefreely.nix index dec00b46f335e..a7671aa717f43 100644 --- a/nixos/modules/services/web-apps/writefreely.nix +++ b/nixos/modules/services/web-apps/writefreely.nix @@ -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'}"; }; diff --git a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix index f45aadfa67b48..36576f7c12398 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix @@ -73,28 +73,28 @@ in { error = sourceArgs.error or args.error or null; hasSource = lib.hasAttr variant args; pname = builtins.replaceStrings [ "@" ] [ "at" ] ename; - broken = ! isNull error; + broken = error != null; in if hasSource then lib.nameValuePair ename ( self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs: melpaBuild { inherit pname ename commit; - version = if isNull version then "" else - lib.concatStringsSep "." (map toString + version = lib.optionalString (version != null) + (lib.concatStringsSep "." (map toString # Hack: Melpa archives contains versions with parse errors such as [ 4 4 -4 413 ] which should be 4.4-413 # This filter method is still technically wrong, but it's computationally cheap enough and tapers over the issue - (builtins.filter (n: n >= 0) version)); + (builtins.filter (n: n >= 0) version))); # TODO: Broken should not result in src being null (hack to avoid eval errors) - src = if (isNull sha256 || broken) then null else + src = if (sha256 == null || broken) then null else lib.getAttr fetcher (fetcherGenerators args sourceArgs); - recipe = if isNull commit then null else + recipe = if commit == null then null else fetchurl { name = pname + "-recipe"; url = "https://raw.githubusercontent.com/melpa/melpa/${commit}/recipes/${ename}"; inherit sha256; }; - packageRequires = lib.optionals (! isNull deps) + packageRequires = lib.optionals (deps != null) (map (dep: pkgargs.${dep} or self.${dep} or null) deps); meta = (sourceArgs.meta or {}) // { diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index 49c9fc47fef26..3740d4e392687 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -70,7 +70,7 @@ let substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp" substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true" ''; - ocamlPackages = if !isNull customOCamlPackages then customOCamlPackages + ocamlPackages = if customOCamlPackages != null then customOCamlPackages else with versions; switch coq-version [ { case = range "8.16" "8.17"; out = ocamlPackages_4_14; } { case = range "8.14" "8.15"; out = ocamlPackages_4_12; } diff --git a/pkgs/applications/virtualization/singularity/generic.nix b/pkgs/applications/virtualization/singularity/generic.nix index f20735e45e3dc..5312dbdda0ff2 100644 --- a/pkgs/applications/virtualization/singularity/generic.nix +++ b/pkgs/applications/virtualization/singularity/generic.nix @@ -76,7 +76,7 @@ in let defaultPathOriginal = "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"; - privileged-un-utils = if ((isNull newuidmapPath) && (isNull newgidmapPath)) then null else + privileged-un-utils = if ((newuidmapPath == null) && (newgidmapPath == null)) then null else (runCommandLocal "privileged-un-utils" { } '' mkdir -p "$out/bin" ln -s ${lib.escapeShellArg newuidmapPath} "$out/bin/newuidmap" @@ -212,10 +212,10 @@ buildGoModule { rm "$file" done ''} - ${lib.optionalString enableSuid (lib.warnIf (isNull starterSuidPath) "${projectName}: Null starterSuidPath when enableSuid produces non-SUID-ed starter-suid and run-time permission denial." '' + ${lib.optionalString enableSuid (lib.warnIf (starterSuidPath == null) "${projectName}: Null starterSuidPath when enableSuid produces non-SUID-ed starter-suid and run-time permission denial." '' chmod +x $out/libexec/${projectName}/bin/starter-suid '')} - ${lib.optionalString (enableSuid && !isNull starterSuidPath) '' + ${lib.optionalString (enableSuid && (starterSuidPath != null)) '' mv "$out"/libexec/${projectName}/bin/starter-suid{,.orig} ln -s ${lib.escapeShellArg starterSuidPath} "$out/libexec/${projectName}/bin/starter-suid" ''} diff --git a/pkgs/build-support/coq/default.nix b/pkgs/build-support/coq/default.nix index e26504a66f10a..eb045ddf6865a 100644 --- a/pkgs/build-support/coq/default.nix +++ b/pkgs/build-support/coq/default.nix @@ -52,7 +52,7 @@ let inherit release releaseRev; location = { inherit domain owner repo; }; } // optionalAttrs (args?fetcher) {inherit fetcher;}); - fetched = fetch (if !isNull version then version else defaultVersion); + fetched = fetch (if version != null then version else defaultVersion); display-pkg = n: sep: v: let d = displayVersion.${n} or (if sep == "" then ".." else true); in n + optionalString (v != "" && v != null) (switch d [ diff --git a/pkgs/build-support/coq/meta-fetch/default.nix b/pkgs/build-support/coq/meta-fetch/default.nix index d5fe31c6ccf7d..82c29fb760b78 100644 --- a/pkgs/build-support/coq/meta-fetch/default.nix +++ b/pkgs/build-support/coq/meta-fetch/default.nix @@ -8,13 +8,13 @@ let fmt = if args?sha256 then "zip" else "tarball"; pr = match "^#(.*)$" rev; url = switch-if [ - { cond = isNull pr && !isNull (match "^github.*" domain); + { cond = pr == null && (match "^github.*" domain) != null; out = "https://${domain}/${owner}/${repo}/archive/${rev}.${ext}"; } - { cond = !isNull pr && !isNull (match "^github.*" domain); + { cond = pr != null && (match "^github.*" domain) != null; out = "https://api.${domain}/repos/${owner}/${repo}/${fmt}/pull/${head pr}/head"; } - { cond = isNull pr && !isNull (match "^gitlab.*" domain); + { cond = pr == null && (match "^gitlab.*" domain) != null; out = "https://${domain}/${owner}/${repo}/-/archive/${rev}/${repo}-${rev}.${ext}"; } - { cond = !isNull (match "(www.)?mpi-sws.org" domain); + { cond = (match "(www.)?mpi-sws.org" domain) != null; out = "https://www.mpi-sws.org/~${owner}/${repo}/download/${repo}-${rev}.${ext}";} ] (throw "meta-fetch: no fetcher found for domain ${domain} on ${rev}"); fetch = x: if args?sha256 then fetchzip (x // { inherit sha256; }) else fetchTarball x; diff --git a/pkgs/build-support/make-desktopitem/default.nix b/pkgs/build-support/make-desktopitem/default.nix index af314aa338c86..ccceb23256b6f 100644 --- a/pkgs/build-support/make-desktopitem/default.nix +++ b/pkgs/build-support/make-desktopitem/default.nix @@ -89,7 +89,7 @@ let renderSection = sectionName: attrs: lib.pipe attrs [ (lib.mapAttrsToList renderLine) - (builtins.filter (v: !isNull v)) + (builtins.filter (v: v != null)) (builtins.concatStringsSep "\n") (section: '' [${sectionName}] diff --git a/pkgs/data/themes/orchis-theme/default.nix b/pkgs/data/themes/orchis-theme/default.nix index bb196b26fb57c..3f964cba350bf 100644 --- a/pkgs/data/themes/orchis-theme/default.nix +++ b/pkgs/data/themes/orchis-theme/default.nix @@ -49,7 +49,7 @@ rec { runHook preInstall bash install.sh -d $out/share/themes -t all \ ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \ - ${lib.optionalString (!isNull border-radius) ("--round " + builtins.toString border-radius + "px")} + ${lib.optionalString (border-radius != null) ("--round " + builtins.toString border-radius + "px")} ${lib.optionalString withWallpapers '' mkdir -p $out/share/backgrounds cp src/wallpaper/{1080p,2k,4k}.jpg $out/share/backgrounds diff --git a/pkgs/development/nim-packages/build-nim-package/default.nix b/pkgs/development/nim-packages/build-nim-package/default.nix index 5ad181252df44..5c64b7b745c2d 100644 --- a/pkgs/development/nim-packages/build-nim-package/default.nix +++ b/pkgs/development/nim-packages/build-nim-package/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (attrs // { depsBuildBuild = [ nim_builder ] ++ depsBuildBuild; nativeBuildInputs = [ nim ] ++ nativeBuildInputs; - configurePhase = if isNull configurePhase then '' + configurePhase = if (configurePhase == null) then '' runHook preConfigure export NIX_NIM_BUILD_INPUTS=''${pkgsHostTarget[@]} $NIX_NIM_BUILD_INPUTS nim_builder --phase:configure @@ -17,21 +17,21 @@ stdenv.mkDerivation (attrs // { '' else configurePhase; - buildPhase = if isNull buildPhase then '' + buildPhase = if (buildPhase == null) then '' runHook preBuild nim_builder --phase:build runHook postBuild '' else buildPhase; - checkPhase = if isNull checkPhase then '' + checkPhase = if (checkPhase == null) then '' runHook preCheck nim_builder --phase:check runHook postCheck '' else checkPhase; - installPhase = if isNull installPhase then '' + installPhase = if (installPhase == null) then '' runHook preInstall nim_builder --phase:install runHook postInstall diff --git a/pkgs/development/python-modules/mip/default.nix b/pkgs/development/python-modules/mip/default.nix index 42353bdab723e..00be8547c73d1 100644 --- a/pkgs/development/python-modules/mip/default.nix +++ b/pkgs/development/python-modules/mip/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { cffi ] ++ lib.optionals gurobiSupport ([ gurobipy - ] ++ lib.optional (builtins.isNull gurobiHome) gurobi); + ] ++ lib.optional (gurobiHome == null) gurobi); # Source files have CRLF terminators, which make patch error out when supplied # with diffs made on *nix machines @@ -58,7 +58,7 @@ buildPythonPackage rec { # Make MIP use the Gurobi solver, if configured to do so makeWrapperArgs = lib.optional gurobiSupport - "--set GUROBI_HOME ${if builtins.isNull gurobiHome then gurobi.outPath else gurobiHome}"; + "--set GUROBI_HOME ${if gurobiHome == null then gurobi.outPath else gurobiHome}"; # Tests that rely on Gurobi are activated only when Gurobi support is enabled disabledTests = lib.optional (!gurobiSupport) "gurobi"; diff --git a/pkgs/development/tools/build-managers/waf/default.nix b/pkgs/development/tools/build-managers/waf/default.nix index 4e42927d0293a..218783fd4926f 100644 --- a/pkgs/development/tools/build-managers/waf/default.nix +++ b/pkgs/development/tools/build-managers/waf/default.nix @@ -4,7 +4,7 @@ }: let wafToolsArg = with lib.strings; - optionalString (!isNull withTools) " --tools=\"${concatStringsSep "," withTools}\""; + optionalString (withTools != null) " --tools=\"${concatStringsSep "," withTools}\""; in stdenv.mkDerivation rec { pname = "waf"; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix index a5bb46309f4c3..cb5bda0bba76e 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix @@ -50,7 +50,7 @@ let { nativeBuildInputs = (old.nativeBuildInputs or [ ]) - ++ lib.optionals (!(builtins.isNull buildSystem)) [ buildSystem ] + ++ lib.optionals (buildSystem != null) [ buildSystem ] ++ map (a: self.${a}) extraAttrs; } ) diff --git a/pkgs/games/cataclysm-dda/pkgs/default.nix b/pkgs/games/cataclysm-dda/pkgs/default.nix index 39abad809c5b3..72b2c814389a8 100644 --- a/pkgs/games/cataclysm-dda/pkgs/default.nix +++ b/pkgs/games/cataclysm-dda/pkgs/default.nix @@ -16,7 +16,7 @@ let pkgs' = lib.mapAttrs (_: mods: lib.filterAttrs isAvailable mods) pkgs; isAvailable = _: mod: - if isNull build then + if (build == null) then true else if build.isTiles then mod.forTiles or false diff --git a/pkgs/games/curseofwar/default.nix b/pkgs/games/curseofwar/default.nix index 6271a60f5b9c0..fef456816ff22 100644 --- a/pkgs/games/curseofwar/default.nix +++ b/pkgs/games/curseofwar/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { SDL ]; - makeFlags = (if isNull SDL then [] else [ "SDL=yes" ]) ++ [ + makeFlags = (lib.optionals (SDL != null) [ "SDL=yes" ]) ++ [ "PREFIX=$(out)" # force platform's cc on darwin, otherwise gcc is used "CC=${stdenv.cc.targetPrefix}cc" diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix index 3d15654300cac..443fdeffb10a3 100644 --- a/pkgs/servers/nosql/arangodb/default.nix +++ b/pkgs/servers/nosql/arangodb/default.nix @@ -25,7 +25,7 @@ let else "core"; targetArch = - if isNull targetArchitecture + if targetArchitecture == null then defaultTargetArchitecture else targetArchitecture; in diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 46b22f3373033..15f2b03331d72 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -214,7 +214,7 @@ let checkDependencyList = checkDependencyList' []; checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep: - if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep + if lib.isDerivation dep || dep == null || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep 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}"); in if builtins.length erroneousHardeningFlags != 0 diff --git a/pkgs/tools/misc/plfit/default.nix b/pkgs/tools/misc/plfit/default.nix index 60d08e69d4570..78e7c3572b6f0 100644 --- a/pkgs/tools/misc/plfit/default.nix +++ b/pkgs/tools/misc/plfit/default.nix @@ -20,14 +20,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optionals (!isNull python) [ + ] ++ lib.optionals (python != null) [ python swig ]; cmakeFlags = [ "-DPLFIT_USE_OPENMP=ON" - ] ++ lib.optionals (!isNull python) [ + ] ++ lib.optionals (python != null) [ "-DPLFIT_COMPILE_PYTHON_MODULE=ON" ]; diff --git a/pkgs/tools/text/gawk/gawkextlib.nix b/pkgs/tools/text/gawk/gawkextlib.nix index d15d5ce75f413..e050c99392691 100644 --- a/pkgs/tools/text/gawk/gawkextlib.nix +++ b/pkgs/tools/text/gawk/gawkextlib.nix @@ -6,7 +6,7 @@ let buildExtension = lib.makeOverridable ({ name, gawkextlib, extraBuildInputs ? [ ], doCheck ? true }: - let is_extension = !isNull gawkextlib; + let is_extension = gawkextlib != null; in stdenv.mkDerivation rec { pname = "gawkextlib-${name}"; version = "unstable-2019-11-21"; |