diff --git a/ci/default.nix b/ci/default.nix index f6eaab88fcb0..7b7424f4f5be 100644 --- a/ci/default.nix +++ b/ci/default.nix @@ -96,7 +96,6 @@ let # Rule names can currently be looked up here: # https://github.com/nix-community/nixd/blob/main/libnixf/src/Basic/diagnostic.py # TODO: Remove the following and fix things. - "--ignore=parse-redundant-paren" "--ignore=sema-unused-def-lambda-noarg-formal" "--ignore=sema-unused-def-lambda-witharg-arg" "--ignore=sema-unused-def-lambda-witharg-formal" diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix index 8e5651864d48..18830462b870 100644 --- a/doc/doc-support/package.nix +++ b/doc/doc-support/package.nix @@ -35,7 +35,7 @@ stdenvNoCC.mkDerivation ( decl: let declStr = toString decl; - root = toString (../..); + root = toString ../..; subpath = lib.removePrefix "/" (lib.removePrefix root declStr); in if lib.hasPrefix root declStr then diff --git a/lib/customisation.nix b/lib/customisation.nix index 19c77633e6e3..5fb39fdfe1d2 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -396,7 +396,7 @@ rec { outputs = drv.outputs or [ "out" ]; commonAttrs = - drv // (listToAttrs outputsList) // ({ all = map (x: x.value) outputsList; }) // passthru; + drv // (listToAttrs outputsList) // { all = map (x: x.value) outputsList; } // passthru; outputToAttrListElement = outputName: { name = outputName; diff --git a/lib/tests/modules/composed-types-valueMeta.nix b/lib/tests/modules/composed-types-valueMeta.nix index 734917f8b67d..fc2279b69301 100644 --- a/lib/tests/modules/composed-types-valueMeta.nix +++ b/lib/tests/modules/composed-types-valueMeta.nix @@ -26,29 +26,29 @@ in { imports = [ # Module A - ({ + { options.attrsOfModule = attrsOfModule; options.mergedAttrsOfModule = attrsOfModule; options.listOfModule = listOfModule; options.mergedListOfModule = listOfModule; - }) + } # Module B - ({ + { options.mergedAttrsOfModule = attrsOfModule; options.mergedListOfModule = listOfModule; - }) + } # Values # It is important that the value is defined in a separate module # Without valueMeta the actual value and sub-options wouldn't be accessible via: # options.attrsOfModule.type.getSubOptions - ({ + { attrsOfModule = { foo.bar = 42; }; mergedAttrsOfModule = { foo.bar = 42; }; - }) + } ( { options, ... }: { diff --git a/lib/tests/modules/freeform-attrsof-either.nix b/lib/tests/modules/freeform-attrsof-either.nix index 3d6ea05a88ef..c92020306b45 100644 --- a/lib/tests/modules/freeform-attrsof-either.nix +++ b/lib/tests/modules/freeform-attrsof-either.nix @@ -4,9 +4,9 @@ let in { options.number = mkOption { - type = types.submodule ({ + type = types.submodule { freeformType = types.attrsOf (types.either types.int types.int); - }); + }; default = { int = 42; }; # should not emit a warning diff --git a/lib/tests/modules/freeform-deprecated-malicous.nix b/lib/tests/modules/freeform-deprecated-malicous.nix index 47d5bd2f69dd..8d9bbdf06f82 100644 --- a/lib/tests/modules/freeform-deprecated-malicous.nix +++ b/lib/tests/modules/freeform-deprecated-malicous.nix @@ -4,31 +4,31 @@ let in { options.either = mkOption { - type = types.submodule ({ + type = types.submodule { freeformType = (types.either types.int types.int); - }); + }; }; options.eitherBehindNullor = mkOption { - type = types.submodule ({ + type = types.submodule { freeformType = types.nullOr (types.either types.int types.int); - }); + }; }; options.oneOf = mkOption { - type = types.submodule ({ + type = types.submodule { freeformType = ( types.oneOf [ types.int types.int ] ); - }); + }; }; options.number = mkOption { - type = types.submodule ({ + type = types.submodule { freeformType = (types.number); # either int float - }); + }; }; } diff --git a/lib/tests/modules/functionTo/submodule-options.nix b/lib/tests/modules/functionTo/submodule-options.nix index 5d490e07281d..4d821db1763e 100644 --- a/lib/tests/modules/functionTo/submodule-options.nix +++ b/lib/tests/modules/functionTo/submodule-options.nix @@ -56,7 +56,7 @@ in default = lib.concatStringsSep " " ( lib.concatLists ( lib.mapAttrsToList (k: v: if k == "_module" then [ ] else [ (lib.showOption v.loc) ]) ( - (options.fun.type.getSubOptions [ "fun" ]) + options.fun.type.getSubOptions [ "fun" ] ) ) ); diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix index 642339e792fd..872523d47b4a 100644 --- a/lib/tests/systems.nix +++ b/lib/tests/systems.nix @@ -157,9 +157,7 @@ lib.runTests ( "x86_64-genode" ]; testredox = mseteq redox [ "x86_64-redox" ]; - testgnu = mseteq gnu ( - linux # ++ kfreebsd ++ ... - ); + testgnu = mseteq gnu linux; # ++ kfreebsd ++ ... testillumos = mseteq illumos [ "x86_64-solaris" ]; testlinux = mseteq linux [ "aarch64-linux" diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 928c8000d64f..4c7b0ba9ed1d 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -104,7 +104,7 @@ let in locatedModules ++ legacyModules; - noUserModules = evalModulesMinimal ({ + noUserModules = evalModulesMinimal { inherit prefix specialArgs; modules = baseModules @@ -113,7 +113,7 @@ let pkgsModule modulesModule ]; - }); + }; # Extra arguments that are useful for constructing a similar configuration. modulesModule = { diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix index 03d0705b3e92..63b965f21d69 100644 --- a/nixos/lib/systemd-lib.nix +++ b/nixos/lib/systemd-lib.nix @@ -361,12 +361,13 @@ rec { }: let typeDir = - ({ + { system = "system"; initrd = "system"; user = "user"; nspawn = "nspawn"; - }).${type}; + } + .${type}; in pkgs.runCommand "${type}-units" { diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index 5caea2710754..1188e9bec505 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -104,9 +104,9 @@ let optionalString ( config.networking.primaryIPAddress != "" ) "${config.networking.primaryIPAddress} ${hostnames}" - + optionalString (config.networking.primaryIPv6Address != "") ( - "${config.networking.primaryIPv6Address} ${hostnames}" - ) + + optionalString ( + config.networking.primaryIPv6Address != "" + ) "${config.networking.primaryIPv6Address} ${hostnames}" ); virtualisation.qemu.options = qemuOptions; diff --git a/nixos/modules/config/nix-remote-build.nix b/nixos/modules/config/nix-remote-build.nix index 9a276aa29d07..928ed0c2c9b6 100644 --- a/nixos/modules/config/nix-remote-build.nix +++ b/nixos/modules/config/nix-remote-build.nix @@ -241,7 +241,7 @@ in Invalid machine specifications: '' + " " - + (concatStringsSep "\n " (map (m: m.hostName) (filter (badMachine) cfg.buildMachines))); + + (concatStringsSep "\n " (map (m: m.hostName) (filter badMachine cfg.buildMachines))); } ]; diff --git a/nixos/modules/config/xdg/terminal-exec.nix b/nixos/modules/config/xdg/terminal-exec.nix index 0c8381bc2cde..764a1ee6c087 100644 --- a/nixos/modules/config/xdg/terminal-exec.nix +++ b/nixos/modules/config/xdg/terminal-exec.nix @@ -54,9 +54,9 @@ in etc = lib.mapAttrs' ( desktop: terminals: # map desktop name such as GNOME to `xdg/gnome-xdg-terminals.list`, default to `xdg/xdg-terminals.list` - lib.nameValuePair ( - "xdg/${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list" - ) { text = lib.concatLines terminals; } + lib.nameValuePair "xdg/${ + if desktop == "default" then "" else "${lib.toLower desktop}-" + }xdg-terminals.list" { text = lib.concatLines terminals; } ) cfg.settings; }; }; diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index be4afcd63036..0f9dc1fb1bbf 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -333,7 +333,7 @@ in lib.mkIf cfg.enabled ( lib.mkMerge [ # Common - ({ + { assertions = [ { assertion = !(nvidiaEnabled && cfg.datacenter.enable); @@ -388,7 +388,7 @@ in extraPackages32 = [ nvidia_x11.lib32 ]; }; environment.systemPackages = [ nvidia_x11.bin ]; - }) + } # X11 (lib.mkIf nvidiaEnabled { @@ -709,7 +709,7 @@ in "L+ /run/nvidia-docker/extras/bin/nvidia-persistenced - - - - ${nvidia_x11.persistenced}/origBin/nvidia-persistenced"; services = lib.mkMerge [ - ({ + { nvidia-fabricmanager = { enable = true; description = "Start NVIDIA NVLink Management"; @@ -736,7 +736,7 @@ in LimitCORE = "infinity"; }; }; - }) + } (lib.mkIf cfg.nvidiaPersistenced { "nvidia-persistenced" = { description = "NVIDIA Persistence Daemon"; diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 81e65517f515..989e5fbf8239 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -117,7 +117,7 @@ in ++ lib.optionals (cfg.quickPhraseFiles != { }) [ (pkgs.linkFarm "quickPhraseFiles" ( lib.mapAttrs' ( - name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value + name: value: lib.nameValuePair "share/fcitx5/data/quickphrase.d/${name}.mb" value ) cfg.quickPhraseFiles )) ]; diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index ad8dc763570d..76a1517d9dae 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -950,7 +950,7 @@ in let cfgFiles = cfg: - lib.optionals cfg.isoImage.showConfiguration ([ + lib.optionals cfg.isoImage.showConfiguration [ { source = cfg.boot.kernelPackages.kernel + "/" + cfg.system.boot.loader.kernelFile; target = "/boot/" + cfg.boot.kernelPackages.kernel + "/" + cfg.system.boot.loader.kernelFile; @@ -959,7 +959,7 @@ in source = cfg.system.build.initialRamdisk + "/" + cfg.system.boot.loader.initrdFile; target = "/boot/" + cfg.system.build.initialRamdisk + "/" + cfg.system.boot.loader.initrdFile; } - ]) + ] ++ lib.concatLists ( lib.mapAttrsToList (_: { configuration, ... }: cfgFiles configuration) cfg.specialisation ); diff --git a/nixos/modules/profiles/nix-builder-vm.nix b/nixos/modules/profiles/nix-builder-vm.nix index d75b786a6958..3bb9953cf28c 100644 --- a/nixos/modules/profiles/nix-builder-vm.nix +++ b/nixos/modules/profiles/nix-builder-vm.nix @@ -212,18 +212,18 @@ in '' ); - run-builder = hostPkgs.writeShellScriptBin "run-builder" ('' + run-builder = hostPkgs.writeShellScriptBin "run-builder" '' set -euo pipefail KEYS="''${KEYS:-./keys}" KEYS="$(${hostPkgs.nix}/bin/nix-store --add "$KEYS")" ${lib.getExe config.system.build.vm} - ''); + ''; - script = hostPkgs.writeShellScriptBin "create-builder" ('' + script = hostPkgs.writeShellScriptBin "create-builder" '' set -euo pipefail export KEYS="''${KEYS:-./keys}" ${lib.getExe add-keys} ${lib.getExe run-builder} - ''); + ''; in script.overrideAttrs (old: { diff --git a/nixos/modules/programs/coolercontrol.nix b/nixos/modules/programs/coolercontrol.nix index a88611856860..03aa774ad846 100644 --- a/nixos/modules/programs/coolercontrol.nix +++ b/nixos/modules/programs/coolercontrol.nix @@ -29,7 +29,7 @@ in config = lib.mkIf cfg.enable ( lib.mkMerge [ # Common - ({ + { environment.systemPackages = with pkgs.coolercontrol; [ coolercontrol-gui ]; @@ -46,7 +46,7 @@ in coolercontrold.wantedBy = [ "multi-user.target" ]; }; }; - }) + } # Nvidia support (lib.mkIf cfg.nvidiaSupport { diff --git a/nixos/modules/programs/firefox.nix b/nixos/modules/programs/firefox.nix index d391b25892f4..70301b75d614 100644 --- a/nixos/modules/programs/firefox.nix +++ b/nixos/modules/programs/firefox.nix @@ -149,7 +149,7 @@ in languagePacks = lib.mkOption { # Available languages can be found in https://releases.mozilla.org/pub/firefox/releases/${cfg.package.version}/linux-x86_64/xpi/ type = lib.types.listOf ( - lib.types.enum ([ + lib.types.enum [ "ach" "af" "an" @@ -253,7 +253,7 @@ in "xh" "zh-CN" "zh-TW" - ]) + ] ); default = [ ]; description = '' @@ -285,7 +285,7 @@ in ''; }; - nativeMessagingHosts = ({ + nativeMessagingHosts = { packages = lib.mkOption { type = lib.types.listOf lib.types.package; default = [ ]; @@ -293,7 +293,7 @@ in Additional packages containing native messaging hosts that should be made available to Firefox extensions. ''; }; - }) + } // (builtins.mapAttrs (k: v: lib.mkEnableOption "${v.name} support") nmhOptions); }; diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index cbf1800e8e3b..63d2bd865758 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -382,8 +382,8 @@ in ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent"; ExecStart = "${cfg.package}/bin/ssh-agent " - + lib.optionalString (cfg.agentTimeout != null) ("-t ${cfg.agentTimeout} ") - + lib.optionalString (cfg.agentPKCS11Whitelist != null) ("-P ${cfg.agentPKCS11Whitelist} ") + + lib.optionalString (cfg.agentTimeout != null) "-t ${cfg.agentTimeout} " + + lib.optionalString (cfg.agentPKCS11Whitelist != null) "-P ${cfg.agentPKCS11Whitelist} " + "-a %t/ssh-agent"; StandardOutput = "null"; Type = "forking"; diff --git a/nixos/modules/programs/tsm-client.nix b/nixos/modules/programs/tsm-client.nix index 26623844513c..504b426c83f3 100644 --- a/nixos/modules/programs/tsm-client.nix +++ b/nixos/modules/programs/tsm-client.nix @@ -280,22 +280,22 @@ let # skip `null` value else [ - ( - " ${key}${ - if value == true then - "" - # just output key if value is `true` - else if isInt value then - " ${builtins.toString value}" - else if path.check value then - " \"${value}\"" - # enclose path in ".." - else if singleLineStr.check value then - " ${value}" - else - throw "assertion failed: cannot convert type" # should never happen - }" - ) + + " ${key}${ + if value == true then + "" + # just output key if value is `true` + else if isInt value then + " ${builtins.toString value}" + else if path.check value then + " \"${value}\"" + # enclose path in ".." + else if singleLineStr.check value then + " ${value}" + else + throw "assertion failed: cannot convert type" # should never happen + }" + ]; makeDsmSysStanza = diff --git a/nixos/modules/programs/winbox.nix b/nixos/modules/programs/winbox.nix index e0643030166b..78639f8d3ab9 100644 --- a/nixos/modules/programs/winbox.nix +++ b/nixos/modules/programs/winbox.nix @@ -10,7 +10,7 @@ let in { options.programs.winbox = { - enable = lib.mkEnableOption ("MikroTik Winbox"); + enable = lib.mkEnableOption "MikroTik Winbox"; package = lib.mkPackageOption pkgs "winbox" { }; openFirewall = lib.mkOption { diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index 07b4633bccd2..c9646d5cee06 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -37,7 +37,7 @@ in # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md type = lib.types.listOf ( - lib.types.enum ([ + lib.types.enum [ "main" "brackets" "pattern" @@ -45,7 +45,7 @@ in "regexp" "root" "line" - ]) + ] ); description = '' diff --git a/nixos/modules/security/please.nix b/nixos/modules/security/please.nix index b67f0945521a..7afdf7445849 100644 --- a/nixos/modules/security/please.nix +++ b/nixos/modules/security/please.nix @@ -97,7 +97,7 @@ in etc."please.ini".source = ini.generate "please.ini" ( cfg.settings - // (rec { + // rec { # The "root" user is allowed to do anything by default and this cannot # be overridden. root_run_as_any = { @@ -113,7 +113,7 @@ in root_list_as_any = root_run_as_any // { type = "list"; }; - }) + } ); }; diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index edbed8120e24..8798047a6d06 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -294,11 +294,11 @@ in where = parentWrapperDir; what = "tmpfs"; type = "tmpfs"; - options = lib.concatStringsSep "," ([ + options = lib.concatStringsSep "," [ "nodev" "mode=755" "size=${config.security.wrapperDirSize}" - ]); + ]; } ]; diff --git a/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix index 1d611844bf26..c1ee7023aa1f 100644 --- a/nixos/modules/services/audio/alsa.nix +++ b/nixos/modules/services/audio/alsa.nix @@ -157,7 +157,7 @@ in controls = lib.mkOption { type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options.name = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; @@ -187,7 +187,7 @@ in The maximum volume in dB. ''; }; - }) + } ); default = { }; example = lib.literalExpression '' @@ -206,7 +206,7 @@ in cardAliases = lib.mkOption { type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options.driver = lib.mkOption { type = lib.types.str; description = '' @@ -220,7 +220,7 @@ in The ID of the sound card ''; }; - }) + } ); default = { }; example = lib.literalExpression '' diff --git a/nixos/modules/services/audio/gmediarender.nix b/nixos/modules/services/audio/gmediarender.nix index ce4223880086..43217b9d1f05 100644 --- a/nixos/modules/services/audio/gmediarender.nix +++ b/nixos/modules/services/audio/gmediarender.nix @@ -81,18 +81,21 @@ in SupplementaryGroups = [ "audio" ]; ExecStart = "${cfg.package}/bin/gmediarender " - + lib.optionalString (cfg.audioDevice != null) ( - "--gstout-audiodevice=${utils.escapeSystemdExecArg cfg.audioDevice} " - ) - + lib.optionalString (cfg.audioSink != null) ( - "--gstout-audiosink=${utils.escapeSystemdExecArg cfg.audioSink} " - ) - + lib.optionalString (cfg.friendlyName != null) ( - "--friendly-name=${utils.escapeSystemdExecArg cfg.friendlyName} " - ) - + lib.optionalString (cfg.initialVolume != 0) ("--initial-volume=${toString cfg.initialVolume} ") - + lib.optionalString (cfg.port != null) ("--port=${toString cfg.port} ") - + lib.optionalString (cfg.uuid != null) ("--uuid=${utils.escapeSystemdExecArg cfg.uuid} "); + + lib.optionalString ( + cfg.audioDevice != null + ) "--gstout-audiodevice=${utils.escapeSystemdExecArg cfg.audioDevice} " + + + lib.optionalString ( + cfg.audioSink != null + ) "--gstout-audiosink=${utils.escapeSystemdExecArg cfg.audioSink} " + + + lib.optionalString ( + cfg.friendlyName != null + ) "--friendly-name=${utils.escapeSystemdExecArg cfg.friendlyName} " + + + lib.optionalString (cfg.initialVolume != 0) "--initial-volume=${toString cfg.initialVolume} " + + lib.optionalString (cfg.port != null) "--port=${toString cfg.port} " + + lib.optionalString (cfg.uuid != null) "--uuid=${utils.escapeSystemdExecArg cfg.uuid} "; Restart = "always"; RuntimeDirectory = "gmediarender"; diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index 46ccf56ddf7f..adabb2ce0f8b 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -206,14 +206,13 @@ let { nativeBuildInputs = [ pkgs.makeWrapper ]; } - ( - '' - makeWrapper "${original}" "$out/bin/${name}" \ - ${lib.concatStringsSep " \\\n " ( - lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set - )} - ''); + '' + makeWrapper "${original}" "$out/bin/${name}" \ + ${lib.concatStringsSep " \\\n " ( + lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set + )} + ''; # Returns a singleton list, due to usage of lib.optional mkBorgWrapper = diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index 8b4c59155f4d..fa1abfe12e2e 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -31,39 +31,38 @@ let # datasets. buildAllowCommand = permissions: dataset: - ( - "-+${pkgs.writeShellScript "zfs-allow-${dataset}" '' - # Here we explicitly use the booted system to guarantee the stable API needed by ZFS - # Run a ZFS list on the dataset to check if it exists - if ${ - lib.escapeShellArgs [ - "/run/booted-system/sw/bin/zfs" - "list" - dataset - ] - } 2> /dev/null; then + "-+${pkgs.writeShellScript "zfs-allow-${dataset}" '' + # Here we explicitly use the booted system to guarantee the stable API needed by ZFS + + # Run a ZFS list on the dataset to check if it exists + if ${ + lib.escapeShellArgs [ + "/run/booted-system/sw/bin/zfs" + "list" + dataset + ] + } 2> /dev/null; then + ${lib.escapeShellArgs [ + "/run/booted-system/sw/bin/zfs" + "allow" + cfg.user + (lib.concatStringsSep "," permissions) + dataset + ]} + ${lib.optionalString ((builtins.dirOf dataset) != ".") '' + else ${lib.escapeShellArgs [ "/run/booted-system/sw/bin/zfs" "allow" cfg.user (lib.concatStringsSep "," permissions) - dataset + # Remove the last part of the path + (builtins.dirOf dataset) ]} - ${lib.optionalString ((builtins.dirOf dataset) != ".") '' - else - ${lib.escapeShellArgs [ - "/run/booted-system/sw/bin/zfs" - "allow" - cfg.user - (lib.concatStringsSep "," permissions) - # Remove the last part of the path - (builtins.dirOf dataset) - ]} - ''} - fi - ''}" - ); + ''} + fi + ''}"; # Function to build "zfs unallow" commands for the filesystems we've # delegated permissions to. Here we unallow both the target but also @@ -73,28 +72,27 @@ let # since the dataset should have been created at this point. buildUnallowCommand = permissions: dataset: - ( - "-+${pkgs.writeShellScript "zfs-unallow-${dataset}" '' - # Here we explicitly use the booted system to guarantee the stable API needed by ZFS - ${lib.escapeShellArgs [ + + "-+${pkgs.writeShellScript "zfs-unallow-${dataset}" '' + # Here we explicitly use the booted system to guarantee the stable API needed by ZFS + ${lib.escapeShellArgs [ + "/run/booted-system/sw/bin/zfs" + "unallow" + cfg.user + (lib.concatStringsSep "," permissions) + dataset + ]} + ${lib.optionalString ((builtins.dirOf dataset) != ".") ( + lib.escapeShellArgs [ "/run/booted-system/sw/bin/zfs" "unallow" cfg.user (lib.concatStringsSep "," permissions) - dataset - ]} - ${lib.optionalString ((builtins.dirOf dataset) != ".") ( - lib.escapeShellArgs [ - "/run/booted-system/sw/bin/zfs" - "unallow" - cfg.user - (lib.concatStringsSep "," permissions) - # Remove the last part of the path - (builtins.dirOf dataset) - ] - )} - ''}" - ); + # Remove the last part of the path + (builtins.dirOf dataset) + ] + )} + ''}"; in { diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index b21a4ca5c277..e46799e3870d 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -189,13 +189,13 @@ in services.hadoop.yarnSiteInternal = with cfg.yarn.nodemanager; lib.mkMerge [ - ({ + { "yarn.nodemanager.local-dirs" = lib.mkIf (localDir != null) (concatStringsSep "," localDir); "yarn.scheduler.maximum-allocation-vcores" = resource.maximumAllocationVCores; "yarn.scheduler.maximum-allocation-mb" = resource.maximumAllocationMB; "yarn.nodemanager.resource.cpu-vcores" = resource.cpuVCores; "yarn.nodemanager.resource.memory-mb" = resource.memoryMB; - }) + } (lib.mkIf useCGroups ( lib.warnIf (lib.versionOlder cfg.package.version "3.5.0") '' diff --git a/nixos/modules/services/cluster/kubernetes/default.nix b/nixos/modules/services/cluster/kubernetes/default.nix index 86e5e072aa06..b29c8ece7321 100644 --- a/nixos/modules/services/cluster/kubernetes/default.nix +++ b/nixos/modules/services/cluster/kubernetes/default.nix @@ -342,14 +342,12 @@ in # dns addon is enabled by default services.kubernetes.addons.dns.enable = lib.mkDefault true; - services.kubernetes.apiserverAddress = lib.mkDefault ( - "https://${ - if cfg.apiserver.advertiseAddress != null then - cfg.apiserver.advertiseAddress - else - "${cfg.masterAddress}:${toString cfg.apiserver.securePort}" - }" - ); + services.kubernetes.apiserverAddress = lib.mkDefault "https://${ + if cfg.apiserver.advertiseAddress != null then + cfg.apiserver.advertiseAddress + else + "${cfg.masterAddress}:${toString cfg.apiserver.securePort}" + }"; } ) ]; diff --git a/nixos/modules/services/cluster/temporal/default.nix b/nixos/modules/services/cluster/temporal/default.nix index 57a3e39157d3..329de0d379f2 100644 --- a/nixos/modules/services/cluster/temporal/default.nix +++ b/nixos/modules/services/cluster/temporal/default.nix @@ -137,7 +137,7 @@ in "@chown" ]; } - // (lib.optionalAttrs (usingDefaultDataDir) { + // (lib.optionalAttrs usingDefaultDataDir { StateDirectory = "temporal"; StateDirectoryMode = "0700"; }); diff --git a/nixos/modules/services/continuous-integration/gitea-actions-runner.nix b/nixos/modules/services/continuous-integration/gitea-actions-runner.nix index 8225d0ca2ebc..3f7643a941d0 100644 --- a/nixos/modules/services/continuous-integration/gitea-actions-runner.nix +++ b/nixos/modules/services/continuous-integration/gitea-actions-runner.nix @@ -200,10 +200,10 @@ in after = [ "network-online.target" ] - ++ optionals (wantsDocker) [ + ++ optionals wantsDocker [ "docker.service" ] - ++ optionals (wantsPodman) [ + ++ optionals wantsPodman [ "podman.service" ]; wantedBy = [ @@ -213,7 +213,7 @@ in optionalAttrs (instance.token != null) { TOKEN = "${instance.token}"; } - // optionalAttrs (wantsPodman) { + // optionalAttrs wantsPodman { DOCKER_HOST = "unix:///run/podman/podman.sock"; } // { @@ -266,10 +266,10 @@ in ]; ExecStart = "${cfg.package}/bin/act_runner daemon --config ${configFile}"; SupplementaryGroups = - optionals (wantsDocker) [ + optionals wantsDocker [ "docker" ] - ++ optionals (wantsPodman) [ + ++ optionals wantsPodman [ "podman" ]; } diff --git a/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix index c05bfc47bb77..dd55e0e0dd2b 100644 --- a/nixos/modules/services/databases/foundationdb.nix +++ b/nixos/modules/services/databases/foundationdb.nix @@ -230,7 +230,7 @@ in ''; type = lib.types.nullOr ( - lib.types.submodule ({ + lib.types.submodule { options = { certificate = lib.mkOption { type = lib.types.str; @@ -258,7 +258,7 @@ in ''; }; }; - }) + } ); }; @@ -274,7 +274,7 @@ in FoundationDB locality settings. ''; - type = lib.types.submodule ({ + type = lib.types.submodule { options = { machineId = lib.mkOption { default = null; @@ -316,7 +316,7 @@ in ''; }; }; - }); + }; }; extraReadWritePaths = lib.mkOption { diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 72593aff4c84..1fc1ede6313c 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -357,7 +357,7 @@ in ] ) contentsFiles) ++ [ "${openldap}/bin/slaptest -u -F ${configDir}" ]; - ExecStart = lib.escapeShellArgs ([ + ExecStart = lib.escapeShellArgs [ "${openldap}/libexec/slapd" "-d" "0" @@ -365,7 +365,7 @@ in configDir "-h" (lib.concatStringsSep " " cfg.urlList) - ]); + ]; Type = "notify"; # Fixes an error where openldap attempts to notify from a thread # outside the main process: diff --git a/nixos/modules/services/desktops/system76-scheduler.nix b/nixos/modules/services/desktops/system76-scheduler.nix index 1a8abe810cd8..379e4a78c9e3 100644 --- a/nixos/modules/services/desktops/system76-scheduler.nix +++ b/nixos/modules/services/desktops/system76-scheduler.nix @@ -136,9 +136,9 @@ let ++ (optional (a.nice != null) "nice=${toString a.nice}") ++ (optional (a.class != null) "sched=${prioToString a.class a.prio}") ++ (optional (a.ioClass != null) "io=${prioToString a.ioClass a.ioPrio}") - ++ (optional ((builtins.length a.matchers) != 0) ( + ++ (optional ((builtins.length a.matchers) != 0) "{\n${concatStringsSep "\n" (map (m: " ${indent}${m}") a.matchers)}\n${indent}}" - )) + ) ); in diff --git a/nixos/modules/services/development/athens.nix b/nixos/modules/services/development/athens.nix index 1f41a269e11b..984b4a9ecc52 100644 --- a/nixos/modules/services/development/athens.nix +++ b/nixos/modules/services/development/athens.nix @@ -7,7 +7,7 @@ let cfg = config.services.athens; - athensConfig = lib.flip lib.recursiveUpdate cfg.extraConfig ({ + athensConfig = lib.flip lib.recursiveUpdate cfg.extraConfig { GoBinary = "${cfg.goBinary}/bin/go"; GoEnv = cfg.goEnv; GoBinaryEnvVars = lib.mapAttrsToList (k: v: "${k}=${v}") cfg.goBinaryEnvVars; @@ -141,7 +141,7 @@ let }; }; }; - }); + }; configFile = lib.pipe athensConfig [ (lib.filterAttrsRecursive (_k: v: v != null)) diff --git a/nixos/modules/services/hardware/display.nix b/nixos/modules/services/hardware/display.nix index ae8da40630e1..043db0a5b0cd 100644 --- a/nixos/modules/services/hardware/display.nix +++ b/nixos/modules/services/hardware/display.nix @@ -132,7 +132,7 @@ in hardware.display.outputs = lib.mkOption { type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options = { edid = lib.mkOption { type = with lib.types; nullOr str; @@ -161,7 +161,7 @@ in ''; }; }; - }) + } ); description = '' Hardware/kernel-level configuration of specific outputs. diff --git a/nixos/modules/services/hardware/libinput.nix b/nixos/modules/services/hardware/libinput.nix index 47f5a8db327a..1cae86827d73 100644 --- a/nixos/modules/services/hardware/libinput.nix +++ b/nixos/modules/services/hardware/libinput.nix @@ -370,12 +370,12 @@ in ( option: lib.mkRenamedOptionModule - ([ + [ "services" "xserver" "libinput" option - ]) + ] [ "services" "libinput" diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index 89985a983304..f346070441b3 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -104,7 +104,7 @@ in MemoryDenyWriteExecute = true; PrivateUsers = true; - SupplementaryGroups = lib.optional (allowSystemdJournal) "systemd-journal"; + SupplementaryGroups = lib.optional allowSystemdJournal "systemd-journal"; } // (optionalAttrs (!pkgs.stdenv.hostPlatform.isAarch64) { # FIXME: figure out why this breaks on aarch64 diff --git a/nixos/modules/services/mail/listmonk.nix b/nixos/modules/services/mail/listmonk.nix index fdc06b884eb2..237cee42ca63 100644 --- a/nixos/modules/services/mail/listmonk.nix +++ b/nixos/modules/services/mail/listmonk.nix @@ -165,11 +165,11 @@ in # Default parameters from https://github.com/knadh/listmonk/blob/master/config.toml.sample services.listmonk.settings."app".address = lib.mkDefault "localhost:9000"; services.listmonk.settings."db" = lib.mkMerge [ - ({ + { max_open = lib.mkDefault 25; max_idle = lib.mkDefault 25; max_lifetime = lib.mkDefault "300s"; - }) + } (lib.mkIf cfg.database.createLocally { host = lib.mkDefault "/run/postgresql"; port = lib.mkDefault 5432; diff --git a/nixos/modules/services/mail/public-inbox.nix b/nixos/modules/services/mail/public-inbox.nix index 5df7dc05d23c..0933d2dd535d 100644 --- a/nixos/modules/services/mail/public-inbox.nix +++ b/nixos/modules/services/mail/public-inbox.nix @@ -605,7 +605,7 @@ in ]; } ) - ({ + { public-inbox-init = let PI_CONFIG = gitIni.generate "public-inbox.ini" ( @@ -674,7 +674,7 @@ in }; } ]; - }) + } ]; environment.systemPackages = [ cfg.package ]; }; diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index 324cdb1aadc5..2bae14f47813 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -129,7 +129,7 @@ in config = lib.mkIf cfg.enable { # backward compatibility: if password is set but not passwordFile, make one. services.roundcube.database.passwordFile = lib.mkIf (!localDB && cfg.database.password != "") ( - lib.mkDefault ("${pkgs.writeText "roundcube-password" cfg.database.password}") + lib.mkDefault "${pkgs.writeText "roundcube-password" cfg.database.password}" ); warnings = lib.optional (!localDB && cfg.database.password != "") diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix index d9d6e119d9f3..34004da62ef7 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart-mail.nix @@ -133,7 +133,7 @@ in in { path = "/var/cache/stalwart-mail"; - resource = lib.mkIf (hasHttpListener) (lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip"); + resource = lib.mkIf hasHttpListener (lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip"); }; }; diff --git a/nixos/modules/services/matrix/conduit.nix b/nixos/modules/services/matrix/conduit.nix index 8cce1db5c9d0..3d33980f6c9e 100644 --- a/nixos/modules/services/matrix/conduit.nix +++ b/nixos/modules/services/matrix/conduit.nix @@ -143,10 +143,10 @@ in wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ]; after = [ "network-online.target" ]; - environment = lib.mkMerge ([ + environment = lib.mkMerge [ { CONDUIT_CONFIG = configFile; } cfg.extraEnvironment - ]); + ]; serviceConfig = { DynamicUser = true; User = "conduit"; diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix index 4eb59340fc9c..bf7fa7621a78 100644 --- a/nixos/modules/services/misc/autorandr.nix +++ b/nixos/modules/services/misc/autorandr.nix @@ -232,7 +232,7 @@ let profileToFiles = name: profile: with profile; - lib.mkMerge ([ + lib.mkMerge [ { "xdg/autorandr/${name}/setup".text = lib.concatStringsSep "\n" ( lib.mapAttrsToList fingerprintToString fingerprint @@ -244,7 +244,7 @@ let (lib.mapAttrs' (hookToFile "${name}/postswitch.d") hooks.postswitch) (lib.mapAttrs' (hookToFile "${name}/preswitch.d") hooks.preswitch) (lib.mapAttrs' (hookToFile "${name}/predetect.d") hooks.predetect) - ]); + ]; fingerprintToString = name: edid: "${name} ${edid}"; configToString = name: config: @@ -373,12 +373,12 @@ in environment = { systemPackages = [ pkgs.autorandr ]; - etc = lib.mkMerge ([ + etc = lib.mkMerge [ (lib.mapAttrs' (hookToFile "postswitch.d") cfg.hooks.postswitch) (lib.mapAttrs' (hookToFile "preswitch.d") cfg.hooks.preswitch) (lib.mapAttrs' (hookToFile "predetect.d") cfg.hooks.predetect) (lib.mkMerge (lib.mapAttrsToList profileToFiles cfg.profiles)) - ]); + ]; }; systemd.services.autorandr = { diff --git a/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix index b9ab598d93dd..28817693dd18 100644 --- a/nixos/modules/services/misc/bepasty.nix +++ b/nixos/modules/services/misc/bepasty.nix @@ -138,7 +138,7 @@ in # creates gunicorn systemd service for each configured server systemd.services = lib.mapAttrs' ( name: server: - lib.nameValuePair ("bepasty-server-${name}-gunicorn") ({ + lib.nameValuePair "bepasty-server-${name}-gunicorn" { description = "Bepasty Server ${name}"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; @@ -186,7 +186,7 @@ in -k gevent ''; }; - }) + } ) cfg.servers; users.users.${user} = { diff --git a/nixos/modules/services/misc/portunus.nix b/nixos/modules/services/misc/portunus.nix index 0b0718289c8a..700d1a6871bb 100644 --- a/nixos/modules/services/misc/portunus.nix +++ b/nixos/modules/services/misc/portunus.nix @@ -270,9 +270,9 @@ in PORTUNUS_SLAPD_USER = cfg.ldap.user; PORTUNUS_SLAPD_SCHEMA_DIR = "${cfg.ldap.package}/etc/schema"; } - // (lib.optionalAttrs (cfg.seedPath != null) ({ + // (lib.optionalAttrs (cfg.seedPath != null) { PORTUNUS_SEED_PATH = cfg.seedPath; - })) + }) // (lib.optionalAttrs cfg.ldap.tls ( let acmeDirectory = config.security.acme.certs."${cfg.domain}".directory; diff --git a/nixos/modules/services/misc/redlib.nix b/nixos/modules/services/misc/redlib.nix index e3158fbad43a..e5e00adfd6f5 100644 --- a/nixos/modules/services/misc/redlib.nix +++ b/nixos/modules/services/misc/redlib.nix @@ -20,10 +20,10 @@ let cfg = config.services.redlib; - args = concatStringsSep " " ([ + args = concatStringsSep " " [ "--port ${toString cfg.port}" "--address ${cfg.address}" - ]); + ]; boolToString' = b: if b then "on" else "off"; in diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix index 8f189b22019d..f4a16f7a4894 100644 --- a/nixos/modules/services/misc/snapper.nix +++ b/nixos/modules/services/misc/snapper.nix @@ -265,11 +265,11 @@ in } // (lib.mapAttrs' ( name: subvolume: - lib.nameValuePair "snapper/configs/${name}" ({ + lib.nameValuePair "snapper/configs/${name}" { text = lib.generators.toKeyValue { inherit mkKeyValue; } ( lib.filterAttrs (k: v: v != defaultOf k) subvolume ); - }) + } ) cfg.configs) // (lib.optionalAttrs (cfg.filters != null) { "snapper/filters/default.txt".text = cfg.filters; }); }; diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix index f4f2f22a8b48..e396ccad5494 100644 --- a/nixos/modules/services/misc/synergy.nix +++ b/nixos/modules/services/misc/synergy.nix @@ -129,7 +129,7 @@ in }${ lib.optionalString (cfgS.screenName != "") " -n ${cfgS.screenName}" }${lib.optionalString cfgS.tls.enable " --enable-crypto"}${ - lib.optionalString (cfgS.tls.cert != null) (" --tls-cert ${cfgS.tls.cert}") + lib.optionalString (cfgS.tls.cert != null) " --tls-cert ${cfgS.tls.cert}" }''; serviceConfig.Restart = "on-failure"; }; diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index 8d73457764ff..bc42740bda44 100644 --- a/nixos/modules/services/monitoring/graphite.nix +++ b/nixos/modules/services/monitoring/graphite.nix @@ -354,7 +354,7 @@ in ]; }) - (lib.mkIf cfg.web.enable ({ + (lib.mkIf cfg.web.enable { systemd.services.graphiteWeb = { description = "Graphite Web Interface"; wantedBy = [ "multi-user.target" ]; @@ -415,7 +415,7 @@ in }; environment.systemPackages = [ pkgs.python3Packages.graphite-web ]; - })) + }) (lib.mkIf cfg.seyren.enable { systemd.services.seyren = { diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 60e4e5ac4d15..a4fa24bdcd5a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -344,7 +344,7 @@ let "-m comment --comment ${name}-exporter -j nixos-fw-accept" ]); networking.firewall.extraInputRules = mkIf (conf.openFirewall && nftables) conf.firewallRules; - systemd.services."prometheus-${name}-exporter" = mkMerge ([ + systemd.services."prometheus-${name}-exporter" = mkMerge [ { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; @@ -381,14 +381,14 @@ let serviceConfig.UMask = "0077"; } serviceOpts - ]); + ]; }; in { options.services.prometheus.exporters = mkOption { type = types.submodule { - options = (mkSubModules); + options = mkSubModules; imports = [ ../../../misc/assertions.nix (lib.mkRenamedOptionModule [ "unifi-poller" ] [ "unpoller" ]) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/json.nix b/nixos/modules/services/monitoring/prometheus/exporters/json.nix index 46aed2ba4793..07fa980f5bac 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/json.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/json.nix @@ -49,9 +49,9 @@ in For more information, take a look at the official documentation (https://github.com/prometheus-community/json_exporter) of the json_exporter. '') - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix index ec918e165f5a..089282436041 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix @@ -83,9 +83,9 @@ in (mkRemovedOptionModule [ "insecure" ] '' This option was replaced by 'prometheus.exporters.nginx.sslVerify'. '') - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters/pgbouncer.nix b/nixos/modules/services/monitoring/prometheus/exporters/pgbouncer.nix index f837174fde7a..4b9cc658bf4a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/pgbouncer.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/pgbouncer.nix @@ -188,9 +188,9 @@ in into the cmdline of the exporter making the connection string effectively world-readable. '') - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters/pihole.nix b/nixos/modules/services/monitoring/prometheus/exporters/pihole.nix index f2d37c6b95e6..74e84ab11420 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/pihole.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/pihole.nix @@ -18,10 +18,10 @@ in { imports = [ (mkRemovedOptionModule [ "interval" ] "This option has been removed.") - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; port = 9617; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix index 21e03154a88f..de8ba9d676ae 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix @@ -111,9 +111,9 @@ in For more information, take a look at the official documentation (https://github.com/prometheus-community/json_exporter) of the json_exporter. '') - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix b/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix index 73656b896085..aab30670830a 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix @@ -26,10 +26,10 @@ in (mkRemovedOptionModule [ "fetchType" ] "This option was removed, use the `unbound.host` option instead.") - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; port = 9167; diff --git a/nixos/modules/services/monitoring/thanos.nix b/nixos/modules/services/monitoring/thanos.nix index 747342384385..550e00040817 100644 --- a/nixos/modules/services/monitoring/thanos.nix +++ b/nixos/modules/services/monitoring/thanos.nix @@ -774,10 +774,8 @@ in }; query-frontend = paramsToOptions params.query-frontend // { - enable = mkEnableOption ( - "the Thanos query frontend implements a service deployed in front of queriers to - improve query parallelization and caching." - ); + enable = mkEnableOption "the Thanos query frontend implements a service deployed in front of queriers to + improve query parallelization and caching."; arguments = mkArgumentsOption "query-frontend"; }; @@ -800,9 +798,7 @@ in }; receive = paramsToOptions params.receive // { - enable = mkEnableOption ( - "the Thanos receiver which accept Prometheus remote write API requests and write to local tsdb" - ); + enable = mkEnableOption "the Thanos receiver which accept Prometheus remote write API requests and write to local tsdb"; arguments = mkArgumentsOption "receive"; }; }; diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index e8c61ab3f846..bc8934eb8fa1 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -336,7 +336,7 @@ in ConfigurationDirectory = "bind"; ReadWritePaths = [ (lib.mapAttrsToList ( - name: config: if (lib.hasPrefix "/" config.file) then ("-${dirOf config.file}") else "" + name: config: if (lib.hasPrefix "/" config.file) then "-${dirOf config.file}" else "" ) cfg.zones) cfg.directory ]; diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix index 43ea76d5d710..38cc7e35123f 100644 --- a/nixos/modules/services/networking/cjdns.nix +++ b/nixos/modules/services/networking/cjdns.nix @@ -170,7 +170,7 @@ in ''; }; connectTo = lib.mkOption { - type = lib.types.attrsOf (lib.types.submodule (connectToSubmodule)); + type = lib.types.attrsOf (lib.types.submodule connectToSubmodule); default = { }; example = lib.literalExpression '' { @@ -216,7 +216,7 @@ in }; connectTo = lib.mkOption { - type = lib.types.attrsOf (lib.types.submodule (connectToSubmodule)); + type = lib.types.attrsOf (lib.types.submodule connectToSubmodule); default = { }; example = lib.literalExpression '' { diff --git a/nixos/modules/services/networking/hans.nix b/nixos/modules/services/networking/hans.nix index 82cd3e8a00dd..a0445790ee38 100644 --- a/nixos/modules/services/networking/hans.nix +++ b/nixos/modules/services/networking/hans.nix @@ -37,7 +37,7 @@ in } ''; type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options = { server = lib.mkOption { type = lib.types.str; @@ -60,7 +60,7 @@ in }; }; - }) + } ); }; diff --git a/nixos/modules/services/networking/hylafax/options.nix b/nixos/modules/services/networking/hylafax/options.nix index d09ad9d463e4..ec7adf5af49f 100644 --- a/nixos/modules/services/networking/hylafax/options.nix +++ b/nixos/modules/services/networking/hylafax/options.nix @@ -54,7 +54,7 @@ let int listOf ; - innerType = coercedTo bool (x: if x then "Yes" else "No") (coercedTo int (toString) str); + innerType = coercedTo bool (x: if x then "Yes" else "No") (coercedTo int toString str); in attrsOf (coercedTo innerType lib.singleton (listOf innerType)); diff --git a/nixos/modules/services/networking/inadyn.nix b/nixos/modules/services/networking/inadyn.nix index 5507c7b0ebc6..384c6932aefa 100644 --- a/nixos/modules/services/networking/inadyn.nix +++ b/nixos/modules/services/networking/inadyn.nix @@ -89,9 +89,9 @@ in }; in { - enable = lib.mkEnableOption ('' + enable = lib.mkEnableOption '' synchronise your machine's IP address with a dynamic DNS provider using inadyn - ''); + ''; user = lib.mkOption { default = "inadyn"; type = lib.types.str; diff --git a/nixos/modules/services/networking/iodine.nix b/nixos/modules/services/networking/iodine.nix index ed3ff28cd5f4..763bce1a905d 100644 --- a/nixos/modules/services/networking/iodine.nix +++ b/nixos/modules/services/networking/iodine.nix @@ -56,7 +56,7 @@ in } ''; type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options = { server = lib.mkOption { type = lib.types.str; @@ -85,7 +85,7 @@ in description = "Path to a file containing the password."; }; }; - }) + } ); }; diff --git a/nixos/modules/services/networking/nat-iptables.nix b/nixos/modules/services/networking/nat-iptables.nix index 804dc0e0340c..16cd8c4686b5 100644 --- a/nixos/modules/services/networking/nat-iptables.nix +++ b/nixos/modules/services/networking/nat-iptables.nix @@ -219,7 +219,7 @@ in }; config = mkIf (!config.networking.nftables.enable) (mkMerge [ - ({ networking.firewall.extraCommands = mkBefore flushNat; }) + { networking.firewall.extraCommands = mkBefore flushNat; } (mkIf config.networking.nat.enable { networking.firewall = mkIf config.networking.firewall.enable { diff --git a/nixos/modules/services/networking/ncps.nix b/nixos/modules/services/networking/ncps.nix index b0e821fee5b1..ebc3af2cec0f 100644 --- a/nixos/modules/services/networking/ncps.nix +++ b/nixos/modules/services/networking/ncps.nix @@ -347,7 +347,7 @@ in ]; unitConfig.RequiresMountsFor = lib.concatStringsSep " " ( - [ "${cfg.cache.dataPath}" ] ++ lib.optional (isSqlite) dbDir + [ "${cfg.cache.dataPath}" ] ++ lib.optional isSqlite dbDir ); }; }; diff --git a/nixos/modules/services/networking/nylon.nix b/nixos/modules/services/networking/nylon.nix index b9d579a61c1e..e7e4e024f8a2 100644 --- a/nixos/modules/services/networking/nylon.nix +++ b/nixos/modules/services/networking/nylon.nix @@ -160,7 +160,7 @@ in ###### implementation - config = lib.mkIf (lib.length (enabledNylons) > 0) { + config = lib.mkIf (lib.length enabledNylons > 0) { users.users.nylon = { group = "nylon"; diff --git a/nixos/modules/services/networking/pihole-ftl.nix b/nixos/modules/services/networking/pihole-ftl.nix index 25c3634d145e..3840d6fefd12 100644 --- a/nixos/modules/services/networking/pihole-ftl.nix +++ b/nixos/modules/services/networking/pihole-ftl.nix @@ -186,7 +186,7 @@ in }; queryLogDeleter = { - enable = mkEnableOption ("Pi-hole FTL DNS query log deleter"); + enable = mkEnableOption "Pi-hole FTL DNS query log deleter"; age = mkOption { type = types.int; diff --git a/nixos/modules/services/networking/spiped.nix b/nixos/modules/services/networking/spiped.nix index 0be0b445ae6b..723e9296e85f 100644 --- a/nixos/modules/services/networking/spiped.nix +++ b/nixos/modules/services/networking/spiped.nix @@ -21,7 +21,7 @@ in config = mkOption { type = types.attrsOf ( - types.submodule ({ + types.submodule { options = { encrypt = mkOption { type = types.bool; @@ -138,7 +138,7 @@ in description = "Disable target address re-resolution."; }; }; - }) + } ); default = { }; diff --git a/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix b/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix index b8a46d5150bc..4614b4617a4f 100644 --- a/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix +++ b/nixos/modules/services/networking/strongswan-swanctl/param-lib.nix @@ -45,13 +45,13 @@ rec { paramsToRenderedStrings = cfg: ps: filterEmptySets ( - (mapParamsRecursive ( + mapParamsRecursive ( path: name: param: let value = attrByPath path null cfg; in optionalAttrs (value != null) (param.render name value) - ) ps) + ) ps ); filterEmptySets = diff --git a/nixos/modules/services/networking/tinc.nix b/nixos/modules/services/networking/tinc.nix index a26b2af96cd7..e082214b5eca 100644 --- a/nixos/modules/services/networking/tinc.nix +++ b/nixos/modules/services/networking/tinc.nix @@ -376,11 +376,11 @@ in network: data: flip mapAttrs' data.hosts ( host: text: - nameValuePair ("tinc/${network}/hosts/${host}") ({ + nameValuePair "tinc/${network}/hosts/${host}" { mode = "0644"; user = "tinc-${network}"; inherit text; - }) + } ) // { "tinc/${network}/tinc.conf" = { @@ -399,7 +399,7 @@ in systemd.services = flip mapAttrs' cfg.networks ( network: data: - nameValuePair ("tinc.${network}") ( + nameValuePair "tinc.${network}" ( let version = getVersion data.package; in @@ -481,11 +481,11 @@ in users.users = flip mapAttrs' cfg.networks ( network: _: - nameValuePair ("tinc-${network}") ({ + nameValuePair "tinc-${network}" { description = "Tinc daemon user for ${network}"; isSystemUser = true; group = "tinc-${network}"; - }) + } ); users.groups = flip mapAttrs' cfg.networks (network: _: nameValuePair "tinc-${network}" { }); } diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix index f5d4cbeffabb..71a258fbfee1 100644 --- a/nixos/modules/services/networking/xinetd.nix +++ b/nixos/modules/services/networking/xinetd.nix @@ -65,7 +65,7 @@ in type = with types; - listOf (submodule ({ + listOf (submodule { options = { @@ -130,7 +130,7 @@ in }; - })); + }); }; diff --git a/nixos/modules/services/search/opensearch.nix b/nixos/modules/services/search/opensearch.nix index eb2ec893698e..339ab0699c0e 100644 --- a/nixos/modules/services/search/opensearch.nix +++ b/nixos/modules/services/search/opensearch.nix @@ -263,7 +263,7 @@ in TimeoutStartSec = "infinity"; DynamicUser = usingDefaultUserAndGroup && usingDefaultDataDir; } - // (lib.optionalAttrs (usingDefaultDataDir) { + // (lib.optionalAttrs usingDefaultDataDir { StateDirectory = "opensearch"; StateDirectoryMode = "0700"; }); diff --git a/nixos/modules/services/search/quickwit.nix b/nixos/modules/services/search/quickwit.nix index 4fd74c1543e0..c87225aa3270 100644 --- a/nixos/modules/services/search/quickwit.nix +++ b/nixos/modules/services/search/quickwit.nix @@ -182,7 +182,7 @@ in "@chown" ]; } - // (lib.optionalAttrs (usingDefaultDataDir) { + // (lib.optionalAttrs usingDefaultDataDir { StateDirectory = "quickwit"; StateDirectoryMode = "0700"; }); diff --git a/nixos/modules/services/security/esdm.nix b/nixos/modules/services/security/esdm.nix index fbce62926275..398bd8a08917 100644 --- a/nixos/modules/services/security/esdm.nix +++ b/nixos/modules/services/security/esdm.nix @@ -42,10 +42,10 @@ in config = lib.mkIf cfg.enable ( lib.mkMerge [ - ({ + { systemd.packages = [ cfg.package ]; systemd.services."esdm-server".wantedBy = [ "basic.target" ]; - }) + } # It is necessary to set those options for these services to be started by systemd in NixOS (lib.mkIf cfg.enableLinuxCompatServices { systemd.targets."esdm-linux-compat".wantedBy = [ "basic.target" ]; diff --git a/nixos/modules/services/web-apps/dolibarr.nix b/nixos/modules/services/web-apps/dolibarr.nix index 86b8bd6bc892..1e22847063b2 100644 --- a/nixos/modules/services/web-apps/dolibarr.nix +++ b/nixos/modules/services/web-apps/dolibarr.nix @@ -295,7 +295,7 @@ in services.nginx.virtualHosts."${cfg.domain}" = mkIf (cfg.nginx != null) ( lib.mkMerge [ cfg.nginx - ({ + { root = lib.mkForce "${package}/htdocs"; locations."/".index = "index.php"; locations."~ [^/]\\.php(/|$)" = { @@ -304,7 +304,7 @@ in fastcgi_pass unix:${config.services.phpfpm.pools.dolibarr.socket}; ''; }; - }) + } ] ); diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 8a197c947a6e..c1582b3ee9ff 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -131,10 +131,11 @@ let envFile = pkgs.writeText "mastodon.env" ( lib.concatMapStrings (s: s + "\n") ( - (lib.concatLists ( + lib.concatLists ( lib.mapAttrsToList (name: value: lib.optional (value != null) ''${name}="${toString value}"'') env - )) + ) ) + ); mastodonTootctl = diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 36640ea8a953..cafa64b29e7a 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -283,7 +283,7 @@ let 'apps_paths' => [ ${lib.concatStrings (lib.mapAttrsToList mkAppStoreConfig appStores)} ], - ${lib.optionalString (showAppStoreSetting) "'appstoreenabled' => ${renderedAppStoreSetting},"} + ${lib.optionalString showAppStoreSetting "'appstoreenabled' => ${renderedAppStoreSetting},"} ${lib.optionalString cfg.caching.apcu "'memcache.local' => '\\OC\\Memcache\\APCu',"} ${lib.optionalString (c.dbname != null) "'dbname' => '${c.dbname}',"} ${lib.optionalString (c.dbhost != null) "'dbhost' => '${c.dbhost}',"} diff --git a/nixos/modules/services/web-apps/nifi.nix b/nixos/modules/services/web-apps/nifi.nix index f4c175a68aa2..7d40e15add13 100644 --- a/nixos/modules/services/web-apps/nifi.nix +++ b/nixos/modules/services/web-apps/nifi.nix @@ -19,10 +19,11 @@ let envFile = pkgs.writeText "nifi.env" ( lib.concatMapStrings (s: s + "\n") ( - (lib.concatLists ( + lib.concatLists ( lib.mapAttrsToList (name: value: lib.optional (value != null) ''${name}="${toString value}"'') env - )) + ) ) + ); nifiEnv = pkgs.writeShellScriptBin "nifi-env" '' diff --git a/nixos/modules/services/web-apps/oncall.nix b/nixos/modules/services/web-apps/oncall.nix index cd842606f278..98ddae259e7a 100644 --- a/nixos/modules/services/web-apps/oncall.nix +++ b/nixos/modules/services/web-apps/oncall.nix @@ -106,10 +106,10 @@ in # Disable debug, only needed for development services.oncall.settings = lib.mkMerge [ - ({ + { debug = lib.mkDefault false; auth.debug = lib.mkDefault false; - }) + } ]; services.uwsgi = { diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index c4213319e052..24258cdc7a4f 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -70,10 +70,11 @@ let envFile = pkgs.writeText "peertube.env" ( lib.concatMapStrings (s: s + "\n") ( - (lib.concatLists ( + lib.concatLists ( lib.mapAttrsToList (name: value: lib.optional (value != null) ''${name}="${toString value}"'') env - )) + ) ) + ); peertubeEnv = pkgs.writeShellScriptBin "peertube-env" '' diff --git a/nixos/modules/services/web-apps/pixelfed.nix b/nixos/modules/services/web-apps/pixelfed.nix index 0022cbe57ac6..95661ff3852e 100644 --- a/nixos/modules/services/web-apps/pixelfed.nix +++ b/nixos/modules/services/web-apps/pixelfed.nix @@ -243,7 +243,7 @@ in services.redis.servers.pixelfed.enable = lib.mkIf cfg.redis.createLocally true; services.pixelfed.settings = mkMerge [ - ({ + { APP_ENV = mkDefault "production"; APP_DEBUG = mkDefault false; # https://github.com/pixelfed/pixelfed/blob/dev/app/Console/Commands/Installer.php#L312-L316 @@ -270,7 +270,7 @@ in LOG_CHANNEL = mkDefault "stderr"; # TODO: find out the correct syntax? # TRUST_PROXIES = mkDefault "127.0.0.1/8, ::1/128"; - }) + } (mkIf (cfg.redis.createLocally) { BROADCAST_DRIVER = mkDefault "redis"; CACHE_DRIVER = mkDefault "redis"; diff --git a/nixos/modules/services/web-apps/sftpgo.nix b/nixos/modules/services/web-apps/sftpgo.nix index 2a76ccc17977..8f767b85162c 100644 --- a/nixos/modules/services/web-apps/sftpgo.nix +++ b/nixos/modules/services/web-apps/sftpgo.nix @@ -358,7 +358,7 @@ in }; serviceConfig = mkMerge [ - ({ + { Type = "simple"; User = cfg.user; Group = cfg.group; @@ -397,7 +397,7 @@ in "~@privileged" ]; UMask = "0077"; - }) + } (mkIf hasPrivilegedPorts { AmbientCapabilities = "CAP_NET_BIND_SERVICE"; }) diff --git a/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix b/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix index 43b24fdc4a96..1face1eae84b 100644 --- a/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix +++ b/nixos/modules/services/web-servers/apache-httpd/vhost-options.nix @@ -37,7 +37,7 @@ in listen = mkOption { type = with types; - listOf (submodule ({ + listOf (submodule { options = { port = mkOption { type = types.port; @@ -54,7 +54,7 @@ in description = "Whether to enable SSL (https) support."; }; }; - })); + }); default = [ ]; example = [ { diff --git a/nixos/modules/services/web-servers/hitch/default.nix b/nixos/modules/services/web-servers/hitch/default.nix index baec5a34eb56..63c490acf46e 100644 --- a/nixos/modules/services/web-servers/hitch/default.nix +++ b/nixos/modules/services/web-servers/hitch/default.nix @@ -11,11 +11,11 @@ let with lib; pkgs.writeText "hitch.conf" ( concatStringsSep "\n" [ - ("backend = \"${cfg.backend}\"") + "backend = \"${cfg.backend}\"" (concatMapStrings (s: "frontend = \"${s}\"\n") cfg.frontend) (concatMapStrings (s: "pem-file = \"${s}\"\n") cfg.pem-files) - ("ciphers = \"${cfg.ciphers}\"") - ("ocsp-dir = \"${ocspDir}\"") + "ciphers = \"${cfg.ciphers}\"" + "ocsp-dir = \"${ocspDir}\"" "user = \"${cfg.user}\"" "group = \"${cfg.group}\"" cfg.extraConfig diff --git a/nixos/modules/services/web-servers/pomerium.nix b/nixos/modules/services/web-servers/pomerium.nix index e4e9bc2e17a8..f5ed7cf84821 100644 --- a/nixos/modules/services/web-servers/pomerium.nix +++ b/nixos/modules/services/web-servers/pomerium.nix @@ -66,7 +66,7 @@ in cfgFile = if cfg.configFile != null then cfg.configFile else (format.generate "pomerium.yaml" cfg.settings); in - mkIf cfg.enable ({ + mkIf cfg.enable { systemd.services.pomerium = { description = "Pomerium authenticating reverse proxy"; wants = [ @@ -148,5 +148,5 @@ in ExecStart = "/run/current-system/systemd/bin/systemctl --no-block restart pomerium.service"; }; }; - }); + }; } diff --git a/nixos/modules/services/web-servers/ttyd.nix b/nixos/modules/services/web-servers/ttyd.nix index 01baa3b22fa3..eb3c2b918ec2 100644 --- a/nixos/modules/services/web-servers/ttyd.nix +++ b/nixos/modules/services/web-servers/ttyd.nix @@ -77,7 +77,7 @@ in options = { services.ttyd = { - enable = lib.mkEnableOption ("ttyd daemon"); + enable = lib.mkEnableOption "ttyd daemon"; port = mkOption { type = types.port; diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index e90d51b19ffe..9bb6f30e41db 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -770,7 +770,7 @@ in || config.services.displayManager.lemurs.enable ); in - mkIf (default) (mkDefault true); + mkIf default (mkDefault true); services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ]; diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index dd3973c8073e..bd83dd72b436 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -68,7 +68,7 @@ let # Ensure a consistent umask. umask 0022 - ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)} + ${textClosureMap id withDrySnippets (attrNames withDrySnippets)} '' + optionalString (!onlyDry) '' @@ -220,7 +220,7 @@ in set' = mapAttrs (n: v: if isString v then noDepEntry v else v) set; withHeadlines = addAttributeName set'; in - textClosureMap id (withHeadlines) (attrNames withHeadlines) + textClosureMap id withHeadlines (attrNames withHeadlines) } exit $_status diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index 809195667626..5edd09290bbf 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -403,14 +403,14 @@ in ); systemd = lib.mkMerge [ - ({ + { tmpfiles.rules = [ "d /run/binfmt 0755 -" ] ++ lib.mapAttrsToList (name: interpreter: "L+ /run/binfmt/${name} - - - - ${interpreter}") ( lib.mapAttrs mkInterpreter config.boot.binfmt.registrations ); - }) + } (lib.mkIf (config.boot.binfmt.registrations != { }) { additionalUpstreamSystemUnits = [ diff --git a/nixos/modules/system/boot/clevis.nix b/nixos/modules/system/boot/clevis.nix index afd14f492f4d..6a90f0f4a54f 100644 --- a/nixos/modules/system/boot/clevis.nix +++ b/nixos/modules/system/boot/clevis.nix @@ -28,12 +28,12 @@ in description = "Encrypted devices that need to be unlocked at boot using Clevis"; default = { }; type = lib.types.attrsOf ( - lib.types.submodule ({ + lib.types.submodule { options.secretFile = lib.mkOption { description = "Clevis JWE file used to decrypt the device at boot, in concert with the chosen pin (one of TPM2, Tang server, or SSS)."; type = lib.types.path; }; - }) + } ); }; diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 9c9c56f53f90..e611d9040f8b 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -1249,7 +1249,7 @@ in devicesWithClevis = filterAttrs (device: _: (hasAttr device clevis.devices)) luks.devices; in mkIf (clevis.enable && systemd.enable) ( - (mapAttrs' ( + mapAttrs' ( name: _: nameValuePair "cryptsetup-clevis-${name}" { wantedBy = [ "systemd-cryptsetup@${utils.escapeSystemdPath name}.service" ]; @@ -1281,7 +1281,7 @@ in ExecStop = "${config.boot.initrd.systemd.package.util-linux}/bin/umount /clevis-${name}"; }; } - ) devicesWithClevis) + ) devicesWithClevis ); environment.systemPackages = [ pkgs.cryptsetup ]; diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 3b36acfde286..2a197362211f 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -746,14 +746,14 @@ let "both" "any" ]) - (assertValueOneOf "ActivationPolicy" ([ + (assertValueOneOf "ActivationPolicy" [ "up" "always-up" "manual" "always-down" "down" "bound" - ])) + ]) ]; sectionNetwork = checkUnitConfig "Network" [ diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index e010181eba13..9c12a21b3f25 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -595,7 +595,7 @@ in enabledUnits = filterAttrs (n: v: !elem n cfg.suppressedSystemUnits) cfg.units; in - ({ + { "systemd/system".source = generateUnits { type = "system"; units = enabledUnits; @@ -631,7 +631,7 @@ in "systemd/user-preset/00-nixos.preset".text = '' ignore * ''; - }); + }; services.dbus.enable = true; diff --git a/nixos/modules/system/boot/systemd/sysusers.nix b/nixos/modules/system/boot/systemd/sysusers.nix index 99c55467dce1..c2d8b7cc373e 100644 --- a/nixos/modules/system/boot/systemd/sysusers.nix +++ b/nixos/modules/system/boot/systemd/sysusers.nix @@ -183,9 +183,9 @@ in }; environment.etc = lib.mkMerge [ - ({ + { "sysusers.d".source = sysusersConfig; - }) + } # Statically create the symlinks to immutablePasswordFilesLocation when # using an immutable /etc because we will not be able to do it at diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index d070b5a4c0e0..e2a0bf3bd404 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -235,7 +235,7 @@ let tries=3 success=false while [[ $success != true ]] && [[ $tries -gt 0 ]]; do - ${systemd}/bin/systemd-ask-password ${lib.optionalString cfgZfs.useKeyringForCredentials ("--keyname=zfs-$ds")} --timeout=${toString cfgZfs.passwordTimeout} "Enter key for $ds:" | ${cfgZfs.package}/sbin/zfs load-key "$ds" \ + ${systemd}/bin/systemd-ask-password ${lib.optionalString cfgZfs.useKeyringForCredentials "--keyname=zfs-$ds"} --timeout=${toString cfgZfs.passwordTimeout} "Enter key for $ds:" | ${cfgZfs.package}/sbin/zfs load-key "$ds" \ && success=true \ || tries=$((tries - 1)) done diff --git a/nixos/modules/tasks/lvm.nix b/nixos/modules/tasks/lvm.nix index e507a8c0e121..326fdb36f093 100644 --- a/nixos/modules/tasks/lvm.nix +++ b/nixos/modules/tasks/lvm.nix @@ -49,10 +49,10 @@ in }; config = mkMerge [ - ({ + { # minimal configuration file to make lvmconfig/lvm2-activation-generator happy environment.etc."lvm/lvm.conf".text = "config {}"; - }) + } (mkIf cfg.enable { systemd.tmpfiles.packages = [ cfg.package.out ]; environment.systemPackages = [ cfg.package ]; diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 4b7e788bc33b..a88eb8b0ca64 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -476,10 +476,10 @@ let ) ) - ({ + { options.warnings = options.warnings; options.assertions = options.assertions; - }) + } ]; }; diff --git a/nixos/modules/virtualisation/incus.nix b/nixos/modules/virtualisation/incus.nix index 3a97f3993ed2..47483b84872d 100644 --- a/nixos/modules/virtualisation/incus.nix +++ b/nixos/modules/virtualisation/incus.nix @@ -258,10 +258,10 @@ in }; }; - socketActivation = lib.mkEnableOption ('' + socketActivation = lib.mkEnableOption '' socket-activation for starting incus.service. Enabling this option will stop incus.service from starting automatically on boot. - ''); + ''; startTimeout = lib.mkOption { type = lib.types.ints.unsigned; diff --git a/nixos/modules/virtualisation/vmware-host.nix b/nixos/modules/virtualisation/vmware-host.nix index 0a560f7ea3c2..3240201de482 100644 --- a/nixos/modules/virtualisation/vmware-host.nix +++ b/nixos/modules/virtualisation/vmware-host.nix @@ -130,7 +130,7 @@ in # We want to place the tmpdirs for the wrappers to the parent dir. wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX) chmod a+rx "$wrapperDir" - ${lib.concatStringsSep "\n" (vmwareWrappers)} + ${lib.concatStringsSep "\n" vmwareWrappers} if [ -L ${wrapperDir} ]; then # Atomically replace the symlink # See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/ diff --git a/nixos/tests/cosmic.nix b/nixos/tests/cosmic.nix index 72171982ca5c..d6b67c692d9d 100644 --- a/nixos/tests/cosmic.nix +++ b/nixos/tests/cosmic.nix @@ -69,7 +69,7 @@ #testName: ${testName} '' + ( - if (enableAutologin) then + if enableAutologin then '' with subtest("cosmic-greeter initialisation"): machine.wait_for_unit("graphical.target", timeout=120) diff --git a/nixos/tests/ec2.nix b/nixos/tests/ec2.nix index b83d7e150207..4285a703eee1 100644 --- a/nixos/tests/ec2.nix +++ b/nixos/tests/ec2.nix @@ -33,7 +33,7 @@ let # Needed by nixos-rebuild due to the lack of network # access. Determined by trial and error. - system.extraDependencies = with pkgs; ([ + system.extraDependencies = with pkgs; [ # Needed for a nixos-rebuild. busybox cloud-utils @@ -53,7 +53,7 @@ let apacheHttpd.doc apacheHttpd.man valgrind.doc - ]); + ]; nixpkgs.pkgs = pkgs; } diff --git a/nixos/tests/elk.nix b/nixos/tests/elk.nix index 719480da2e72..48e505f24c7c 100644 --- a/nixos/tests/elk.nix +++ b/nixos/tests/elk.nix @@ -15,7 +15,7 @@ let mkElkTest = name: elk: - import ./make-test-python.nix ({ + import ./make-test-python.nix { inherit name; meta = with pkgs.lib.maintainers; { maintainers = [ @@ -49,7 +49,7 @@ let journalbeat = { enable = elk ? journalbeat; package = elk.journalbeat; - extraConfig = pkgs.lib.mkOptionDefault ('' + extraConfig = pkgs.lib.mkOptionDefault '' logging: to_syslog: true level: warning @@ -59,7 +59,7 @@ let journalbeat.inputs: - paths: [] seek: cursor - ''); + ''; }; filebeat = { @@ -276,7 +276,7 @@ let '! curl --silent --show-error --fail-with-body "${esUrl}/_cat/indices" | grep logstash | grep ^' ) ''; - }) { inherit pkgs system; }; + } { inherit pkgs system; }; in { # We currently only package upstream binaries. diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index e68b8eca5f21..f911c43b0a68 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -669,7 +669,7 @@ let virtualisation.diskImage = "./target.qcow2"; # and the same TPM options - virtualisation.qemu.options = mkIf (clevisTest) [ + virtualisation.qemu.options = mkIf clevisTest [ "-chardev socket,id=chrtpm,path=$NIX_BUILD_TOP/swtpm-sock" "-tpmdev emulator,id=tpm0,chardev=chrtpm" "-device tpm-tis,tpmdev=tpm0" @@ -1064,7 +1064,7 @@ let "echo -n password | zfs create" + " -o encryption=aes-256-gcm -o keyformat=passphrase rpool/root", '' - + optionalString (parentDataset) '' + + optionalString parentDataset '' "echo -n password | zpool create -O mountpoint=none -O encryption=on -O keyformat=passphrase rpool /dev/vda3", "zfs create -o mountpoint=legacy rpool/root", '' @@ -1079,7 +1079,7 @@ let optionalString (!parentDataset) '' boot.initrd.clevis.devices."rpool/root".secretFile = "/etc/nixos/clevis-secret.jwe"; '' - + optionalString (parentDataset) '' + + optionalString parentDataset '' boot.initrd.clevis.devices."rpool".secretFile = "/etc/nixos/clevis-secret.jwe"; '' + '' diff --git a/nixos/tests/iscsi-multipath-root.nix b/nixos/tests/iscsi-multipath-root.nix index 45b1baf40c61..860faa0a32c1 100644 --- a/nixos/tests/iscsi-multipath-root.nix +++ b/nixos/tests/iscsi-multipath-root.nix @@ -150,12 +150,12 @@ in boot.initrd.network.enable = true; boot.loader.grub.enable = false; - boot.kernelParams = lib.mkOverride 5 ([ + boot.kernelParams = lib.mkOverride 5 [ "boot.shell_on_fail" "console=tty1" "ip=192.168.1.1:::255.255.255.0::ens9:none" "ip=192.168.2.1:::255.255.255.0::ens10:none" - ]); + ]; # defaults to true, puts some code in the initrd that tries to mount an overlayfs on /nix/store virtualisation.writableStore = false; diff --git a/nixos/tests/iscsi-root.nix b/nixos/tests/iscsi-root.nix index 9d0b0765b311..c279a0d7e49e 100644 --- a/nixos/tests/iscsi-root.nix +++ b/nixos/tests/iscsi-root.nix @@ -124,11 +124,11 @@ in }: { boot.loader.grub.enable = false; - boot.kernelParams = lib.mkOverride 5 ([ + boot.kernelParams = lib.mkOverride 5 [ "boot.shell_on_fail" "console=tty1" "ip=${config.networking.primaryIPAddress}:::255.255.255.0::eth1:none" - ]); + ]; # defaults to true, puts some code in the initrd that tries to mount an overlayfs on /nix/store virtualisation.writableStore = false; diff --git a/nixos/tests/kafka/base.nix b/nixos/tests/kafka/base.nix index e2d9c9edfa8a..9591cc42d40a 100644 --- a/nixos/tests/kafka/base.nix +++ b/nixos/tests/kafka/base.nix @@ -9,7 +9,7 @@ let kafkaPackage, mode ? "kraft", }: - (import ../make-test-python.nix ({ + (import ../make-test-python.nix { inherit name; meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; @@ -20,7 +20,7 @@ let { ... }: { services.apache-kafka = mkMerge [ - ({ + { enable = true; package = kafkaPackage; settings = { @@ -30,7 +30,7 @@ let "/var/lib/kafka/logdir2" ]; }; - }) + } (mkIf (mode == "zookeeper") { settings = { "zookeeper.session.timeout.ms" = 600000; @@ -113,7 +113,7 @@ let + "--from-beginning --max-messages 1" ) ''; - })); + }); in with pkgs; diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index 0ac80f0dce38..f018cf269458 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -775,49 +775,49 @@ in ]; details = [ # messages normally has no contents - ({ + { name = "display"; left = 6; ocr = [ "Lock" ]; - }) - ({ + } + { name = "bluetooth"; left = 5; ocr = [ "Bluetooth" ]; - }) - ({ + } + { name = "network"; left = 4; ocr = [ "Flight" "Wi-Fi" ]; - }) - ({ + } + { name = "sound"; left = 3; ocr = [ "Silent" "Volume" ]; - }) - ({ + } + { name = "power"; left = 2; ocr = [ "Charge" "Battery" ]; - }) - ({ + } + { name = "datetime"; left = 1; ocr = [ "Time" "Date" ]; - }) - ({ + } + { name = "session"; left = 0; ocr = [ "Log Out" ]; @@ -827,6 +827,6 @@ in mouse_click(340, 220) # confirm logout machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'") ''; - }) + } ]; } diff --git a/nixos/tests/mod_perl.nix b/nixos/tests/mod_perl.nix index 6bcca2b914f4..b7c24b799b0d 100644 --- a/nixos/tests/mod_perl.nix +++ b/nixos/tests/mod_perl.nix @@ -35,7 +35,7 @@ ''; startup = pkgs.writeScript "startup.pl" '' use lib "${inc}", - split ":","${with pkgs.perl.pkgs; makeFullPerlPath ([ mod_perl2 ])}"; + split ":","${with pkgs.perl.pkgs; makeFullPerlPath [ mod_perl2 ]}"; 1; ''; in diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index f389cd0d0b51..13b9d9dfbe07 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -23,7 +23,7 @@ let testLegacyNetwork = { nixopsPkg, ... }: - pkgs.testers.nixosTest ({ + pkgs.testers.nixosTest { name = "nixops-legacy-network"; nodes = { deployer = @@ -105,7 +105,7 @@ let deployer_do("cd ~/unicorn; nixops ssh server 'hello | figlet'") ''; - }); + }; inherit (import ../ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; diff --git a/nixos/tests/postgresql/postgresql.nix b/nixos/tests/postgresql/postgresql.nix index ce3fb640ae92..77897143bbdd 100644 --- a/nixos/tests/postgresql/postgresql.nix +++ b/nixos/tests/postgresql/postgresql.nix @@ -15,7 +15,7 @@ let postgresql-clauses = makeEnsureTestFor package; }; - test-sql = pkgs.writeText "postgresql-test" ('' + test-sql = pkgs.writeText "postgresql-test" '' CREATE EXTENSION pgcrypto; -- just to check if lib loading works CREATE TABLE sth ( id int @@ -38,7 +38,7 @@ let } console.log(xs.reduce((acc, x) => acc + x, 0)); $$ LANGUAGE plv8; - ''); + ''; makeTestForWithBackupAll = package: backupAll: diff --git a/nixos/tests/qemu-vm-restrictnetwork.nix b/nixos/tests/qemu-vm-restrictnetwork.nix index 9249f0cc1269..bba3e61beecd 100644 --- a/nixos/tests/qemu-vm-restrictnetwork.nix +++ b/nixos/tests/qemu-vm-restrictnetwork.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix ({ +import ./make-test-python.nix { name = "qemu-vm-restrictnetwork"; nodes = { @@ -39,4 +39,4 @@ import ./make-test-python.nix ({ unrestricted.succeed("curl -s http://10.0.2.2:8000") restricted.fail("curl -s http://10.0.2.2:8000") ''; -}) +} diff --git a/nixos/tests/spark/default.nix b/nixos/tests/spark/default.nix index 9c6725d460e9..19355ef0dcb7 100644 --- a/nixos/tests/spark/default.nix +++ b/nixos/tests/spark/default.nix @@ -14,7 +14,7 @@ let }; testSparkCluster = { sparkPackage, ... }: - pkgs.testers.nixosTest ({ + pkgs.testers.nixosTest { name = "spark"; nodes = { @@ -56,6 +56,6 @@ let worker.succeed("spark-submit --version | systemd-cat") worker.succeed("spark-submit --master spark://master:7077 --executor-memory 512m --executor-cores 1 /spark_sample.py") ''; - }); + }; in tests diff --git a/pkgs/applications/audio/bucklespring/default.nix b/pkgs/applications/audio/bucklespring/default.nix index e014c75c7bdd..846ded340e16 100644 --- a/pkgs/applications/audio/bucklespring/default.nix +++ b/pkgs/applications/audio/bucklespring/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { openal alure ] - ++ optionals (legacy) [ + ++ optionals legacy [ libXtst libX11 ] diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index c92bb85a6cbd..8d6518a1e323 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -95,14 +95,14 @@ python3.pkgs.buildPythonApplication rec { libmodplug libsoup_3 ] - ++ lib.optionals (withXineBackend) [ xine-lib ] - ++ lib.optionals (withGstreamerBackend) ( + ++ lib.optionals withXineBackend [ xine-lib ] + ++ lib.optionals withGstreamerBackend ( with gst_all_1; [ gst-plugins-base gstreamer ] - ++ lib.optionals (withGstPlugins) [ + ++ lib.optionals withGstPlugins [ gst-libav gst-plugins-bad gst-plugins-good diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/emacs-application-framework/package.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/emacs-application-framework/package.nix index 4b53e05ffa0d..6630a5e6b6ac 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/emacs-application-framework/package.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/emacs-application-framework/package.nix @@ -51,7 +51,7 @@ let ) ] ++ appOtherDeps; - otherPkgs = builtins.concatLists (otherPackageLists); + otherPkgs = builtins.concatLists otherPackageLists; appsDrv = symlinkJoin { name = "emacs-application-framework-apps"; diff --git a/pkgs/applications/editors/jetbrains/bin/linux.nix b/pkgs/applications/editors/jetbrains/bin/linux.nix index 3d8402e1da0f..14532161233b 100644 --- a/pkgs/applications/editors/jetbrains/bin/linux.nix +++ b/pkgs/applications/editors/jetbrains/bin/linux.nix @@ -94,14 +94,14 @@ lib.makeOverridable mkDerivation ( fi fi echo -Djna.library.path=${ - lib.makeLibraryPath ([ + lib.makeLibraryPath [ libsecret e2fsprogs libnotify # Required for Help -> Collect Logs # in at least rider and goland udev - ]) + ] } >> $vmopts_file ''; diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix index 06818b5680b3..2f5f9c7b07f8 100644 --- a/pkgs/applications/editors/neovim/tests/default.nix +++ b/pkgs/applications/editors/neovim/tests/default.nix @@ -70,9 +70,9 @@ let (wrapNeovimUnstable neovim-unwrapped { luaRcContent = "this is an invalid lua statement to break the build"; }).overrideAttrs - ({ + { doCheck = true; - }); + }; nvimAutoDisableWrap = makeNeovimConfig { }; @@ -101,10 +101,10 @@ let runTest = neovim-drv: buildCommand: runCommandLocal "test-${neovim-drv.name}" - ({ + { nativeBuildInputs = [ ]; meta.platforms = neovim-drv.meta.platforms; - }) + } ( '' source ${nmt}/bash-lib/assertions.sh @@ -128,7 +128,7 @@ let } ); in -pkgs.recurseIntoAttrs (rec { +pkgs.recurseIntoAttrs rec { inherit nmt; @@ -213,14 +213,14 @@ pkgs.recurseIntoAttrs (rec { wrapRc = true; }); - nvim_with_runtimeDeps = pkgs.neovim.overrideAttrs ({ + nvim_with_runtimeDeps = pkgs.neovim.overrideAttrs { plugins = [ pkgs.vimPlugins.hex-nvim ]; autowrapRuntimeDeps = true; # legacy wrapper sets it to false wrapRc = true; - }); + }; nvim_with_ftplugin = let @@ -424,4 +424,4 @@ pkgs.recurseIntoAttrs (rec { ''; inherit (vimPlugins) corePlugins; -}) +} diff --git a/pkgs/applications/editors/sublime/3/common.nix b/pkgs/applications/editors/sublime/3/common.nix index b427f15aa508..68553f5b96bc 100644 --- a/pkgs/applications/editors/sublime/3/common.nix +++ b/pkgs/applications/editors/sublime/3/common.nix @@ -140,7 +140,7 @@ let ''; }; in -stdenv.mkDerivation ({ +stdenv.mkDerivation { inherit pname; version = buildVersion; @@ -182,4 +182,4 @@ stdenv.mkDerivation ({ "i686-linux" ]; }; -}) +} diff --git a/pkgs/applications/editors/sublime/4/common.nix b/pkgs/applications/editors/sublime/4/common.nix index 89f155373d16..de0e372f393b 100644 --- a/pkgs/applications/editors/sublime/4/common.nix +++ b/pkgs/applications/editors/sublime/4/common.nix @@ -136,7 +136,7 @@ let }; }; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = pnameBase; version = buildVersion; @@ -217,4 +217,4 @@ stdenv.mkDerivation (rec { "x86_64-linux" ]; }; -}) +} diff --git a/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix index 0f6aa0f404fe..7a416a2b15df 100644 --- a/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix @@ -472,7 +472,7 @@ rec { let nativePluginsConfigs = lib.attrsets.attrValues packages; nonNativePlugins = (lib.optionals (plug != null) plug.plugins); - nativePlugins = lib.concatMap (requiredPluginsForPackage) nativePluginsConfigs; + nativePlugins = lib.concatMap requiredPluginsForPackage nativePluginsConfigs; in nativePlugins ++ nonNativePlugins; diff --git a/pkgs/applications/editors/vscode/extensions/updateSettings.nix b/pkgs/applications/editors/vscode/extensions/updateSettings.nix index 843bcf4fd270..bff445c31537 100644 --- a/pkgs/applications/editors/vscode/extensions/updateSettings.nix +++ b/pkgs/applications/editors/vscode/extensions/updateSettings.nix @@ -28,7 +28,7 @@ let symlinkFromUserSettingCmd = lib.optionalString symlinkFromUserSetting ''&& mkdir -p "${userSettingsFolder}" && ln -sfv "$(pwd)/${vscodeSettingsFile}" "${userSettingsFolder}/" ''; in -writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" (fileName)}'' ( +writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" fileName}'' ( lib.optionalString (settings != { }) ( if createIfDoesNotExists then '' diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index 5323b2e0a88a..9ac68c4ffcea 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -169,7 +169,7 @@ stdenv.mkDerivation ( pkgs.libdrm ] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks - ++ lib.optionals (x11Support) ( + ++ lib.optionals x11Support ( with pkgs.xorg; [ libX11 diff --git a/pkgs/applications/emulators/wine/sources.nix b/pkgs/applications/emulators/wine/sources.nix index c8ca0ec983ab..fada543b6e9d 100644 --- a/pkgs/applications/emulators/wine/sources.nix +++ b/pkgs/applications/emulators/wine/sources.nix @@ -116,7 +116,7 @@ rec { ] ++ patches-binutils-2_44-fix-wine-older-than-10_2; - updateScript = writeShellScript "update-wine-stable" ('' + updateScript = writeShellScript "update-wine-stable" '' ${updateScriptPreamble} major=''${UPDATE_NIX_OLD_VERSION%%.*} latest_stable=$(get_latest_wine_version "$major.0") @@ -128,7 +128,7 @@ rec { fi do_update - ''); + ''; }; unstable = fetchurl rec { diff --git a/pkgs/applications/misc/copyq/default.nix b/pkgs/applications/misc/copyq/default.nix index b6d0aea35080..5d97c06610a3 100644 --- a/pkgs/applications/misc/copyq/default.nix +++ b/pkgs/applications/misc/copyq/default.nix @@ -17,7 +17,7 @@ kdePackages, }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = "CopyQ"; version = "11.0.0"; @@ -63,4 +63,4 @@ stdenv.mkDerivation (rec { platforms = lib.platforms.linux; mainProgram = "copyq"; }; -}) +} diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix index 8bce3e55b9da..6ac94dc2906b 100644 --- a/pkgs/applications/misc/redshift/default.nix +++ b/pkgs/applications/misc/redshift/default.nix @@ -178,7 +178,7 @@ rec { longDescription = "Gammastep" + lib.removePrefix "Redshift" redshift.meta.longDescription; homepage = "https://gitlab.com/chinstrap/gammastep"; mainProgram = "gammastep"; - maintainers = ([ ]) ++ redshift.meta.maintainers; + maintainers = [ ] ++ redshift.meta.maintainers; }; }; } diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 491da6c1aba0..e9ffcd726d0e 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -645,7 +645,7 @@ let patchShebangs . '' - + lib.optionalString (ungoogled) '' + + lib.optionalString ungoogled '' # Prune binaries (ungoogled only) *before* linking our own binaries: ${ungoogler}/utils/prune_binaries.py . ${ungoogler}/pruning.list || echo "some errors" '' diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 58cb30f335ad..c0aaf6369ae1 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -71,7 +71,7 @@ let chromium = rec { inherit stdenv upstream-info; - mkChromiumDerivation = callPackage ./common.nix ({ + mkChromiumDerivation = callPackage ./common.nix { inherit chromiumVersionAtLeast versionRange; inherit proprietaryCodecs @@ -80,7 +80,7 @@ let ungoogled ; gnChromium = buildPackages.gn.override upstream-info.deps.gn; - }); + }; browser = callPackage ./browser.nix { inherit chromiumVersionAtLeast enableWideVine ungoogled; diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index d1909d2be4ca..c43315d25a99 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -6,11 +6,11 @@ let mkGui = args: - callPackage (import ./gui.nix (args)) { + callPackage (import ./gui.nix args) { inherit (libsForQt5) wrapQtAppsHook; }; - mkServer = args: callPackage (import ./server.nix (args)) { }; + mkServer = args: callPackage (import ./server.nix args) { }; in { guiStable = mkGui { diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index 5c2ad6cd499b..11d1711c0ed7 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -223,13 +223,13 @@ let translations = importVariant "translations.nix"; deps = (importVariant "deps.nix") ++ [ # TODO: Why is this needed? - (rec { + rec { name = "unowinreg.dll"; url = "https://dev-www.libreoffice.org/extern/${md5name}"; sha256 = "1infwvv1p6i21scywrldsxs22f62x85mns4iq8h6vr6vlx3fdzga"; md5 = "185d60944ea767075d27247c3162b3bc"; md5name = "${md5}-${name}"; - }) + } ]; }; srcs = { diff --git a/pkgs/applications/science/electronics/bitscope/common.nix b/pkgs/applications/science/electronics/bitscope/common.nix index 30e7c72a145c..890c4cb653e6 100644 --- a/pkgs/applications/science/electronics/bitscope/common.nix +++ b/pkgs/applications/science/electronics/bitscope/common.nix @@ -24,7 +24,7 @@ let wrapProgram "$out/bin/${binaryName}" \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libPaths}" ''; - pkg = stdenv.mkDerivation (rec { + pkg = stdenv.mkDerivation rec { inherit (attrs) version src; name = "${toolName}-${version}"; @@ -71,7 +71,7 @@ let cp -a usr/* "$out/" ${(wrapBinary libs) attrs.toolName} ''; - }); + }; in buildFHSEnv { pname = attrs.toolName; diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index 163902ab15b2..02da48dea1a1 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -81,9 +81,9 @@ let baseName = - if (testing) then + if testing then "kicad-testing" - else if (stable) then + else if stable then "kicad" else "kicad-unstable"; @@ -186,7 +186,7 @@ stdenv.mkDerivation rec { }; inherit pname; - version = if (stable) then kicadVersion else builtins.substring 0 10 src.src.rev; + version = if stable then kicadVersion else builtins.substring 0 10 src.src.rev; src = base; dontUnpack = true; @@ -195,14 +195,14 @@ stdenv.mkDerivation rec { dontFixup = true; pythonPath = - optionals (withScripting) [ + optionals withScripting [ wxPython python.pkgs.six python.pkgs.requests ] ++ addonsDrvs; - nativeBuildInputs = [ makeWrapper ] ++ optionals (withScripting) [ python.pkgs.wrapPython ]; + nativeBuildInputs = [ makeWrapper ] ++ optionals withScripting [ python.pkgs.wrapPython ]; # KICAD7_TEMPLATE_DIR only works with a single path (it does not handle : separated paths) # but it's used to find both the templates and the symbol/footprint library tables @@ -245,10 +245,10 @@ stdenv.mkDerivation rec { in [ "--set-default NIX_KICAD9_STOCK_DATA_PATH ${stockDataPath}" ] ) - ++ optionals (with3d) [ + ++ optionals with3d [ "--set-default KICAD9_3DMODEL_DIR ${packages3d}/share/kicad/3dmodels" ] - ++ optionals (withNgspice) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] + ++ optionals withNgspice [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ] # infinisil's workaround for #39493 ++ [ "--set GDK_PIXBUF_MODULE_FILE ${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; @@ -278,13 +278,13 @@ stdenv.mkDerivation rec { (concatStringsSep "\n" (flatten [ "runHook preInstall" - (optionalString (withScripting) "buildPythonPath \"${base} $pythonPath\" \n") + (optionalString withScripting "buildPythonPath \"${base} $pythonPath\" \n") # wrap each of the directly usable tools (map ( tool: "makeWrapper ${base}/${bin}/${tool} $out/bin/${tool} $makeWrapperArgs" - + optionalString (withScripting) " --set PYTHONPATH \"$program_PYTHONPATH\"" + + optionalString withScripting " --set PYTHONPATH \"$program_PYTHONPATH\"" ) tools) # link in the CLI utils @@ -312,9 +312,9 @@ stdenv.mkDerivation rec { meta = { description = ( - if (stable) then + if stable then "Open Source Electronics Design Automation suite" - else if (testing) then + else if testing then "Open Source EDA suite, latest on stable branch" else "Open Source EDA suite, latest on master branch" diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 38502bc20d12..d55fd6fd3c1a 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -164,9 +164,9 @@ mkDerivation rec { if [[ ! "$f" =~ \.zip$ ]]; then '' + lib.concatStrings ( - lib.mapAttrsToList (k: v: ('' + lib.mapAttrsToList (k: v: '' substituteInPlace $f --replace '"${k}"' '"${lib.getBin v}/bin/${k}"' - '')) filters + '') filters ) + '' substituteInPlace $f --replace '"pstotext"' '"${lib.getBin ghostscript}/bin/ps2ascii"' diff --git a/pkgs/applications/version-management/sublime-merge/common.nix b/pkgs/applications/version-management/sublime-merge/common.nix index 0b1d36fc2d99..075244027f29 100644 --- a/pkgs/applications/version-management/sublime-merge/common.nix +++ b/pkgs/applications/version-management/sublime-merge/common.nix @@ -138,7 +138,7 @@ let }; }; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = pnameBase; version = buildVersion; @@ -218,4 +218,4 @@ stdenv.mkDerivation (rec { "x86_64-linux" ]; }; -}) +} diff --git a/pkgs/applications/video/anilibria-winmaclinux/default.nix b/pkgs/applications/video/anilibria-winmaclinux/default.nix index efdbf3946e83..3d5e30808ae2 100644 --- a/pkgs/applications/video/anilibria-winmaclinux/default.nix +++ b/pkgs/applications/video/anilibria-winmaclinux/default.nix @@ -87,7 +87,7 @@ mkDerivation rec { ++ lib.optionals withMPV [ mpv-unwrapped.dev ]; desktopItems = [ - (makeDesktopItem (rec { + (makeDesktopItem rec { name = "AniLibria"; desktopName = name; icon = "anilibria"; @@ -101,7 +101,7 @@ mkDerivation rec { keywords = [ "anime" ]; exec = name; terminal = false; - })) + }) ]; meta = with lib; { diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index 7e7d36a7ba69..f1c4393e01b8 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -13,10 +13,10 @@ let # linux distros are supposed to provide pillow and pycryptodome requiredPythonPath = with kodi.pythonPackages; - makePythonPath ([ + makePythonPath [ pillow pycryptodome - ]); + ]; # each kodi addon can potentially export a python module which should be included in PYTHONPATH # see any addon which supplies `passthru.pythonPath` and the corresponding entry in the addons `addon.xml` diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index e29b7b34a4f7..24b4f947a99b 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -216,7 +216,7 @@ stdenv.mkDerivation { ++ lib.optional fribidiSupport "--enable-fribidi" ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch64) "--enable-vidix" ++ lib.optional stdenv.hostPlatform.isLinux "--enable-fbdev" - ++ lib.optionals (crossBuild) [ + ++ lib.optionals crossBuild [ "--enable-cross-compile" "--disable-vidix-pcidb" "--with-vidix-drivers=no" diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 14b78a71a75f..f8f4c285cd15 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -315,7 +315,7 @@ stdenv.mkDerivation (finalAttrs: { ${optionalString (!enable32bitGuests) "--disable-vmmraw"} \ ${optionalString enableWebService "--enable-webservice"} \ ${optionalString (open-watcom-bin != null) "--with-ow-dir=${open-watcom-bin}"} \ - ${optionalString (enableKvm) "--with-kvm"} \ + ${optionalString enableKvm "--with-kvm"} \ ${extraConfigureFlags} \ --disable-kmods sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${glib.dev}/lib/pkgconfig@' \ diff --git a/pkgs/build-support/kernel/make-initrd-ng.nix b/pkgs/build-support/kernel/make-initrd-ng.nix index 35fd66e89db7..0b1db74f0449 100644 --- a/pkgs/build-support/kernel/make-initrd-ng.nix +++ b/pkgs/build-support/kernel/make-initrd-ng.nix @@ -75,7 +75,7 @@ in or (throw "Unrecognised compressor ${_compressorName}, please specify uInitrdCompression"), }: runCommand name - ({ + { compress = "${_compressorExecutable} ${lib.escapeShellArgs _compressorArgsReal}"; passthru = { compressorExecutableFunction = _compressorFunction; @@ -98,7 +98,7 @@ runCommand name cpio ] ++ lib.optional makeUInitrd ubootTools; - }) + } '' mkdir -p ./root/{run,tmp,var/empty} ln -s ../run ./root/var/run diff --git a/pkgs/build-support/make-darwin-bundle/default.nix b/pkgs/build-support/make-darwin-bundle/default.nix index e6ddb4b4198c..a18452274428 100644 --- a/pkgs/build-support/make-darwin-bundle/default.nix +++ b/pkgs/build-support/make-darwin-bundle/default.nix @@ -15,7 +15,7 @@ icon ? "", # Optional icon file. }: -writeShellScript "make-darwin-bundle-${name}" ('' +writeShellScript "make-darwin-bundle-${name}" '' function makeDarwinBundlePhase() { mkdir -p "''${!outputBin}/Applications/${name}.app/Contents/MacOS" mkdir -p "''${!outputBin}/Applications/${name}.app/Contents/Resources" @@ -28,4 +28,4 @@ writeShellScript "make-darwin-bundle-${name}" ('' } appendToVar preDistPhases makeDarwinBundlePhase -'') +'' diff --git a/pkgs/build-support/nix-gitignore/default.nix b/pkgs/build-support/nix-gitignore/default.nix index 60a854225e10..fa9bbc1ca8c4 100644 --- a/pkgs/build-support/nix-gitignore/default.nix +++ b/pkgs/build-support/nix-gitignore/default.nix @@ -92,7 +92,7 @@ rec { let recurse = str: - [ (substring 0 1 str) ] ++ (optionals (str != "") (recurse (substring 1 (stringLength (str)) str))); + [ (substring 0 1 str) ] ++ (optionals (str != "") (recurse (substring 1 (stringLength str) str))); in str: recurse str; chars = s: filter (c: c != "" && !isList c) (splitString s); diff --git a/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix b/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix index 006045c20604..1155338c2fb1 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/brotli-crates.nix @@ -90,24 +90,24 @@ rec { }; alloc_no_stdlib_1_3_0_features = f: - updateFeatures f ({ + updateFeatures f { alloc_no_stdlib_1_3_0.default = (f.alloc_no_stdlib_1_3_0.default or true); - }) [ ]; + } [ ]; brotli_2_5_0 = { features ? (brotli_2_5_0_features { }), }: brotli_2_5_0_ { - dependencies = mapFeatures features ([ + dependencies = mapFeatures features [ alloc_no_stdlib_1_3_0 brotli_decompressor_1_3_1 - ]); + ]; features = mkFeatures (features.brotli_2_5_0 or { }); }; brotli_2_5_0_features = f: updateFeatures f - (rec { + rec { alloc_no_stdlib_1_3_0.no-stdlib = (f.alloc_no_stdlib_1_3_0.no-stdlib or false) || (brotli_2_5_0.no-stdlib or false) @@ -131,7 +131,7 @@ rec { (f.brotli_decompressor_1_3_1.seccomp or false) || (brotli_2_5_0.seccomp or false) || (f.brotli_2_5_0.seccomp or false); - }) + } [ alloc_no_stdlib_1_3_0_features brotli_decompressor_1_3_1_features @@ -141,12 +141,12 @@ rec { features ? (brotli_decompressor_1_3_1_features { }), }: brotli_decompressor_1_3_1_ { - dependencies = mapFeatures features ([ alloc_no_stdlib_1_3_0 ]); + dependencies = mapFeatures features [ alloc_no_stdlib_1_3_0 ]; features = mkFeatures (features.brotli_decompressor_1_3_1 or { }); }; brotli_decompressor_1_3_1_features = f: - updateFeatures f (rec { + updateFeatures f rec { alloc_no_stdlib_1_3_0.no-stdlib = (f.alloc_no_stdlib_1_3_0.no-stdlib or false) || (brotli_decompressor_1_3_1.no-stdlib or false) @@ -157,5 +157,5 @@ rec { || (brotli_decompressor_1_3_1.unsafe or false) || (f.brotli_decompressor_1_3_1.unsafe or false); brotli_decompressor_1_3_1.default = (f.brotli_decompressor_1_3_1.default or true); - }) [ alloc_no_stdlib_1_3_0_features ]; + } [ alloc_no_stdlib_1_3_0_features ]; } diff --git a/pkgs/build-support/src-only/tests.nix b/pkgs/build-support/src-only/tests.nix index bd6fa6f6ca5a..039fd9eb9bb4 100644 --- a/pkgs/build-support/src-only/tests.nix +++ b/pkgs/build-support/src-only/tests.nix @@ -57,7 +57,7 @@ let ; }; helloDrvSimpleSrc = srcOnly helloDrvSimple; - helloDrvSimpleSrcFreeform = srcOnly ({ + helloDrvSimpleSrcFreeform = srcOnly { inherit (helloDrvSimple) name pname @@ -66,7 +66,7 @@ let patches stdenv ; - }); + }; # Test the issue reported in https://github.com/NixOS/nixpkgs/issues/269539 stdenvAdapterDrv = diff --git a/pkgs/build-support/writers/aliases.nix b/pkgs/build-support/writers/aliases.nix index 09836fbebd44..cf369a34b828 100644 --- a/pkgs/build-support/writers/aliases.nix +++ b/pkgs/build-support/writers/aliases.nix @@ -26,8 +26,8 @@ let ) aliases; in -mapAliases ({ +mapAliases { # Cleanup before 22.05, Added 2021-12-11 writePython2 = "Python 2 is EOL and the use of writers.writePython2 is deprecated."; writePython2Bin = "Python 2 is EOL and the use of writers.writePython2Bin is deprecated."; -}) +} diff --git a/pkgs/by-name/_9/_9base/package.nix b/pkgs/by-name/_9/_9base/package.nix index da3a54fc9206..e4cd519d3aaa 100644 --- a/pkgs/by-name/_9/_9base/package.nix +++ b/pkgs/by-name/_9/_9base/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; strictDeps = true; nativeBuildInputs = [ pkg-config ]; - env.NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString [ # workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: diffio.o:(.bss+0x16): multiple definition of `bflag'; diffdir.o:(.bss+0x6): first defined here @@ -51,7 +51,7 @@ stdenv.mkDerivation { "-D_DEFAULT_SOURCE" # error: call to undeclared function 'p9mbtowc'; ISO C99 and later do not support implicit function declarations "-Wno-error=implicit-function-declaration" - ]); + ]; env.LDFLAGS = lib.optionalString enableStatic "-static"; makeFlags = [ "PREFIX=${placeholder "out"}" diff --git a/pkgs/by-name/ac/acpica-tools/package.nix b/pkgs/by-name/ac/acpica-tools/package.nix index 102ffca288aa..15ea53028b0c 100644 --- a/pkgs/by-name/ac/acpica-tools/package.nix +++ b/pkgs/by-name/ac/acpica-tools/package.nix @@ -34,9 +34,9 @@ stdenv.mkDerivation (finalAttrs: { "iasl" ]; - env.NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString [ "-O3" - ]); + ]; enableParallelBuilding = true; diff --git a/pkgs/by-name/ap/aprx/package.nix b/pkgs/by-name/ap/aprx/package.nix index 85185873b0ba..6137983e193c 100644 --- a/pkgs/by-name/ap/aprx/package.nix +++ b/pkgs/by-name/ap/aprx/package.nix @@ -18,11 +18,11 @@ stdenv.mkDerivation { nativeBuildInputs = [ perl ]; - env.NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" "-O2" "-Wno-implicit-int" # clang, gcc 14 - ]); + ]; configureFlags = [ "--with-erlangstorage" diff --git a/pkgs/by-name/ar/aravis/package.nix b/pkgs/by-name/ar/aravis/package.nix index fa458868a498..886fce3e95f4 100644 --- a/pkgs/by-name/ar/aravis/package.nix +++ b/pkgs/by-name/ar/aravis/package.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { gst-plugins-bad ] ) - ++ lib.optionals (enableViewer) [ gtk3 ]; + ++ lib.optionals enableViewer [ gtk3 ]; mesonFlags = [ ] diff --git a/pkgs/by-name/ar/archi/package.nix b/pkgs/by-name/ar/archi/package.nix index f65360f2afad..bb28256d053e 100644 --- a/pkgs/by-name/ar/archi/package.nix +++ b/pkgs/by-name/ar/archi/package.nix @@ -67,10 +67,10 @@ stdenv.mkDerivation rec { install -D -m755 Archi $out/libexec/Archi makeWrapper $out/libexec/Archi $out/bin/Archi \ --prefix LD_LIBRARY_PATH : ${ - lib.makeLibraryPath ([ + lib.makeLibraryPath [ glib webkitgtk_4_1 - ]) + ] } \ --set WEBKIT_DISABLE_DMABUF_RENDERER 1 \ --prefix PATH : ${jdk}/bin diff --git a/pkgs/by-name/au/auctex/package.nix b/pkgs/by-name/au/auctex/package.nix index 837130e3e697..e1d148e785bc 100644 --- a/pkgs/by-name/au/auctex/package.nix +++ b/pkgs/by-name/au/auctex/package.nix @@ -8,7 +8,7 @@ }: let - auctex = stdenv.mkDerivation (rec { + auctex = stdenv.mkDerivation rec { # Make this a valid tex(live-new) package; # the pkgs attribute is provided with a hack below. pname = "auctex"; @@ -50,7 +50,7 @@ let license = licenses.gpl3Plus; platforms = platforms.unix; }; - }); + }; in auctex // { pkgs = [ auctex.tex ]; } diff --git a/pkgs/by-name/av/avizo/package.nix b/pkgs/by-name/av/avizo/package.nix index e9801ee33570..10c0c6a1d1b2 100644 --- a/pkgs/by-name/av/avizo/package.nix +++ b/pkgs/by-name/av/avizo/package.nix @@ -50,8 +50,8 @@ stdenv.mkDerivation { ]; postInstall = '' - wrapProgram $out/bin/volumectl --suffix PATH : $out/bin:${lib.makeBinPath ([ pamixer ])} - wrapProgram $out/bin/lightctl --suffix PATH : $out/bin:${lib.makeBinPath ([ brightnessctl ])} + wrapProgram $out/bin/volumectl --suffix PATH : $out/bin:${lib.makeBinPath [ pamixer ]} + wrapProgram $out/bin/lightctl --suffix PATH : $out/bin:${lib.makeBinPath [ brightnessctl ]} ''; meta = with lib; { diff --git a/pkgs/by-name/ay/ayatana-indicator-display/package.nix b/pkgs/by-name/ay/ayatana-indicator-display/package.nix index 9e8f69ad607b..18afb05894a3 100644 --- a/pkgs/by-name/ay/ayatana-indicator-display/package.nix +++ b/pkgs/by-name/ay/ayatana-indicator-display/package.nix @@ -77,10 +77,10 @@ stdenv.mkDerivation (finalAttrs: { cmake-extras lomiri-schemas # lomiri schema ]) - ++ ([ + ++ [ mate.marco # marco schema mate.mate-settings-daemon # mate mouse schema - ]); + ]; nativeCheckInputs = [ cppcheck diff --git a/pkgs/by-name/ba/bazel_8/package.nix b/pkgs/by-name/ba/bazel_8/package.nix index b9df5ed26eb1..fedc156f1161 100644 --- a/pkgs/by-name/ba/bazel_8/package.nix +++ b/pkgs/by-name/ba/bazel_8/package.nix @@ -101,7 +101,7 @@ let "--verbose_failures" "--curses=no" ] - ++ lib.optionals (isDarwin) [ + ++ lib.optionals isDarwin [ "--macos_sdk_version=${stdenv.hostPlatform.darwinMinVersion}" "--cxxopt=-isystem" "--cxxopt=${lib.getDev stdenv.cc.libcxx}/include/c++/v1" diff --git a/pkgs/by-name/be/bespokesynth/package.nix b/pkgs/by-name/be/bespokesynth/package.nix index e573d82d95e1..38c057312fb1 100644 --- a/pkgs/by-name/be/bespokesynth/package.nix +++ b/pkgs/by-name/be/bespokesynth/package.nix @@ -150,14 +150,14 @@ stdenv.mkDerivation (finalAttrs: { ''; env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-rpath ${ - lib.makeLibraryPath ([ + lib.makeLibraryPath [ libX11 libXrandr libXinerama libXext libXcursor libXScrnSaver - ]) + ] }"; dontPatchELF = true; # needed or nix will try to optimize the binary by removing "useless" rpath diff --git a/pkgs/by-name/be/beyond-identity/package.nix b/pkgs/by-name/be/beyond-identity/package.nix index b4d99eac4dbe..c28fab441b74 100644 --- a/pkgs/by-name/be/beyond-identity/package.nix +++ b/pkgs/by-name/be/beyond-identity/package.nix @@ -17,7 +17,7 @@ let pname = "beyond-identity"; version = "2.97.0-0"; - libPath = lib.makeLibraryPath ([ + libPath = lib.makeLibraryPath [ glib glibc openssl @@ -26,7 +26,7 @@ let gnome-keyring polkit polkit_gnome - ]); + ]; meta = with lib; { description = "Passwordless MFA identities for workforces, customers, and developers"; homepage = "https://www.beyondidentity.com"; diff --git a/pkgs/by-name/bo/boehmgc/package.nix b/pkgs/by-name/bo/boehmgc/package.nix index 090b08f8bf8b..bb5b68f8eefa 100644 --- a/pkgs/by-name/bo/boehmgc/package.nix +++ b/pkgs/by-name/bo/boehmgc/package.nix @@ -59,12 +59,12 @@ stdenv.mkDerivation (finalAttrs: { # don't forget to disable the fix (and if the next release does # not fix the problem the test failure will be a reminder to # extend the set of versions requiring the workaround). - noSoftVDB = lib.optional (stdenv.hostPlatform.isPower64 && finalAttrs.version == "8.2.8") ( - # do not use /proc primitives to track dirty bits; see: - # https://github.com/bdwgc/bdwgc/issues/479#issuecomment-1279687537 - # https://github.com/bdwgc/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741 - "NO_SOFT_VDB" - ); + noSoftVDB = + lib.optional (stdenv.hostPlatform.isPower64 && finalAttrs.version == "8.2.8") + # do not use /proc primitives to track dirty bits; see: + # https://github.com/bdwgc/bdwgc/issues/479#issuecomment-1279687537 + # https://github.com/bdwgc/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741 + "NO_SOFT_VDB"; initialMarkStackSizeFlag = lib.optionals (initialMarkStackSize != null) [ "INITIAL_MARK_STACK_SIZE=${toString initialMarkStackSize}" diff --git a/pkgs/by-name/bo/bozohttpd/package.nix b/pkgs/by-name/bo/bozohttpd/package.nix index f36598c62775..b1b3c5407233 100644 --- a/pkgs/by-name/bo/bozohttpd/package.nix +++ b/pkgs/by-name/bo/bozohttpd/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { libxcrypt openssl ] - ++ lib.optionals (luaSupport) [ lua ]; + ++ lib.optionals luaSupport [ lua ]; nativeBuildInputs = [ bmake @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { # unpackaged dependency: https://man.netbsd.org/blocklist.3 "-DNO_BLOCKLIST_SUPPORT" ] - ++ lib.optionals (htpasswdSupport) [ "-DDO_HTPASSWD" ] + ++ lib.optionals htpasswdSupport [ "-DDO_HTPASSWD" ] ++ lib.optionals (!cgiSupport) [ "-DNO_CGIBIN_SUPPORT" ] ++ lib.optionals (!dirIndexSupport) [ "-DNO_DIRINDEX_SUPPORT" ] ++ lib.optionals (!dynamicContentSupport) [ "-DNO_DYNAMIC_CONTENT" ] @@ -72,8 +72,8 @@ stdenv.mkDerivation (finalAttrs: { _LDADD = lib.concatStringsSep " " ( [ "-lm" ] ++ lib.optionals (stdenv.hostPlatform.libc != "libSystem") [ "-lcrypt" ] - ++ lib.optionals (luaSupport) [ "-llua" ] - ++ lib.optionals (sslSupport) [ + ++ lib.optionals luaSupport [ "-llua" ] + ++ lib.optionals sslSupport [ "-lcrypto" "-lssl" ] diff --git a/pkgs/by-name/cd/cddl/package.nix b/pkgs/by-name/cd/cddl/package.nix index b58df69e6bf9..07fff5a88702 100644 --- a/pkgs/by-name/cd/cddl/package.nix +++ b/pkgs/by-name/cd/cddl/package.nix @@ -11,7 +11,7 @@ bundlerApp { gemfile = ./Gemfile; lockfile = ./Gemfile.lock; - gemset = lib.recursiveUpdate (import ./gemset.nix) ({ + gemset = lib.recursiveUpdate (import ./gemset.nix) { "cddl" = { dontBuild = false; # setting env vars is not supported by patchShebangs @@ -19,7 +19,7 @@ bundlerApp { sed -i 's\#!/usr/bin/env RUBY_THREAD_VM_STACK_SIZE=5000000\#!/usr/bin/env\' bin/cddl ''; }; - }); + }; exes = [ "cddl" ]; diff --git a/pkgs/by-name/ch/chez-racket/shared.nix b/pkgs/by-name/ch/chez-racket/shared.nix index f68063bf1a7f..5e80c2ff7a5d 100644 --- a/pkgs/by-name/ch/chez-racket/shared.nix +++ b/pkgs/by-name/ch/chez-racket/shared.nix @@ -35,10 +35,10 @@ stdenv.mkDerivation ( export LZ4="$(find ${lz4.lib}/lib -type f | sort | head -n1)" ''; - nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin ([ + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools darwin.autoSignDarwinBinariesHook - ]); + ]; buildInputs = [ libiconv libX11 diff --git a/pkgs/by-name/co/codd/package.nix b/pkgs/by-name/co/codd/package.nix index cf042055a389..e76ec150994e 100644 --- a/pkgs/by-name/co/codd/package.nix +++ b/pkgs/by-name/co/codd/package.nix @@ -19,7 +19,7 @@ let generated = haskellPackages.callPackage ./generated.nix { haxl = haxlJailbroken; }; - derivationWithVersion = haskell.lib.compose.overrideCabal (rec { + derivationWithVersion = haskell.lib.compose.overrideCabal rec { version = "0.1.6"; src = fetchFromGitHub { owner = "mzabani"; @@ -48,6 +48,6 @@ let changelog = "https://github.com/mzabani/codd/releases/tag/v${version}"; maintainers = with lib.maintainers; [ mzabani ]; - }) generated; + } generated; in haskell.lib.compose.justStaticExecutables derivationWithVersion diff --git a/pkgs/by-name/co/composefs/package.nix b/pkgs/by-name/co/composefs/package.nix index add95896414a..f9de2e88ea75 100644 --- a/pkgs/by-name/co/composefs/package.nix +++ b/pkgs/by-name/co/composefs/package.nix @@ -63,9 +63,9 @@ stdenv.mkDerivation (finalAttrs: { openssl ] ++ lib.optional fuseSupport fuse3 - ++ lib.filter (lib.meta.availableOn stdenv.hostPlatform) ([ + ++ lib.filter (lib.meta.availableOn stdenv.hostPlatform) [ libcap - ]); + ]; doCheck = true; nativeCheckInputs = [ diff --git a/pkgs/by-name/co/connman/package.nix b/pkgs/by-name/co/connman/package.nix index a9aadfe851b1..530daeb8c32c 100644 --- a/pkgs/by-name/co/connman/package.nix +++ b/pkgs/by-name/co/connman/package.nix @@ -114,9 +114,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ optionals (firewallType == "iptables") [ iptables ] ++ optionals (firewallType == "nftables") [ libnftnl ] - ++ optionals (enableOpenconnect) [ openconnect ] - ++ optionals (enablePolkit) [ polkit ] - ++ optionals (enablePptp) [ + ++ optionals enableOpenconnect [ openconnect ] + ++ optionals enablePolkit [ polkit ] + ++ optionals enablePptp [ pptp ppp ]; diff --git a/pkgs/by-name/cr/cryptopp/package.nix b/pkgs/by-name/cr/cryptopp/package.nix index bb7e856d3cce..866cd5170e82 100644 --- a/pkgs/by-name/cr/cryptopp/package.nix +++ b/pkgs/by-name/cr/cryptopp/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; hardeningDisable = [ "fortify" ]; - CXXFLAGS = lib.optionals (withOpenMP) [ "-fopenmp" ]; + CXXFLAGS = lib.optionals withOpenMP [ "-fopenmp" ]; doCheck = true; diff --git a/pkgs/by-name/da/davix/package.nix b/pkgs/by-name/da/davix/package.nix index 8af041600482..5bdecbd6dff3 100644 --- a/pkgs/by-name/da/davix/package.nix +++ b/pkgs/by-name/da/davix/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { rapidjson ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid - ++ lib.optional (enableThirdPartyCopy) gsoap; + ++ lib.optional enableThirdPartyCopy gsoap; # using the url below since the github release page states # "please ignore the GitHub-generated tarballs, as they are incomplete" diff --git a/pkgs/by-name/dt/dtrx/package.nix b/pkgs/by-name/dt/dtrx/package.nix index d0c743357174..0ba6669a723a 100644 --- a/pkgs/by-name/dt/dtrx/package.nix +++ b/pkgs/by-name/dt/dtrx/package.nix @@ -50,8 +50,8 @@ python3Packages.buildPythonApplication rec { xz lzip ] - ++ lib.optional (unzipSupport) unzip - ++ lib.optional (unrarSupport) unrar + ++ lib.optional unzipSupport unzip + ++ lib.optional unrarSupport unrar ); in [ diff --git a/pkgs/by-name/ec/eclipse-mat/package.nix b/pkgs/by-name/ec/eclipse-mat/package.nix index 5bbb87b125c5..dc142a000445 100644 --- a/pkgs/by-name/ec/eclipse-mat/package.nix +++ b/pkgs/by-name/ec/eclipse-mat/package.nix @@ -74,12 +74,12 @@ stdenv.mkDerivation rec { makeWrapper $out/mat/MemoryAnalyzer $out/bin/eclipse-mat \ --prefix PATH : ${jdk}/bin \ --prefix LD_LIBRARY_PATH : ${ - lib.makeLibraryPath ([ + lib.makeLibraryPath [ glib gtk3 libXtst webkitgtk_4_1 - ]) + ] } \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ --add-flags "-configuration \$HOME/.eclipse-mat/''${version}/configuration" diff --git a/pkgs/by-name/ec/ecryptfs/package.nix b/pkgs/by-name/ec/ecryptfs/package.nix index d38fc3e91101..ca7ad28850a1 100644 --- a/pkgs/by-name/ec/ecryptfs/package.nix +++ b/pkgs/by-name/ec/ecryptfs/package.nix @@ -64,14 +64,14 @@ stdenv.mkDerivation rec { intltool ] # if python2 support is requested, it is needed at builtime as well as runtime. - ++ lib.optionals (enablePython) [ python2 ]; + ++ lib.optionals enablePython [ python2 ]; buildInputs = [ perl nss nspr pam ] - ++ lib.optionals (enablePython) [ python2 ]; + ++ lib.optionals enablePython [ python2 ]; propagatedBuildInputs = [ coreutils gettext diff --git a/pkgs/by-name/en/envision/package.nix b/pkgs/by-name/en/envision/package.nix index 60361501033d..3e3c27576298 100644 --- a/pkgs/by-name/en/envision/package.nix +++ b/pkgs/by-name/en/envision/package.nix @@ -22,7 +22,7 @@ buildFHSEnv { stdenv.cc.libc gcc ]) - ++ ( + ++ # OpenHMD dependencies ( pkgs.openhmd.buildInputs @@ -31,12 +31,12 @@ buildFHSEnv { meson ]) ) - ) + ++ ( # OpenComposite dependencies pkgs.opencomposite.buildInputs ++ pkgs.opencomposite.nativeBuildInputs ) - ++ ( + ++ # Monado dependencies ( pkgs.monado.buildInputs @@ -70,10 +70,10 @@ buildFHSEnv { glew ]) ) - ) - ++ ( + + ++ # SteamVR driver dependencies - [ pkgs.zlib ]) + [ pkgs.zlib ] ++ ( # WiVRn dependencies pkgs.wivrn.buildInputs diff --git a/pkgs/by-name/fa/fasthenry/package.nix b/pkgs/by-name/fa/fasthenry/package.nix index 20e2e68afead..aaea2c87ae13 100644 --- a/pkgs/by-name/fa/fasthenry/package.nix +++ b/pkgs/by-name/fa/fasthenry/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://www.fastfieldsolvers.com/fasthenry2.htm"; license = lib.licenses.lgpl2Only; maintainers = with lib.maintainers; [ fbeffa ]; - platforms = with lib.platforms; lib.intersectLists (linux) (x86_64 ++ x86); + platforms = with lib.platforms; lib.intersectLists linux (x86_64 ++ x86); mainProgram = "fasthenry"; }; }) diff --git a/pkgs/by-name/ff/fff/package.nix b/pkgs/by-name/ff/fff/package.nix index 3ffc8ac9f6e7..c55e9555fbe2 100644 --- a/pkgs/by-name/ff/fff/package.nix +++ b/pkgs/by-name/ff/fff/package.nix @@ -22,13 +22,13 @@ stdenv.mkDerivation rec { sha256 = "14ymdw6l6phnil0xf1frd5kgznaiwppcic0v4hb61s1zpf4wrshg"; }; - pathAdd = lib.makeSearchPath "bin" ([ + pathAdd = lib.makeSearchPath "bin" [ xdg-utils file coreutils w3m xdotool - ]); + ]; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ bashInteractive ]; diff --git a/pkgs/by-name/fl/flashprog/package.nix b/pkgs/by-name/fl/flashprog/package.nix index a43e3301ef72..0f553884e3e2 100644 --- a/pkgs/by-name/fl/flashprog/package.nix +++ b/pkgs/by-name/fl/flashprog/package.nix @@ -38,10 +38,10 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pciutils ] - ++ lib.optionals (withJlink) [ + ++ lib.optionals withJlink [ libjaylink ] - ++ lib.optionals (withGpio) [ + ++ lib.optionals withGpio [ libgpiod ]; diff --git a/pkgs/by-name/gn/gnss-sdr/package.nix b/pkgs/by-name/gn/gnss-sdr/package.nix index b1eddee05f54..eb8de09e83a6 100644 --- a/pkgs/by-name/gn/gnss-sdr/package.nix +++ b/pkgs/by-name/gn/gnss-sdr/package.nix @@ -69,7 +69,7 @@ gnuradio.pkgs.mkDerivation rec { ++ lib.optionals (gnuradio.hasFeature "gr-uhd") [ gnuradio.unwrapped.uhd ] - ++ lib.optionals (enableRawUdp) [ + ++ lib.optionals enableRawUdp [ libpcap ] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [ @@ -82,7 +82,7 @@ gnuradio.pkgs.mkDerivation rec { ++ lib.optionals (gnuradio.hasFeature "gr-pdu") [ gnuradio.unwrapped.libad9361 ] - ++ lib.optionals (enableOsmosdr) [ + ++ lib.optionals enableOsmosdr [ gnuradio.pkgs.osmosdr ]; diff --git a/pkgs/by-name/go/google-cloud-sdk/package.nix b/pkgs/by-name/go/google-cloud-sdk/package.nix index d4fbf411c516..1d37ebf1c416 100644 --- a/pkgs/by-name/go/google-cloud-sdk/package.nix +++ b/pkgs/by-name/go/google-cloud-sdk/package.nix @@ -52,8 +52,8 @@ let crcmod grpcio ] - ++ lib.optional (with-gce) google-compute-engine - ++ lib.optional (with-numpy) numpy + ++ lib.optional with-gce google-compute-engine + ++ lib.optional with-numpy numpy ); data = import ./data.nix { }; diff --git a/pkgs/by-name/gy/gyroflow/package.nix b/pkgs/by-name/gy/gyroflow/package.nix index 89a73b349701..d9fa5ab9cd43 100644 --- a/pkgs/by-name/gy/gyroflow/package.nix +++ b/pkgs/by-name/gy/gyroflow/package.nix @@ -119,7 +119,7 @@ rustPlatform.buildRustPackage rec { ''; desktopItems = [ - (makeDesktopItem ({ + (makeDesktopItem { name = "gyroflow"; desktopName = "Gyroflow"; genericName = "Video stabilization using gyroscope data"; @@ -137,7 +137,7 @@ rustPlatform.buildRustPackage rec { startupNotify = true; startupWMClass = "gyroflow"; prefersNonDefaultGPU = true; - })) + }) ]; meta = { diff --git a/pkgs/by-name/he/headphones-toolbox/package.nix b/pkgs/by-name/he/headphones-toolbox/package.nix index d318822b69e2..d5e6b9565523 100644 --- a/pkgs/by-name/he/headphones-toolbox/package.nix +++ b/pkgs/by-name/he/headphones-toolbox/package.nix @@ -12,7 +12,7 @@ yarnConfigHook, }: -rustPlatform.buildRustPackage (rec { +rustPlatform.buildRustPackage rec { pname = "headphones-toolbox"; version = "0.0.7"; tag = "test-tauri-v2-2"; @@ -57,4 +57,4 @@ rustPlatform.buildRustPackage (rec { ]; platforms = lib.platforms.linux; }; -}) +} diff --git a/pkgs/by-name/hy/hyperscan/package.nix b/pkgs/by-name/hy/hyperscan/package.nix index 0b1e5cf5db0f..faf7de95740b 100644 --- a/pkgs/by-name/hy/hyperscan/package.nix +++ b/pkgs/by-name/hy/hyperscan/package.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { "-DBUILD_AVX512=ON" ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) "-DFAT_RUNTIME=ON" - ++ lib.optional (withStatic) "-DBUILD_STATIC_AND_SHARED=ON" + ++ lib.optional withStatic "-DBUILD_STATIC_AND_SHARED=ON" ++ lib.optional (!withStatic) "-DBUILD_SHARED_LIBS=ON"; # hyperscan CMake is completely broken for chimera builds when pcre is compiled diff --git a/pkgs/by-name/im/immersed/package.nix b/pkgs/by-name/im/immersed/package.nix index 21c27be50905..28a5a97f5546 100644 --- a/pkgs/by-name/im/immersed/package.nix +++ b/pkgs/by-name/im/immersed/package.nix @@ -9,7 +9,7 @@ let pname = "immersed"; version = "10.9.0"; - sources = lib.mapAttrs (_: fetchurl) (rec { + sources = lib.mapAttrs (_: fetchurl) rec { x86_64-linux = { url = "https://web.archive.org/web/20250725134919if_/https://static.immersed.com/dl/Immersed-x86_64.AppImage"; hash = "sha256-plGcvZRpV+nhQ4FoYiIuLmyOg/SHJ8ZjT4Fh6UyH9W0="; @@ -23,7 +23,7 @@ let hash = "sha256-lmSkatB75Bztm19aCC50qrd/NV+HQX9nBMOTxIguaqI="; }; aarch64-darwin = x86_64-darwin; - }); + }; src = sources.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); diff --git a/pkgs/by-name/ji/jitsi/package.nix b/pkgs/by-name/ji/jitsi/package.nix index e7e9fb24143f..c7d2a47b77e6 100644 --- a/pkgs/by-name/ji/jitsi/package.nix +++ b/pkgs/by-name/ji/jitsi/package.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { categories = [ "Chat" ]; }; - libPath = lib.makeLibraryPath ([ + libPath = lib.makeLibraryPath [ stdenv.cc.cc # For libstdc++. alsa-lib dbus @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { xorg.libXext xorg.libXScrnSaver xorg.libXv - ]); + ]; nativeBuildInputs = [ unzip ]; buildInputs = [ diff --git a/pkgs/by-name/ki/kingstvis/package.nix b/pkgs/by-name/ki/kingstvis/package.nix index 285bbe0cc960..e5d310405a49 100644 --- a/pkgs/by-name/ki/kingstvis/package.nix +++ b/pkgs/by-name/ki/kingstvis/package.nix @@ -24,7 +24,7 @@ in buildFHSEnv { inherit pname version; - targetPkgs = pkgs: ([ + targetPkgs = pkgs: [ dbus fontconfig freetype @@ -39,7 +39,7 @@ buildFHSEnv { xorg.libXrender xorg.libxcb zlib - ]); + ]; extraInstallCommands = '' install -Dvm644 ${src}/Driver/99-Kingst.rules \ diff --git a/pkgs/by-name/kv/kvmtool/package.nix b/pkgs/by-name/kv/kvmtool/package.nix index e9b32618a57d..ff5cdd1aec77 100644 --- a/pkgs/by-name/kv/kvmtool/package.nix +++ b/pkgs/by-name/kv/kvmtool/package.nix @@ -26,9 +26,9 @@ stdenv.mkDerivation { "CROSS_COMPILE=${stdenv.cc.targetPrefix}" "ARCH=${stdenv.hostPlatform.linuxArch}" ] - ++ lib.optionals stdenv.hostPlatform.isAarch64 ([ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "LIBFDT_DIR=${dtc}/lib" - ]); + ]; meta = with lib; { description = "Lightweight tool for hosting KVM guests"; diff --git a/pkgs/by-name/ld/ldid/package.nix b/pkgs/by-name/ld/ldid/package.nix index 5dcd0622db0b..82e4ded896f5 100644 --- a/pkgs/by-name/ld/ldid/package.nix +++ b/pkgs/by-name/ld/ldid/package.nix @@ -25,10 +25,10 @@ stdenv.mkDerivation (finalAttrs: { openssl ]; - env.NIX_LDFLAGS = toString ([ + env.NIX_LDFLAGS = toString [ "-lcrypto" "-lplist-2.0" - ]); + ]; buildPhase = '' runHook preBuild diff --git a/pkgs/by-name/li/libev/package.nix b/pkgs/by-name/li/libev/package.nix index 017d11322559..cf0f426f96b2 100644 --- a/pkgs/by-name/li/libev/package.nix +++ b/pkgs/by-name/li/libev/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; - configureFlags = lib.optional (static) "LDFLAGS=-static"; + configureFlags = lib.optional static "LDFLAGS=-static"; meta = { description = "High-performance event loop/event model with lots of features"; diff --git a/pkgs/by-name/li/libnl/package.nix b/pkgs/by-name/li/libnl/package.nix index 2038f109726f..20e8ea5313de 100644 --- a/pkgs/by-name/li/libnl/package.nix +++ b/pkgs/by-name/li/libnl/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional pythonSupport swig; - postBuild = lib.optionalString (pythonSupport) '' + postBuild = lib.optionalString pythonSupport '' cd python ${python.pythonOnBuildForHost.interpreter} setup.py install --prefix=../pythonlib cd - diff --git a/pkgs/by-name/li/libomxil-bellagio/package.nix b/pkgs/by-name/li/libomxil-bellagio/package.nix index 936d70f32787..7b87b9122284 100644 --- a/pkgs/by-name/li/libomxil-bellagio/package.nix +++ b/pkgs/by-name/li/libomxil-bellagio/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { let isLLVM17 = stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"; in - "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion${lib.optionalString (isLLVM17) " -Wno-error=unused-but-set-variable"}"; + "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion${lib.optionalString isLLVM17 " -Wno-error=unused-but-set-variable"}"; meta = with lib; { homepage = "https://omxil.sourceforge.net/"; diff --git a/pkgs/by-name/li/libusb1/package.nix b/pkgs/by-name/li/libusb1/package.nix index 168c970b7bf2..102eb5a23804 100644 --- a/pkgs/by-name/li/libusb1/package.nix +++ b/pkgs/by-name/li/libusb1/package.nix @@ -48,8 +48,7 @@ stdenv.mkDerivation rec { dontAddDisableDepTrack = stdenv.hostPlatform.isWindows; configureFlags = - lib.optional (!enableUdev) "--disable-udev" - ++ lib.optional (withExamples) "--enable-examples-build"; + lib.optional (!enableUdev) "--disable-udev" ++ lib.optional withExamples "--enable-examples-build"; postBuild = lib.optionalString withDocs '' make -C doc diff --git a/pkgs/by-name/li/limo/package.nix b/pkgs/by-name/li/limo/package.nix index d6ee2077b721..c466fb435c79 100644 --- a/pkgs/by-name/li/limo/package.nix +++ b/pkgs/by-name/li/limo/package.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeFeature "LIMO_INSTALL_PREFIX" (placeholder "out")) ] - ++ lib.optionals (withUnrar) [ + ++ lib.optionals withUnrar [ (lib.cmakeBool "USE_SYSTEM_LIBUNRAR" true) ] ++ lib.optionals (!withUnrar) [ diff --git a/pkgs/by-name/ma/mattermost/build-plugin.nix b/pkgs/by-name/ma/mattermost/build-plugin.nix index 8dd89211e2e2..730ded413609 100644 --- a/pkgs/by-name/ma/mattermost/build-plugin.nix +++ b/pkgs/by-name/ma/mattermost/build-plugin.nix @@ -53,7 +53,7 @@ let ${lib.getExe golangci-lint} "$@" result=$? echo "golangci-lint returned: $result" >&2 - ${lib.optionalString (ignoreGoLintWarnings) '' + ${lib.optionalString ignoreGoLintWarnings '' if [ $result != 0 ]; then cat <&2 Ignoring return value since ignoreGoLintWarnings was true. diff --git a/pkgs/by-name/me/mepo/package.nix b/pkgs/by-name/me/mepo/package.nix index d4c5b407281e..074ba71d7cdb 100644 --- a/pkgs/by-name/me/mepo/package.nix +++ b/pkgs/by-name/me/mepo/package.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { for program in $out/bin/* ; do wrapProgram $program \ --suffix PATH : $out/bin:${ - lib.makeBinPath ([ + lib.makeBinPath [ busybox curl gpsd @@ -74,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: { util-linux xwininfo zenity - ]) + ] } done ''; diff --git a/pkgs/by-name/mu/mupdf/package.nix b/pkgs/by-name/mu/mupdf/package.nix index 5ae579c54aaa..97a5c42ab113 100644 --- a/pkgs/by-name/mu/mupdf/package.nix +++ b/pkgs/by-name/mu/mupdf/package.nix @@ -101,8 +101,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ] ++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ] - ++ lib.optionals (enableOcr) [ "USE_TESSERACT=yes" ] - ++ lib.optionals (enableBarcode) [ + ++ lib.optionals enableOcr [ "USE_TESSERACT=yes" ] + ++ lib.optionals enableBarcode [ "barcode=yes" "USE_SYSTEM_ZXINGCPP=no" ]; @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { ps.libclang ])) ] - ++ lib.optionals (enablePython) [ + ++ lib.optionals enablePython [ which swig ] @@ -169,7 +169,7 @@ stdenv.mkDerivation rec { postBuild = lib.optionalString (enableCxx || enablePython) '' for dir in build/*; do - ./scripts/mupdfwrap.py -d "$dir" -b ${lib.optionalString (enableCxx) "01"}${lib.optionalString (enablePython) "23"} + ./scripts/mupdfwrap.py -d "$dir" -b ${lib.optionalString enableCxx "01"}${lib.optionalString enablePython "23"} done ''; @@ -239,15 +239,15 @@ stdenv.mkDerivation rec { ln -s "$bin/bin/mupdf-gl" "$bin/bin/mupdf" '' else - lib.optionalString (enableX11) '' + lib.optionalString enableX11 '' ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf" '' ) - + (lib.optionalString (enableCxx) '' + + (lib.optionalString enableCxx '' cp platform/c++/include/mupdf/*.h $out/include/mupdf cp build/*/libmupdfcpp.so* $out/lib '') - + (lib.optionalString (enablePython) ( + + (lib.optionalString enablePython ( '' mkdir -p $out/${python3.sitePackages}/mupdf cp build/*/_mupdf.so $out/${python3.sitePackages}/mupdf diff --git a/pkgs/by-name/na/nanopb/runtime.nix b/pkgs/by-name/na/nanopb/runtime.nix index fba88ee37e2c..5b6f419596a8 100644 --- a/pkgs/by-name/na/nanopb/runtime.nix +++ b/pkgs/by-name/na/nanopb/runtime.nix @@ -22,7 +22,7 @@ noStaticAssert, }: -stdenv.mkDerivation ({ +stdenv.mkDerivation { pname = "nanopb-runtime"; inherit src version; @@ -115,4 +115,4 @@ stdenv.mkDerivation ({ "-Dnanopb_BUILD_GENERATOR=OFF" "-Dnanopb_BUILD_RUNTIME=ON" ]; -}) +} diff --git a/pkgs/by-name/ne/neomutt/package.nix b/pkgs/by-name/ne/neomutt/package.nix index 8bea0a768b5f..b70f75ce00c5 100644 --- a/pkgs/by-name/ne/neomutt/package.nix +++ b/pkgs/by-name/ne/neomutt/package.nix @@ -37,9 +37,9 @@ withNotmuch ? true, }: -assert lib.warnIf ( - enableMixmaster -) "Support for mixmaster has been removed from neomutt since the 20241002 release" true; +assert lib.warnIf enableMixmaster + "Support for mixmaster has been removed from neomutt since the 20241002 release" + true; stdenv.mkDerivation (finalAttrs: { pname = "neomutt"; diff --git a/pkgs/by-name/ng/nghttp2/package.nix b/pkgs/by-name/ng/nghttp2/package.nix index 20cabbec1f7a..6163536434a3 100644 --- a/pkgs/by-name/ng/nghttp2/package.nix +++ b/pkgs/by-name/ng/nghttp2/package.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { "man" ]; - nativeBuildInputs = [ pkg-config ] ++ lib.optionals (enableApp) [ installShellFiles ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals enableApp [ installShellFiles ]; buildInputs = lib.optionals enableApp [ @@ -70,15 +70,15 @@ stdenv.mkDerivation rec { zlib ] ++ lib.optionals (enableApp && !enableHttp3) [ openssl ] - ++ lib.optionals (enableGetAssets) [ libxml2 ] - ++ lib.optionals (enableHpack) [ jansson ] - ++ lib.optionals (enableJemalloc) [ jemalloc ] - ++ lib.optionals (enableHttp3) [ + ++ lib.optionals enableGetAssets [ libxml2 ] + ++ lib.optionals enableHpack [ jansson ] + ++ lib.optionals enableJemalloc [ jemalloc ] + ++ lib.optionals enableHttp3 [ ngtcp2 nghttp3 quictls ] - ++ lib.optionals (enablePython) [ python3 ]; + ++ lib.optionals enablePython [ python3 ]; enableParallelBuilding = true; @@ -90,11 +90,11 @@ stdenv.mkDerivation rec { # Unit tests require CUnit and setting TZDIR environment variable doCheck = enableTests; - nativeCheckInputs = lib.optionals (enableTests) [ + nativeCheckInputs = lib.optionals enableTests [ cunit tzdata ]; - preCheck = lib.optionalString (enableTests) '' + preCheck = lib.optionalString enableTests '' export TZDIR=${tzdata}/share/zoneinfo ''; @@ -105,13 +105,13 @@ stdenv.mkDerivation rec { ''; postInstall = - lib.optionalString (enableApp) '' + lib.optionalString enableApp '' installShellCompletion --bash doc/bash_completion/{h2load,nghttp,nghttpd,nghttpx} '' + lib.optionalString (!enableApp) '' rm -r $out/bin '' - + lib.optionalString (enablePython) '' + + lib.optionalString enablePython '' patchShebangs $out/share/nghttp2 ''; diff --git a/pkgs/by-name/no/notcurses/package.nix b/pkgs/by-name/no/notcurses/package.nix index fb40509ba8e4..e9a430aa226b 100644 --- a/pkgs/by-name/no/notcurses/package.nix +++ b/pkgs/by-name/no/notcurses/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { ++ lib.optional multimediaSupport ffmpeg; cmakeFlags = - lib.optional (qrcodegenSupport) "-DUSE_QRCODEGEN=ON" + lib.optional qrcodegenSupport "-DUSE_QRCODEGEN=ON" ++ lib.optional (!multimediaSupport) "-DUSE_MULTIMEDIA=none"; # https://github.com/dankamongmen/notcurses/issues/2661 diff --git a/pkgs/by-name/oc/octoprint/package.nix b/pkgs/by-name/oc/octoprint/package.nix index 378877086b1b..c9a8bfb49fb5 100644 --- a/pkgs/by-name/oc/octoprint/package.nix +++ b/pkgs/by-name/oc/octoprint/package.nix @@ -15,7 +15,7 @@ let py = python3.override { self = py; - packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ + packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) [ ( self: super: { @@ -239,7 +239,7 @@ let }) (callPackage ./plugins.nix { }) packageOverrides - ]); + ]; }; in with py.pkgs; diff --git a/pkgs/by-name/op/opencascade-occt/package.nix b/pkgs/by-name/op/opencascade-occt/package.nix index 5e0edc8a9ade..d1aa5645ddce 100644 --- a/pkgs/by-name/op/opencascade-occt/package.nix +++ b/pkgs/by-name/op/opencascade-occt/package.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { passthru = { tests = { - withVtk = opencascade-occt.override ({ withVtk = true; }); + withVtk = opencascade-occt.override { withVtk = true; }; }; }; diff --git a/pkgs/by-name/op/openjpeg/package.nix b/pkgs/by-name/op/openjpeg/package.nix index e747f18bc11d..4e6920fa3d40 100644 --- a/pkgs/by-name/op/openjpeg/package.nix +++ b/pkgs/by-name/op/openjpeg/package.nix @@ -96,7 +96,7 @@ stdenv.mkDerivation rec { curl fcgi ] - ++ lib.optional (jpipLibSupport) jdk; + ++ lib.optional jpipLibSupport jdk; # tests did fail on powerpc64 doCheck = !stdenv.hostPlatform.isPower64 && stdenv.buildPlatform.canExecute stdenv.hostPlatform; diff --git a/pkgs/by-name/pa/part-db/package.nix b/pkgs/by-name/pa/part-db/package.nix index 1d00c12f4228..67fe7e1b0e08 100644 --- a/pkgs/by-name/pa/part-db/package.nix +++ b/pkgs/by-name/pa/part-db/package.nix @@ -16,7 +16,7 @@ let pname = "part-db"; version = "1.14.5"; - srcWithVendor = php.buildComposerProject ({ + srcWithVendor = php.buildComposerProject { inherit pname version; src = fetchFromGitHub { @@ -50,7 +50,7 @@ let cd $out/ php -d memory_limit=256M bin/console cache:warmup ''; - }); + }; in stdenv.mkDerivation (finalAttrs: { inherit pname version; diff --git a/pkgs/by-name/pc/pcsx2/package.nix b/pkgs/by-name/pc/pcsx2/package.nix index 61c2f8adba07..16e9aeabf1f6 100644 --- a/pkgs/by-name/pc/pcsx2/package.nix +++ b/pkgs/by-name/pc/pcsx2/package.nix @@ -120,10 +120,10 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: { qtWrapperArgs = let - libs = lib.makeLibraryPath ([ + libs = lib.makeLibraryPath [ vulkan-loader shaderc - ]); + ]; in [ "--prefix LD_LIBRARY_PATH : ${libs}" ]; diff --git a/pkgs/by-name/pd/pdm/package.nix b/pkgs/by-name/pd/pdm/package.nix index c4f097a2de66..f1372dc8a206 100644 --- a/pkgs/by-name/pd/pdm/package.nix +++ b/pkgs/by-name/pd/pdm/package.nix @@ -20,7 +20,7 @@ let }; }); # pdm requires ...... -> ghostscript-with-X which is AGPL only - matplotlib = super.matplotlib.override ({ enableTk = false; }); + matplotlib = super.matplotlib.override { enableTk = false; }; # pdm requires ...... -> jbig2dec which is AGPL only moto = super.moto.overridePythonAttrs (old: { doCheck = false; diff --git a/pkgs/by-name/po/ponyc/package.nix b/pkgs/by-name/po/ponyc/package.nix index cad398189fb3..d2c126c78aae 100644 --- a/pkgs/by-name/po/ponyc/package.nix +++ b/pkgs/by-name/po/ponyc/package.nix @@ -22,7 +22,7 @@ procps, }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = "ponyc"; version = "0.59.0"; @@ -175,4 +175,4 @@ stdenv.mkDerivation (rec { "aarch64-darwin" ]; }; -}) +} diff --git a/pkgs/by-name/qu/qutebrowser/package.nix b/pkgs/by-name/qu/qutebrowser/package.nix index fc2b940d0f98..e8ee8dc2f6cc 100644 --- a/pkgs/by-name/qu/qutebrowser/package.nix +++ b/pkgs/by-name/qu/qutebrowser/package.nix @@ -145,7 +145,7 @@ python3.pkgs.buildPythonApplication { # avoid persistant warning on starup --set QT_STYLE_OVERRIDE Fusion ${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''} - ${lib.optionalString (enableVulkan) '' + ${lib.optionalString enableVulkan '' --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} --set-default QSG_RHI_BACKEND vulkan ''} diff --git a/pkgs/by-name/re/redoflacs/package.nix b/pkgs/by-name/re/redoflacs/package.nix index 3c9dd24957aa..6dc5e5e15536 100644 --- a/pkgs/by-name/re/redoflacs/package.nix +++ b/pkgs/by-name/re/redoflacs/package.nix @@ -39,10 +39,10 @@ stdenv.mkDerivation rec { postFixup = '' wrapProgram $out/bin/redoflacs \ --prefix PATH : ${ - lib.makeBinPath ([ + lib.makeBinPath [ flac sox - ]) + ] } ''; diff --git a/pkgs/by-name/rn/rng-tools/package.nix b/pkgs/by-name/rn/rng-tools/package.nix index cce1b42739c3..66ab63aec361 100644 --- a/pkgs/by-name/rn/rng-tools/package.nix +++ b/pkgs/by-name/rn/rng-tools/package.nix @@ -43,11 +43,11 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - (lib.enableFeature (withJitterEntropy) "jitterentropy") - (lib.withFeature (withNistBeacon) "nistbeacon") - (lib.withFeature (withPkcs11) "pkcs11") - (lib.withFeature (withRtlsdr) "rtlsdr") - (lib.withFeature (withQrypt) "qrypt") + (lib.enableFeature withJitterEntropy "jitterentropy") + (lib.withFeature withNistBeacon "nistbeacon") + (lib.withFeature withPkcs11 "pkcs11") + (lib.withFeature withRtlsdr "rtlsdr") + (lib.withFeature withQrypt "qrypt") ]; buildInputs = [ diff --git a/pkgs/by-name/sa/sage/sage-env.nix b/pkgs/by-name/sa/sage/sage-env.nix index d1f0c104e183..87fb4bd9b54f 100644 --- a/pkgs/by-name/sa/sage/sage-env.nix +++ b/pkgs/by-name/sa/sage/sage-env.nix @@ -60,7 +60,7 @@ assert (!blas.isILP64) && (!lapack.isILP64); let runtimepath = ( - lib.makeBinPath ([ + lib.makeBinPath [ "@sage-local@" "@sage-local@/build" pythonEnv @@ -96,7 +96,7 @@ let lcalc rubiks less # needed to prevent transient test errors until https://github.com/ipython/ipython/pull/11864 is resolved - ]) + ] ); in writeTextFile rec { diff --git a/pkgs/by-name/sc/scopehal-apps/package.nix b/pkgs/by-name/sc/scopehal-apps/package.nix index 4ddd8ddc9fe6..e64f9557db16 100644 --- a/pkgs/by-name/sc/scopehal-apps/package.nix +++ b/pkgs/by-name/sc/scopehal-apps/package.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation { postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' mv -v $out/bin/ngscopeclient $out/bin/.ngscopeclient-unwrapped makeWrapper $out/bin/.ngscopeclient-unwrapped $out/bin/ngscopeclient \ - --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath ([ vulkan-loader ])}" + --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}" ''; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' diff --git a/pkgs/by-name/sh/sharedown/package.nix b/pkgs/by-name/sh/sharedown/package.nix index 155a2f92c284..5d8fa6f1c651 100644 --- a/pkgs/by-name/sh/sharedown/package.nix +++ b/pkgs/by-name/sh/sharedown/package.nix @@ -51,10 +51,10 @@ stdenvNoCC.mkDerivation rec { installPhase = let - binPath = lib.makeBinPath ([ + binPath = lib.makeBinPath [ ffmpeg yt-dlp - ]); + ]; modules = yarn2nix-moretea.mkYarnModules rec { name = "Sharedown-modules-${version}"; diff --git a/pkgs/by-name/sl/sleek-grub-theme/package.nix b/pkgs/by-name/sl/sleek-grub-theme/package.nix index f9814c485842..186993f6fbd2 100644 --- a/pkgs/by-name/sl/sleek-grub-theme/package.nix +++ b/pkgs/by-name/sl/sleek-grub-theme/package.nix @@ -17,12 +17,12 @@ stdenv.mkDerivation { pname = "sleek-grub-theme"; version = "unstable-2024-08-11"; - src = fetchFromGitHub ({ + src = fetchFromGitHub { owner = "sandesh236"; repo = "sleek--themes"; rev = "0c47e645ccc2d72aa165e9d994f9d09f58de9f6d"; hash = "sha256-H4s4CSR8DaH8RT9w40hkguNNcC0U8gHKS2FLt+FApeA="; - }); + }; installPhase = '' runHook preInstall diff --git a/pkgs/by-name/sl/slurm/package.nix b/pkgs/by-name/sl/slurm/package.nix index 96e3ce98b91f..1ed22d4730d0 100644 --- a/pkgs/by-name/sl/slurm/package.nix +++ b/pkgs/by-name/sl/slurm/package.nix @@ -131,7 +131,7 @@ stdenv.mkDerivation (finalAttrs: { "--without-rpath" # Required for configure to pick up the right dlopen path ] ++ (lib.optional (!enableX11) "--disable-x11") - ++ (lib.optional (enableNVML) "--with-nvml"); + ++ (lib.optional enableNVML "--with-nvml"); preConfigure = '' patchShebangs ./doc/html/shtml2html.py diff --git a/pkgs/by-name/sm/smuxi/package.nix b/pkgs/by-name/sm/smuxi/package.nix index 0d17f3e8b8a3..9bb651dfb673 100644 --- a/pkgs/by-name/sm/smuxi/package.nix +++ b/pkgs/by-name/sm/smuxi/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { mono stfl ] - ++ lib.optionals (guiSupport) [ + ++ lib.optionals guiSupport [ gtk-sharp-2_0 # loaded at runtime by GTK# gdk-pixbuf diff --git a/pkgs/by-name/su/sundials/package.nix b/pkgs/by-name/su/sundials/package.nix index e1a2a8c0fc85..05e3f972ce15 100644 --- a/pkgs/by-name/su/sundials/package.nix +++ b/pkgs/by-name/su/sundials/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { python3 ] ++ - lib.optionals (lapackSupport) + lib.optionals lapackSupport # Check that the same index size is used for both libraries ( assert (blas.isILP64 == lapack.isILP64); @@ -46,18 +46,18 @@ stdenv.mkDerivation rec { ) # KLU support is based on Suitesparse. It is tested upstream according to the # section 1.1.4.2 of INSTALL_GUIDE.pdf found in the source tarball. - ++ lib.optionals (kluSupport) [ + ++ lib.optionals kluSupport [ suitesparse ]; cmakeFlags = [ "-DEXAMPLES_INSTALL_PATH=${placeholder "examples"}/share/examples" ] - ++ lib.optionals (lapackSupport) [ + ++ lib.optionals lapackSupport [ "-DENABLE_LAPACK=ON" "-DLAPACK_LIBRARIES=${lapack}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary}" ] - ++ lib.optionals (kluSupport) [ + ++ lib.optionals kluSupport [ "-DENABLE_KLU=ON" "-DKLU_INCLUDE_DIR=${suitesparse.dev}/include" "-DKLU_LIBRARY_DIR=${suitesparse}/lib" diff --git a/pkgs/by-name/ta/tabby/package.nix b/pkgs/by-name/ta/tabby/package.nix index d46d201117d3..ff1efef04cde 100644 --- a/pkgs/by-name/ta/tabby/package.nix +++ b/pkgs/by-name/ta/tabby/package.nix @@ -106,9 +106,9 @@ let darwinBuildInputs = [ llamaccpPackage ] - ++ optionals stdenv.hostPlatform.isDarwin ([ + ++ optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 - ]); + ]; cudaBuildInputs = [ llamaccpPackage ]; rocmBuildInputs = [ llamaccpPackage ]; diff --git a/pkgs/by-name/tr/truecrack/package.nix b/pkgs/by-name/tr/truecrack/package.nix index 888ede92cd7d..dc7a9aa2da97 100644 --- a/pkgs/by-name/tr/truecrack/package.nix +++ b/pkgs/by-name/tr/truecrack/package.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { cudaPackages.cuda_cudart ]; - env.NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString [ # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: CpuAes.o:/build/source/src/Crypto/CpuAes.h:1233: multiple definition of @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { # Common/Crypto.c:42:13: error: implicit declaration of function 'cpu_CipherInit'; did you mean 'CipherInit'? [] # https://gitlab.com/kalilinux/packages/truecrack/-/commit/5b0e3a96b747013bded7b33f65bb42be2dbafc86 "-Wno-error=implicit-function-declaration" - ]); + ]; enableParallelBuilding = true; diff --git a/pkgs/by-name/uc/uclibc-ng/package.nix b/pkgs/by-name/uc/uclibc-ng/package.nix index 9863c5d02c22..ad2d6c4fb7c0 100644 --- a/pkgs/by-name/uc/uclibc-ng/package.nix +++ b/pkgs/by-name/uc/uclibc-ng/package.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: { "TARGET_ARCH=${stdenv.hostPlatform.linuxArch}" "VERBOSE=1" ] - ++ lib.optionals (isCross) [ + ++ lib.optionals isCross [ "CROSS=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/by-name/ud/udig/package.nix b/pkgs/by-name/ud/udig/package.nix index 17696713099a..4837f9fa4eae 100644 --- a/pkgs/by-name/ud/udig/package.nix +++ b/pkgs/by-name/ud/udig/package.nix @@ -57,10 +57,10 @@ let makeWrapper $out/opt/udig/udig.sh $out/bin/udig \ --prefix PATH : ${jre8}/bin \ --prefix LD_LIBRARY_PATH : ${ - lib.makeLibraryPath ([ + lib.makeLibraryPath [ libXtst gdal - ]) + ] } ''; @@ -93,7 +93,7 @@ let mkdir -p $out/Applications/udig cp -R . $out/Applications/udig wrapProgram $out/Applications/udig/udig.app/Contents/MacOS/udig_internal \ - --prefix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath ([ gdal ])} + --prefix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ gdal ]} ''; }; in diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index bbbb36d674f0..2150d13c1787 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: { python3.pkgs.numpy python3.pkgs.setuptools ] - ++ optionals (enableUtils) [ + ++ optionals enableUtils [ python3.pkgs.requests python3.pkgs.six @@ -168,11 +168,11 @@ stdenv.mkDerivation (finalAttrs: { boost libusb1 ] - ++ optionals (enableExamples) [ + ++ optionals enableExamples [ ncurses ncurses.dev ] - ++ optionals (enableDpdk) [ + ++ optionals enableDpdk [ dpdk ]; diff --git a/pkgs/by-name/vl/vlc-bin/package.nix b/pkgs/by-name/vl/vlc-bin/package.nix index 6aed05b571ca..85e7f1987ac7 100644 --- a/pkgs/by-name/vl/vlc-bin/package.nix +++ b/pkgs/by-name/vl/vlc-bin/package.nix @@ -58,11 +58,12 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "vlc"; maintainers = with lib.maintainers; [ pcasaretto ]; platforms = lib.systems.inspect.patternLogicalAnd (lib.systems.inspect.patterns.isDarwin) ( - ({ + { "arm64" = lib.systems.inspect.patterns.isAarch64; "intel64" = lib.systems.inspect.patterns.isx86_64; "universal" = lib.systems.inspect.patterns.isDarwin; - }).${variant} + } + .${variant} ); sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; diff --git a/pkgs/by-name/vo/voicevox-core/package.nix b/pkgs/by-name/vo/voicevox-core/package.nix index 7b9cbe55c16f..be6f1e0801b7 100644 --- a/pkgs/by-name/vo/voicevox-core/package.nix +++ b/pkgs/by-name/vo/voicevox-core/package.nix @@ -64,12 +64,12 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/VOICEVOX/voicevox_core"; license = with lib.licenses; [ mit - ({ + { name = "VOICEVOX Core Library Terms of Use"; url = "https://github.com/VOICEVOX/voicevox_resource/blob/main/core/README.md"; free = false; redistributable = true; - }) + } ]; maintainers = with lib.maintainers; [ tomasajt diff --git a/pkgs/by-name/wi/windmill/package.nix b/pkgs/by-name/wi/windmill/package.nix index 4ec6385e7418..4c7077de83ba 100644 --- a/pkgs/by-name/wi/windmill/package.nix +++ b/pkgs/by-name/wi/windmill/package.nix @@ -239,8 +239,8 @@ rustPlatform.buildRustPackage (finalAttrs: { "web-ui" ]; }) - (./update-librusty.sh) - (./update-ui_builder.sh) + ./update-librusty.sh + ./update-ui_builder.sh ]; meta = { diff --git a/pkgs/by-name/wo/wootility/package.nix b/pkgs/by-name/wo/wootility/package.nix index 9cce172a8c13..1abf4032cb49 100644 --- a/pkgs/by-name/wo/wootility/package.nix +++ b/pkgs/by-name/wo/wootility/package.nix @@ -38,9 +38,9 @@ appimageTools.wrapType2 { ''; extraPkgs = - pkgs: with pkgs; ([ + pkgs: with pkgs; [ xorg.libxkbfile - ]); + ]; meta = { homepage = "https://wooting.io/wootility"; diff --git a/pkgs/by-name/x2/x265/package.nix b/pkgs/by-name/x2/x265/package.nix index 54c93e9d7b69..c34f5773d0e7 100644 --- a/pkgs/by-name/x2/x265/package.nix +++ b/pkgs/by-name/x2/x265/package.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { cmake nasm ] - ++ lib.optionals (numaSupport) [ numactl ]; + ++ lib.optionals numaSupport [ numactl ]; cmakeFlags = [ "-DENABLE_ALPHA=ON" diff --git a/pkgs/by-name/ya/yambar/package.nix b/pkgs/by-name/ya/yambar/package.nix index fa1e99a3fc03..f25a80b9205d 100644 --- a/pkgs/by-name/ya/yambar/package.nix +++ b/pkgs/by-name/ya/yambar/package.nix @@ -71,11 +71,11 @@ stdenv.mkDerivation (finalAttrs: { tllist udev ] - ++ lib.optionals (waylandSupport) [ + ++ lib.optionals waylandSupport [ wayland wayland-protocols ] - ++ lib.optionals (x11Support) [ + ++ lib.optionals x11Support [ xcbutil xcbutilcursor xcbutilerrors diff --git a/pkgs/by-name/yo/yosys/package.nix b/pkgs/by-name/yo/yosys/package.nix index de1b7f3f5227..477b3cebdfa4 100644 --- a/pkgs/by-name/yo/yosys/package.nix +++ b/pkgs/by-name/yo/yosys/package.nix @@ -82,7 +82,7 @@ let bluespec = yosys-bluespec; ghdl = yosys-ghdl; } - // (yosys-symbiflow); + // yosys-symbiflow; in stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/by-name/zf/zfp/package.nix b/pkgs/by-name/zf/zfp/package.nix index 91bfc3f1b64c..a4aee973dd84 100644 --- a/pkgs/by-name/zf/zfp/package.nix +++ b/pkgs/by-name/zf/zfp/package.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional enableFortran "-DBUILD_ZFORP=ON" ++ lib.optional enableOpenMP "-DZFP_WITH_OPENMP=ON" ++ lib.optional enablePython "-DBUILD_ZFPY=ON" - ++ ([ "-DBUILD_UTILITIES=${if enableUtilities then "ON" else "OFF"}" ]); + ++ [ "-DBUILD_UTILITIES=${if enableUtilities then "ON" else "OFF"}" ]; doCheck = true; diff --git a/pkgs/by-name/zx/zxtune/package.nix b/pkgs/by-name/zx/zxtune/package.nix index 28ab7abb556f..9435ae3f01f8 100644 --- a/pkgs/by-name/zx/zxtune/package.nix +++ b/pkgs/by-name/zx/zxtune/package.nix @@ -45,7 +45,7 @@ let boost zlib ] - ++ lib.optional withQt (if (supportWayland) then qt5.qtwayland else qt5.qtbase); + ++ lib.optional withQt (if supportWayland then qt5.qtwayland else qt5.qtbase); in stdenv.mkDerivation rec { pname = "zxtune"; @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { buildPhase = let - setOptionalSupport = name: var: "support_${name}=" + (if (var) then "1" else ""); + setOptionalSupport = name: var: "support_${name}=" + (if var then "1" else ""); makeOptsCommon = [ ''-j$NIX_BUILD_CORES'' ''root.version=${src.rev}'' diff --git a/pkgs/desktops/gnome/extensions/default.nix b/pkgs/desktops/gnome/extensions/default.nix index c952ca8d04d7..2677cead4ac7 100644 --- a/pkgs/desktops/gnome/extensions/default.nix +++ b/pkgs/desktops/gnome/extensions/default.nix @@ -85,7 +85,7 @@ rec { (extensions: extensions // (import ./manuallyPackaged.nix { inherit callPackage; })) # Map the extension UUIDs to readable names (lib.attrValues) - (mapReadableNames) + mapReadableNames # Add some aliases ( extensions: diff --git a/pkgs/desktops/lomiri/services/lomiri-telephony-service/default.nix b/pkgs/desktops/lomiri/services/lomiri-telephony-service/default.nix index 1bd4834fccd8..8b5a9d33da45 100644 --- a/pkgs/desktops/lomiri/services/lomiri-telephony-service/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-telephony-service/default.nix @@ -147,11 +147,11 @@ stdenv.mkDerivation (finalAttrs: { )) ]; - env.NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev telepathy-glib}/include/telepathy-1.0" # it's in telepathy-farstream's Requires.private, so it & its dependencies don't get pulled in "-I${lib.getDev dbus-glib}/include/dbus-1.0" # telepathy-glib dependency "-I${lib.getDev dbus}/include/dbus-1.0" # telepathy-glib dependency - ]); + ]; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; diff --git a/pkgs/desktops/mate/atril/default.nix b/pkgs/desktops/mate/atril/default.nix index bf72606031ed..ba96da66934b 100644 --- a/pkgs/desktops/mate/atril/default.nix +++ b/pkgs/desktops/mate/atril/default.nix @@ -72,11 +72,11 @@ stdenv.mkDerivation rec { configureFlags = [ ] - ++ lib.optionals (enableDjvu) [ "--enable-djvu" ] - ++ lib.optionals (enableEpub) [ "--enable-epub" ] - ++ lib.optionals (enablePostScript) [ "--enable-ps" ] - ++ lib.optionals (enableXps) [ "--enable-xps" ] - ++ lib.optionals (enableImages) [ "--enable-pixbuf" ]; + ++ lib.optionals enableDjvu [ "--enable-djvu" ] + ++ lib.optionals enableEpub [ "--enable-epub" ] + ++ lib.optionals enablePostScript [ "--enable-ps" ] + ++ lib.optionals enableXps [ "--enable-xps" ] + ++ lib.optionals enableImages [ "--enable-pixbuf" ]; env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; diff --git a/pkgs/development/beam-modules/fetch-hex.nix b/pkgs/development/beam-modules/fetch-hex.nix index 8b8024a31b2b..62691791656d 100644 --- a/pkgs/development/beam-modules/fetch-hex.nix +++ b/pkgs/development/beam-modules/fetch-hex.nix @@ -11,7 +11,7 @@ meta ? { }, }: -stdenv.mkDerivation ({ +stdenv.mkDerivation { pname = pkg; inherit version; dontBuild = true; @@ -47,4 +47,4 @@ stdenv.mkDerivation ({ ''; inherit meta; -}) +} diff --git a/pkgs/development/beam-modules/fetch-rebar-deps.nix b/pkgs/development/beam-modules/fetch-rebar-deps.nix index 644dd1470ea7..bf6c23521074 100644 --- a/pkgs/development/beam-modules/fetch-rebar-deps.nix +++ b/pkgs/development/beam-modules/fetch-rebar-deps.nix @@ -12,7 +12,7 @@ meta ? { }, }: -stdenv.mkDerivation ({ +stdenv.mkDerivation { pname = "rebar-deps-${name}"; inherit version; @@ -43,4 +43,4 @@ stdenv.mkDerivation ({ impureEnvVars = lib.fetchers.proxyImpureEnvVars; inherit meta; -}) +} diff --git a/pkgs/development/compilers/chicken/5/overrides.nix b/pkgs/development/compilers/chicken/5/overrides.nix index 5957f10a746b..d4d2bc26d076 100644 --- a/pkgs/development/compilers/chicken/5/overrides.nix +++ b/pkgs/development/compilers/chicken/5/overrides.nix @@ -119,13 +119,13 @@ in }; # missing dependency in upstream egg mistie = addToPropagatedBuildInputs (with chickenEggs; [ srfi-1 ]); - mosquitto = addToPropagatedBuildInputs ([ pkgs.mosquitto ]); + mosquitto = addToPropagatedBuildInputs [ pkgs.mosquitto ]; nanomsg = addToBuildInputs pkgs.nanomsg; ncurses = addToBuildInputsWithPkgConfig [ pkgs.ncurses ]; - opencl = addToBuildInputs ([ + opencl = addToBuildInputs [ pkgs.opencl-headers pkgs.ocl-icd - ]); + ]; openssl = addToBuildInputs pkgs.openssl; plot = addToBuildInputs pkgs.plotutils; postgresql = addToBuildInputsWithPkgConfig pkgs.libpq; diff --git a/pkgs/development/compilers/dotnet/wrapper.nix b/pkgs/development/compilers/dotnet/wrapper.nix index 6de2acb85620..16d8441af83b 100644 --- a/pkgs/development/compilers/dotnet/wrapper.nix +++ b/pkgs/development/compilers/dotnet/wrapper.nix @@ -107,7 +107,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { sdk = finalAttrs.finalPackage; built = stdenv.mkDerivation { name = "${sdk.name}-test-${name}"; - buildInputs = [ sdk ] ++ buildInputs ++ lib.optional (usePackageSource) sdk.packages; + buildInputs = [ sdk ] ++ buildInputs ++ lib.optional usePackageSource sdk.packages; # make sure ICU works in a sandbox propagatedSandboxProfile = toString sdk.__propagatedSandboxProfile; unpackPhase = @@ -281,7 +281,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { command = "HOME=$(mktemp -d) dotnet " + (if type == "sdk" then "--version" else "--info"); }; } - // lib.optionalAttrs (type == "sdk") ({ + // lib.optionalAttrs (type == "sdk") { buildDotnetModule = recurseIntoAttrs ( (pkgs.appendOverlays [ (self: super: { @@ -304,6 +304,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { cs = mkWebTest "C#" "cs"; fs = mkWebTest "F#" "fs"; }; - }); + }; }; }) diff --git a/pkgs/development/compilers/factor-lang/0.100.nix b/pkgs/development/compilers/factor-lang/0.100.nix index 64751dad76a9..856ce4a4e777 100644 --- a/pkgs/development/compilers/factor-lang/0.100.nix +++ b/pkgs/development/compilers/factor-lang/0.100.nix @@ -1,9 +1,9 @@ { callPackage, fetchurl }: -callPackage ./unwrapped.nix (rec { +callPackage ./unwrapped.nix rec { version = "0.100"; src = fetchurl { url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"; hash = "sha256-ei1x6mgEoDVe1mKfoWSGC9RgZCONovAPYfIdAlOGi+0="; }; -}) +} diff --git a/pkgs/development/compilers/factor-lang/0.99.nix b/pkgs/development/compilers/factor-lang/0.99.nix index 88c234213af9..d5c1f3c82ad6 100644 --- a/pkgs/development/compilers/factor-lang/0.99.nix +++ b/pkgs/development/compilers/factor-lang/0.99.nix @@ -1,9 +1,9 @@ { callPackage, fetchurl }: -callPackage ./unwrapped.nix (rec { +callPackage ./unwrapped.nix rec { version = "0.99"; src = fetchurl { url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"; sha256 = "f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e"; }; -}) +} diff --git a/pkgs/development/compilers/gambit/gambit-support.nix b/pkgs/development/compilers/gambit/gambit-support.nix index 64a9b6a2bb46..c85aa26489dc 100644 --- a/pkgs/development/compilers/gambit/gambit-support.nix +++ b/pkgs/development/compilers/gambit/gambit-support.nix @@ -28,7 +28,7 @@ rec { export-gambopt = params: "export GAMBOPT=${params.buildRuntimeOptions} ;"; - gambit-bootstrap = import ./bootstrap.nix (pkgs); + gambit-bootstrap = import ./bootstrap.nix pkgs; meta = with lib; { description = "Optimizing Scheme to C compiler"; diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index a79cfed28598..ee94af1d9b22 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -289,12 +289,12 @@ pipe ) ) ) - + optionalString targetPlatform.isAvr ('' + + optionalString targetPlatform.isAvr '' makeFlagsArray+=( '-s' # workaround for hitting hydra log limit 'LIMITS_H_TEST=false' ) - ''); + ''; inherit noSysDirs @@ -333,7 +333,7 @@ pipe assert profiledCompiler -> !disableBootstrap; let target = - optionalString (profiledCompiler) "profiled" + optionalString profiledCompiler "profiled" + optionalString ( (lib.systems.equals targetPlatform hostPlatform) && (lib.systems.equals hostPlatform buildPlatform) @@ -401,7 +401,7 @@ pipe !(targetPlatform.isLinux && targetPlatform.isx86_64 && targetPlatform.libc == "glibc") ) "shadowstack" ++ optional (!(targetPlatform.isLinux && targetPlatform.isAarch64)) "pacret" - ++ optionals (langFortran) [ + ++ optionals langFortran [ "fortify" "format" ]; @@ -427,7 +427,7 @@ pipe dontMoveLib64 = true; } )) - ([ + [ (callPackage ./common/libgcc.nix { inherit version @@ -442,4 +442,4 @@ pipe ; }) (callPackage ./common/checksum.nix { inherit langC langCC; }) - ]) + ] diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 2c0fa1b40852..c75a960890f1 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -55,7 +55,7 @@ in [ ] # Pass the path to a C++ compiler directly in the Makefile.in ++ optional (!lib.systems.equals targetPlatform hostPlatform) ./libstdc++-target.patch -++ optionals (noSysDirs) ( +++ optionals noSysDirs ( [ # Do not try looking for binaries and libraries in /lib and /usr/lib ./gcc-12-no-sys-dirs.patch @@ -86,11 +86,12 @@ in ) # Pass CFLAGS on to gnat ++ optional langAda ./gnat-cflags-11.patch -++ optional langFortran ( - # Fix interaction of gfortran and libtool - # Fixes the output of -v - # See also https://github.com/nixOS/nixpkgs/commit/cc6f814a8f0e9b70ede5b24192558664fa1f98a2 - ./gcc-12-gfortran-driving.patch) +++ + optional langFortran + # Fix interaction of gfortran and libtool + # Fixes the output of -v + # See also https://github.com/nixOS/nixpkgs/commit/cc6f814a8f0e9b70ede5b24192558664fa1f98a2 + ./gcc-12-gfortran-driving.patch # Do not pass a default include dir on PowerPC+Musl # See https://github.com/NixOS/nixpkgs/pull/45340/commits/d6bb7d45162ac93e017cc9b665ae4836f6410710 ++ [ ./ppc-musl.patch ] diff --git a/pkgs/development/compilers/ghc/9.0.2-binary.nix b/pkgs/development/compilers/ghc/9.0.2-binary.nix index aa29a7cc010b..acf7effd7083 100644 --- a/pkgs/development/compilers/ghc/9.0.2-binary.nix +++ b/pkgs/development/compilers/ghc/9.0.2-binary.nix @@ -265,13 +265,13 @@ stdenv.mkDerivation { buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in lib.concatStringsSep "\n" [ - ('' + '' shopt -u nullglob echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" if ! test -e ${buildExeGlob}; then echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; fi - '') + '' (lib.concatMapStringsSep "\n" ( { fileToCheckFor, nixPackage }: lib.optionalString (fileToCheckFor != null) '' diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix index adb1afa5e74f..44544744244a 100644 --- a/pkgs/development/compilers/ghc/9.2.4-binary.nix +++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix @@ -238,13 +238,13 @@ stdenv.mkDerivation { buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in lib.concatStringsSep "\n" [ - ('' + '' shopt -u nullglob echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" if ! test -e ${buildExeGlob}; then echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; fi - '') + '' (lib.concatMapStringsSep "\n" ( { fileToCheckFor, nixPackage }: lib.optionalString (fileToCheckFor != null) '' diff --git a/pkgs/development/compilers/ghc/9.6.3-binary.nix b/pkgs/development/compilers/ghc/9.6.3-binary.nix index e2444aac54fa..2ca353f8ee21 100644 --- a/pkgs/development/compilers/ghc/9.6.3-binary.nix +++ b/pkgs/development/compilers/ghc/9.6.3-binary.nix @@ -237,13 +237,13 @@ stdenv.mkDerivation { buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in lib.concatStringsSep "\n" [ - ('' + '' shopt -u nullglob echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" if ! test -e ${buildExeGlob}; then echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; fi - '') + '' (lib.concatMapStringsSep "\n" ( { fileToCheckFor, nixPackage }: lib.optionalString (fileToCheckFor != null) '' diff --git a/pkgs/development/compilers/ghc/9.8.4-binary.nix b/pkgs/development/compilers/ghc/9.8.4-binary.nix index e281377503cd..df3f507f33d8 100644 --- a/pkgs/development/compilers/ghc/9.8.4-binary.nix +++ b/pkgs/development/compilers/ghc/9.8.4-binary.nix @@ -251,13 +251,13 @@ stdenv.mkDerivation { buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in lib.concatStringsSep "\n" [ - ('' + '' shopt -u nullglob echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" if ! test -e ${buildExeGlob}; then echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; fi - '') + '' (lib.concatMapStringsSep "\n" ( { fileToCheckFor, nixPackage }: lib.optionalString (fileToCheckFor != null) '' diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 31d03aad160c..114999da79b3 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -661,7 +661,7 @@ stdenv.mkDerivation ( "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" ] - ++ lib.optionals (disableLargeAddressSpace) [ + ++ lib.optionals disableLargeAddressSpace [ "--disable-large-address-space" ] ++ lib.optionals enableDwarf [ diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix index b46da57cba04..1dbf759259be 100644 --- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix +++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix @@ -514,7 +514,7 @@ stdenv.mkDerivation ( "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" ] - ++ lib.optionals (disableLargeAddressSpace) [ + ++ lib.optionals disableLargeAddressSpace [ "--disable-large-address-space" ] ++ lib.optionals enableNuma [ diff --git a/pkgs/development/compilers/llvm/common/bolt/default.nix b/pkgs/development/compilers/llvm/common/bolt/default.nix index 3172d665adf1..e36d2f143dde 100644 --- a/pkgs/development/compilers/llvm/common/bolt/default.nix +++ b/pkgs/development/compilers/llvm/common/bolt/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { inherit version; # Blank llvm dir just so relative path works - src = runCommand "bolt-src-${finalAttrs.version}" { inherit (monorepoSrc) passthru; } ('' + src = runCommand "bolt-src-${finalAttrs.version}" { inherit (monorepoSrc) passthru; } '' mkdir $out cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/${finalAttrs.pname} "$out" @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { # BOLT re-runs tablegen against LLVM sources, so needs them available. cp -r ${monorepoSrc}/llvm/ "$out" chmod -R +w $out/llvm - ''); + ''; sourceRoot = "${finalAttrs.src.name}/bolt"; diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index 8950500ba1df..9005a9627346 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -31,12 +31,12 @@ stdenv.mkDerivation ( src = if monorepoSrc != null then - runCommand "clang-src-${version}" { inherit (monorepoSrc) passthru; } ('' + runCommand "clang-src-${version}" { inherit (monorepoSrc) passthru; } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/clang "$out" ${lib.optionalString enableClangToolsExtra "cp -r ${monorepoSrc}/clang-tools-extra \"$out\""} - '') + '' else src; diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 9e67b2bff8e9..8ed41c6f7937 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -47,7 +47,7 @@ let in stdenv.mkDerivation (finalAttrs: { - pname = "compiler-rt${lib.optionalString (haveLibc) "-libc"}"; + pname = "compiler-rt${lib.optionalString haveLibc "-libc"}"; inherit version; src = @@ -135,7 +135,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "COMPILER_RT_BUILD_SANITIZERS" true) (lib.cmakeBool "COMPILER_RT_BUILD_PROFILE" true) ] - ++ lib.optionals (noSanitizers) [ + ++ lib.optionals noSanitizers [ (lib.cmakeBool "COMPILER_RT_BUILD_SANITIZERS" false) ] ++ lib.optionals ((useLLVM && !haveLibcxx) || !haveLibc || bareMetal || isMusl || isDarwinStatic) [ @@ -156,12 +156,12 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (!haveLibc) [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-nodefaultlibs") ] - ++ lib.optionals (useLLVM) [ + ++ lib.optionals useLLVM [ (lib.cmakeBool "COMPILER_RT_BUILD_BUILTINS" true) #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program (lib.cmakeFeature "CMAKE_TRY_COMPILE_TARGET_TYPE" "STATIC_LIBRARY") ] - ++ lib.optionals (bareMetal) [ + ++ lib.optionals bareMetal [ (lib.cmakeFeature "COMPILER_RT_OS_DIR" "baremetal") ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) ( diff --git a/pkgs/development/compilers/llvm/common/libclc/default.nix b/pkgs/development/compilers/llvm/common/libclc/default.nix index d58602733c4b..f1ae54c0a9a5 100644 --- a/pkgs/development/compilers/llvm/common/libclc/default.nix +++ b/pkgs/development/compilers/llvm/common/libclc/default.nix @@ -30,11 +30,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "libclc"; inherit version; - src = runCommand "libclc-src-${version}" { inherit (monorepoSrc) passthru; } ('' + src = runCommand "libclc-src-${version}" { inherit (monorepoSrc) passthru; } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/libclc "$out" - ''); + ''; sourceRoot = "${finalAttrs.src.name}/libclc"; diff --git a/pkgs/development/compilers/llvm/common/lld/default.nix b/pkgs/development/compilers/llvm/common/lld/default.nix index 13ed24cdc701..e9c0ee543437 100644 --- a/pkgs/development/compilers/llvm/common/lld/default.nix +++ b/pkgs/development/compilers/llvm/common/lld/default.nix @@ -22,14 +22,14 @@ stdenv.mkDerivation (finalAttrs: { src = if monorepoSrc != null then - runCommand "lld-src-${version}" { inherit (monorepoSrc) passthru; } ('' + runCommand "lld-src-${version}" { inherit (monorepoSrc) passthru; } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/lld "$out" mkdir -p "$out/libunwind" cp -r ${monorepoSrc}/libunwind/include "$out/libunwind" mkdir -p "$out/llvm" - '') + '' else src; diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index ab080daa1d1a..ceb7b35688de 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -299,7 +299,7 @@ stdenv.mkDerivation ( ) + # dup of above patch with different conditions - optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) ( + optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) # fails when run in sandbox ( '' @@ -346,7 +346,7 @@ stdenv.mkDerivation ( rm test/tools/dsymutil/ARM/obfuscated.test '' ) - ) + + # FileSystem permissions tests fail with various special bits '' diff --git a/pkgs/development/compilers/llvm/common/mlir/default.nix b/pkgs/development/compilers/llvm/common/mlir/default.nix index e6cb4a415d99..3d39c9a25d72 100644 --- a/pkgs/development/compilers/llvm/common/mlir/default.nix +++ b/pkgs/development/compilers/llvm/common/mlir/default.nix @@ -25,14 +25,14 @@ stdenv.mkDerivation (finalAttrs: { && (!stdenv.hostPlatform.isMusl); # Blank llvm dir just so relative path works - src = runCommand "${finalAttrs.pname}-src-${version}" { inherit (monorepoSrc) passthru; } ('' + src = runCommand "${finalAttrs.pname}-src-${version}" { inherit (monorepoSrc) passthru; } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/mlir "$out" cp -r ${monorepoSrc}/third-party "$out/third-party" mkdir -p "$out/llvm" - ''); + ''; sourceRoot = "${finalAttrs.src.name}/mlir"; diff --git a/pkgs/development/compilers/llvm/common/openmp/default.nix b/pkgs/development/compilers/llvm/common/openmp/default.nix index ad4b485085ff..322031df1938 100644 --- a/pkgs/development/compilers/llvm/common/openmp/default.nix +++ b/pkgs/development/compilers/llvm/common/openmp/default.nix @@ -31,11 +31,11 @@ stdenv.mkDerivation (finalAttrs: { src = if monorepoSrc != null then - runCommand "openmp-src-${version}" { inherit (monorepoSrc) passthru; } ('' + runCommand "openmp-src-${version}" { inherit (monorepoSrc) passthru; } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/openmp "$out" - '') + '' else src; diff --git a/pkgs/development/compilers/llvm/common/tblgen.nix b/pkgs/development/compilers/llvm/common/tblgen.nix index 0fa2f6269d6d..5153ad54764b 100644 --- a/pkgs/development/compilers/llvm/common/tblgen.nix +++ b/pkgs/development/compilers/llvm/common/tblgen.nix @@ -38,7 +38,7 @@ let src' = if monorepoSrc != null then - runCommand "${pname}-src-${version}" { } ('' + runCommand "${pname}-src-${version}" { } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/third-party "$out" @@ -46,7 +46,7 @@ let cp -r ${monorepoSrc}/clang "$out" cp -r ${monorepoSrc}/clang-tools-extra "$out" cp -r ${monorepoSrc}/mlir "$out" - '') + '' else src; diff --git a/pkgs/development/compilers/open-watcom/wrapper.nix b/pkgs/development/compilers/open-watcom/wrapper.nix index fe29ac1af820..54b06d7db4fb 100644 --- a/pkgs/development/compilers/open-watcom/wrapper.nix +++ b/pkgs/development/compilers/open-watcom/wrapper.nix @@ -33,7 +33,7 @@ let "${archToBindir}nt" (lib.optionalString is32bit "${archToBindir}w") ] - else if (isDarwin) then + else if isDarwin then [ (lib.optionalString is64bit "${archToBindir}o64") # modern Darwin cannot execute 32-bit code anymore diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index af5782407cbe..460c99ef5e17 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -92,7 +92,7 @@ in buildRustPackages = (selectRustPackage pkgsBuildHost).packages.stable; # Analogous to stdenv rustPlatform = makeRustPlatform self.buildRustPackages; - rustc-unwrapped = self.callPackage ./rustc.nix ({ + rustc-unwrapped = self.callPackage ./rustc.nix { version = rustcVersion; sha256 = rustcSha256; inherit enableRustcDev; @@ -109,7 +109,7 @@ in # Use boot package set to break cycle inherit (bootstrapRustPackages) cargo rustc rustfmt; - }); + }; rustc = wrapRustcWith { inherit (self) rustc-unwrapped; sysroot = if fastCross then self.rustc-unwrapped else null; diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 586657b523f4..44a65fdc2588 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -91,7 +91,7 @@ let libiconv libintl ] - ++ lib.optional (withGraphviz) graphviz + ++ lib.optional withGraphviz graphviz ++ extraBuildInputs; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/yosys/plugins/symbiflow.nix b/pkgs/development/compilers/yosys/plugins/symbiflow.nix index 82ff16fe5ed4..4b6a8c3ecbd6 100644 --- a/pkgs/development/compilers/yosys/plugins/symbiflow.nix +++ b/pkgs/development/compilers/yosys/plugins/symbiflow.nix @@ -46,7 +46,7 @@ let in lib.genAttrs plugins ( plugin: - stdenv.mkDerivation (rec { + stdenv.mkDerivation rec { pname = "yosys-symbiflow-${plugin}-plugin"; inherit src version plugin; enableParallelBuilding = true; @@ -109,5 +109,5 @@ lib.genAttrs plugins ( thoughtpolice ]; }; - }) + } ) diff --git a/pkgs/development/coq-modules/ExtLib/default.nix b/pkgs/development/coq-modules/ExtLib/default.nix index a87b41b6078a..ecfb3f683956 100644 --- a/pkgs/development/coq-modules/ExtLib/default.nix +++ b/pkgs/development/coq-modules/ExtLib/default.nix @@ -20,9 +20,9 @@ mkCoqDerivation { (case (range "8.8" "8.16") "0.11.6") (case (range "8.8" "8.14") "0.11.4") (case (range "8.8" "8.13") "0.11.3") - (case ("8.7") "0.9.7") - (case ("8.6") "0.9.5") - (case ("8.5") "0.9.4") + (case "8.7" "0.9.7") + (case "8.6" "0.9.5") + (case "8.5" "0.9.4") ] null; release."0.13.0".sha256 = "sha256-vqVSu+nyGjRVXe2tnE6MPl0kcg4LHfgFwRCpTQAP/is="; release."0.12.2".sha256 = "sha256-lSTlbpkSuAY6B9cqofXSlDk2VchtqfZpRQ0+y/BAbEY="; diff --git a/pkgs/development/coq-modules/mathcomp-analysis/default.nix b/pkgs/development/coq-modules/mathcomp-analysis/default.nix index 1fe217d0b9ed..436932fdff9e 100644 --- a/pkgs/development/coq-modules/mathcomp-analysis/default.nix +++ b/pkgs/development/coq-modules/mathcomp-analysis/default.nix @@ -126,7 +126,7 @@ let } ] package; pname = if package == "single" then "mathcomp-analysis-single" else "mathcomp-${package}"; - derivation = mkCoqDerivation ({ + derivation = mkCoqDerivation { inherit version pname @@ -172,7 +172,7 @@ let }; passthru = lib.mapAttrs (package: deps: mathcomp_ package) packages; - }); + }; # split packages didn't exist before 0.6, so building nothing in that case patched-derivation1 = derivation.overrideAttrs ( o: diff --git a/pkgs/development/coq-modules/metarocq/default.nix b/pkgs/development/coq-modules/metarocq/default.nix index d565c312ae33..6f7ac6b11b44 100644 --- a/pkgs/development/coq-modules/metarocq/default.nix +++ b/pkgs/development/coq-modules/metarocq/default.nix @@ -15,7 +15,7 @@ let case = case: out: { inherit case out; }; in lib.switch coq.coq-version [ - (case ("9.0") "1.4-9.0") + (case "9.0" "1.4-9.0") ] null; release = { "1.4-9.0".sha256 = "sha256-5QecDAMkvgfDPZ7/jDfnOgcE+Eb1LTAozP7nz6nkuxg="; diff --git a/pkgs/development/coq-modules/validsdp/default.nix b/pkgs/development/coq-modules/validsdp/default.nix index b4ba02a076bc..3668b2a393ee 100644 --- a/pkgs/development/coq-modules/validsdp/default.nix +++ b/pkgs/development/coq-modules/validsdp/default.nix @@ -81,7 +81,7 @@ let ] package; pname = package; - derivation = mkCoqDerivation ({ + derivation = mkCoqDerivation { inherit version pname @@ -113,7 +113,7 @@ let }; passthru = lib.mapAttrs (package: deps: validsdp_ package) packages; - }); + }; in derivation; in diff --git a/pkgs/development/coq-modules/vscoq-language-server/default.nix b/pkgs/development/coq-modules/vscoq-language-server/default.nix index e5d71da4b0dc..0812d1d950ae 100644 --- a/pkgs/development/coq-modules/vscoq-language-server/default.nix +++ b/pkgs/development/coq-modules/vscoq-language-server/default.nix @@ -26,7 +26,7 @@ let owner = "coq-community"; repo = "vscoq"; }; - fetch = metaFetch ({ + fetch = metaFetch { release."2.0.3+coq8.18".sha256 = "sha256-VXhHCP6Ni5/OcsgoI1EbJfYCpXzwkuR8kbbKrl6dfjU="; release."2.0.3+coq8.18".rev = "v2.0.3+coq8.18"; release."2.1.2".rev = "v2.1.2"; @@ -42,7 +42,7 @@ let release."2.2.6".rev = "v2.2.6"; release."2.2.6".sha256 = "sha256-J8nRTAwN6GBEYgqlXa2kkkrHPatXsSObQg9QUQoZhgE="; inherit location; - }); + }; fetched = fetch (if version != null then version else defaultVersion); in ocamlPackages.buildDunePackage { diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 88fe314bdffc..bfe4b607b034 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1866,11 +1866,11 @@ builtins.intersectAttrs super { ]) ) ( - super.libtorch-ffi.override ({ + super.libtorch-ffi.override { c10 = pkgs.libtorch-bin; torch = pkgs.libtorch-bin; torch_cpu = pkgs.libtorch-bin; - }) + } ); # Upper bounds of text and bytestring too strict: https://github.com/zsedem/haskell-cpython/pull/24 diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 3e2a55d76c15..276b33c0defc 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -119,10 +119,10 @@ rec { patches = lib.optional stdenv.hostPlatform.isDarwin ./5.4.darwin.patch; }; - lua5_4_compat = lua5_4.override ({ + lua5_4_compat = lua5_4.override { self = lua5_4_compat; compat = true; - }); + }; lua5_3 = callPackage ./interpreter.nix { self = lua5_3; @@ -134,10 +134,10 @@ rec { patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./5.2.darwin.patch ]; }; - lua5_3_compat = lua5_3.override ({ + lua5_3_compat = lua5_3.override { self = lua5_3_compat; compat = true; - }); + }; lua5_2 = callPackage ./interpreter.nix { self = lua5_2; @@ -151,10 +151,10 @@ rec { ++ lib.optional stdenv.hostPlatform.isDarwin ./5.2.darwin.patch; }; - lua5_2_compat = lua5_2.override ({ + lua5_2_compat = lua5_2.override { self = lua5_2_compat; compat = true; - }); + }; lua5_1 = callPackage ./interpreter.nix { self = lua5_1; diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index e0f3084084b0..71421c6e5eea 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -144,7 +144,7 @@ stdenv.mkDerivation (finalAttrs: { libsForQt5.qtsvg libsForQt5.qscintilla ] - ++ lib.optionals (enableJava) [ + ++ lib.optionals enableJava [ jdk ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ diff --git a/pkgs/development/interpreters/php/8.2.nix b/pkgs/development/interpreters/php/8.2.nix index 63f25b21ba66..6e33b3ba3c60 100644 --- a/pkgs/development/interpreters/php/8.2.nix +++ b/pkgs/development/interpreters/php/8.2.nix @@ -12,7 +12,7 @@ in base.withExtensions ( { all, ... }: with all; - ([ + [ bcmath calendar curl @@ -55,5 +55,5 @@ base.withExtensions ( xmlwriter zip zlib - ]) + ] ) diff --git a/pkgs/development/interpreters/php/8.3.nix b/pkgs/development/interpreters/php/8.3.nix index 2dcebdc9e65b..fe25d10dc5de 100644 --- a/pkgs/development/interpreters/php/8.3.nix +++ b/pkgs/development/interpreters/php/8.3.nix @@ -12,7 +12,7 @@ in base.withExtensions ( { all, ... }: with all; - ([ + [ bcmath calendar curl @@ -55,5 +55,5 @@ base.withExtensions ( xmlwriter zip zlib - ]) + ] ) diff --git a/pkgs/development/interpreters/python/meta-package.nix b/pkgs/development/interpreters/python/meta-package.nix index 2e25dff85fe0..e3d868433183 100644 --- a/pkgs/development/interpreters/python/meta-package.nix +++ b/pkgs/development/interpreters/python/meta-package.nix @@ -38,11 +38,11 @@ buildPythonPackage { [project.optional-dependencies] ${lib.optionalString (optional-dependencies != { }) ( - (lib.concatStringsSep "\n" ( + lib.concatStringsSep "\n" ( lib.mapAttrsToList ( group: deps: group + " = " + builtins.toJSON (map lib.getName deps) ) optional-dependencies - )) + ) )} [tool.hatch.build.targets.wheel] diff --git a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix index caaed105da48..b27d3e92eb24 100644 --- a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix @@ -171,7 +171,7 @@ let checkDrv = drv: if (isPythonModule drv) && (isMismatchedPython drv) then throwMismatch drv else drv; in - inputs: map (checkDrv) inputs; + inputs: map checkDrv inputs; # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. self = toPythonModule ( @@ -212,7 +212,7 @@ let setuptoolsBuildHook ] ++ lib.optionals (format == "pyproject") [ - (pipBuildHook) + pipBuildHook ] ++ lib.optionals (format == "wheel") [ wheelUnpackHook @@ -223,7 +223,7 @@ let eggInstallHook ] ++ lib.optionals (format != "other") [ - (pipInstallHook) + pipInstallHook ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ # This is a test, however, it should be ran independent of the checkPhase and checkInputs diff --git a/pkgs/development/libraries/agda/iowa-stdlib/default.nix b/pkgs/development/libraries/agda/iowa-stdlib/default.nix index 55505f0edf42..b1673faa74ba 100644 --- a/pkgs/development/libraries/agda/iowa-stdlib/default.nix +++ b/pkgs/development/libraries/agda/iowa-stdlib/default.nix @@ -4,7 +4,7 @@ fetchFromGitHub, }: -mkDerivation (rec { +mkDerivation rec { version = "1.5.0"; pname = "iowa-stdlib"; @@ -35,4 +35,4 @@ mkDerivation (rec { turion ]; }; -}) +} diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix index ff6205b5a410..8507b65d274e 100644 --- a/pkgs/development/libraries/gcr/default.nix +++ b/pkgs/development/libraries/gcr/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { libsecret openssh ] - ++ lib.optionals (systemdSupport) [ + ++ lib.optionals systemdSupport [ systemd ]; diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix index 0f5380d93177..7b63b2241439 100644 --- a/pkgs/development/libraries/kerberos/heimdal.nix +++ b/pkgs/development/libraries/kerberos/heimdal.nix @@ -77,12 +77,12 @@ stdenv.mkDerivation { libedit pam ] - ++ lib.optionals (withCJSON) [ cjson ] - ++ lib.optionals (withCapNG) [ libcap_ng ] - ++ lib.optionals (withMicroHTTPD) [ libmicrohttpd ] - ++ lib.optionals (withOpenLDAP) [ openldap ] - ++ lib.optionals (withOpenSSL) [ openssl ] - ++ lib.optionals (withSQLite3) [ sqlite ]; + ++ lib.optionals withCJSON [ cjson ] + ++ lib.optionals withCapNG [ libcap_ng ] + ++ lib.optionals withMicroHTTPD [ libmicrohttpd ] + ++ lib.optionals withOpenLDAP [ openldap ] + ++ lib.optionals withOpenSSL [ openssl ] + ++ lib.optionals withSQLite3 [ sqlite ]; doCheck = true; nativeCheckInputs = [ @@ -103,19 +103,19 @@ stdenv.mkDerivation { "--without-x" "--disable-afs-string-to-key" ] - ++ lib.optionals (withCapNG) [ + ++ lib.optionals withCapNG [ "--with-capng" ] - ++ lib.optionals (withCJSON) [ + ++ lib.optionals withCJSON [ "--with-cjson=${cjson}" ] - ++ lib.optionals (withOpenLDAP) [ + ++ lib.optionals withOpenLDAP [ "--with-openldap=${openldap.dev}" ] - ++ lib.optionals (withOpenLDAPAsHDBModule) [ + ++ lib.optionals withOpenLDAPAsHDBModule [ "--enable-hdb-openldap-module" ] - ++ lib.optionals (withSQLite3) [ + ++ lib.optionals withSQLite3 [ "--with-sqlite3=${sqlite.dev}" ]; diff --git a/pkgs/development/libraries/libmicrohttpd/0.9.77.nix b/pkgs/development/libraries/libmicrohttpd/0.9.77.nix index 9099de95bd82..3874f77acb87 100644 --- a/pkgs/development/libraries/libmicrohttpd/0.9.77.nix +++ b/pkgs/development/libraries/libmicrohttpd/0.9.77.nix @@ -1,10 +1,10 @@ { callPackage, fetchurl }: -callPackage ./generic.nix (rec { +callPackage ./generic.nix rec { version = "0.9.77"; src = fetchurl { url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz"; hash = "sha256-nnAjoVESAGDSgGpupME8qZM+zk6s/FyUZNIO3dt2sKA="; }; -}) +} diff --git a/pkgs/development/libraries/libmicrohttpd/1.0.nix b/pkgs/development/libraries/libmicrohttpd/1.0.nix index 944749f281c0..8070e78356c7 100644 --- a/pkgs/development/libraries/libmicrohttpd/1.0.nix +++ b/pkgs/development/libraries/libmicrohttpd/1.0.nix @@ -1,10 +1,10 @@ { callPackage, fetchurl }: -callPackage ./generic.nix (rec { +callPackage ./generic.nix rec { version = "1.0.2"; src = fetchurl { url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz"; hash = "sha256-3zJPzQg0F12rB0gxM5Atl3SmBb+imAJfaYgyiP0gqMc="; }; -}) +} diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 574c77f51644..4d3c68b6e8e0 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -632,7 +632,7 @@ effectiveStdenv.mkDerivation { inherit opencv4; }; } - // optionalAttrs (enableCuda) { + // optionalAttrs enableCuda { no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv4"; }; }; } diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 189562011d78..57f77518ed55 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -156,7 +156,7 @@ stdenv.mkDerivation ( ++ lib.optional stdenv.hostPlatform.isDarwin darwinVersionInputs ++ lib.optional developerBuild gdb ++ lib.optional (cups != null) cups - ++ lib.optional (mysqlSupport) libmysqlclient + ++ lib.optional mysqlSupport libmysqlclient ++ lib.optional (libpq != null) libpq; nativeBuildInputs = [ @@ -168,7 +168,7 @@ stdenv.mkDerivation ( pkg-config which ] - ++ lib.optionals (mysqlSupport) [ libmysqlclient ] + ++ lib.optionals mysqlSupport [ libmysqlclient ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; } @@ -339,11 +339,11 @@ stdenv.mkDerivation ( ); } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { - NIX_CFLAGS_COMPILE_FOR_BUILD = toString ([ + NIX_CFLAGS_COMPILE_FOR_BUILD = toString [ "-Wno-warn=free-nonheap-object" "-Wno-free-nonheap-object" "-w" - ]); + ]; }; prefixKey = "-prefix "; @@ -493,7 +493,7 @@ stdenv.mkDerivation ( "-I" "${cups.dev}/include" ] - ++ lib.optionals (mysqlSupport) [ + ++ lib.optionals mysqlSupport [ "-L" "${libmysqlclient}/lib" "-I" diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 9f3f7785efba..c47eda9636ee 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -267,14 +267,14 @@ qtModule ( sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc '' - + lib.optionalString stdenv.hostPlatform.isDarwin ('' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/buildtools/config/mac_osx.pri \ --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' # Use system ffmpeg echo "gn_args += use_system_ffmpeg=true" >> src/core/config/mac_osx.pri echo "LIBS += -lavformat -lavcodec -lavutil" >> src/core/core_common.pri - '') + '' + postPatch; env = { diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index bfab871bc314..e24c2c825240 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -28,10 +28,10 @@ let addPackages = self: let - callPackage = self.newScope ({ + callPackage = self.newScope { inherit (self) qtModule; inherit srcs python3 stdenv; - }); + }; # Per . # This should reflect the highest “Build Environment” and the diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index dee529b4047e..c0b710f89700 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -203,7 +203,7 @@ in ''; }); - grug-far-nvim = prev.grug-far-nvim.overrideAttrs ({ + grug-far-nvim = prev.grug-far-nvim.overrideAttrs { doCheck = lua.luaversion == "5.1" && !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ final.busted @@ -235,7 +235,7 @@ in runHook postCheck ''; - }); + }; http = prev.http.overrideAttrs (oa: { /* @@ -931,7 +931,7 @@ in lua, luaposix, }: - buildLuarocksPackage ({ + buildLuarocksPackage { pname = "readline"; version = "3.2-0"; knownRockspec = @@ -966,7 +966,7 @@ in license.fullName = "MIT/X11"; broken = (luaOlder "5.1") || (luaAtLeast "5.5"); }; - }) + } ) { }; rocks-dev-nvim = prev.rocks-dev-nvim.overrideAttrs (oa: { diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index 5c5eeb0dc915..237308239be9 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -33,7 +33,7 @@ let in let - fetched = coqPackages.metaFetch ({ + fetched = coqPackages.metaFetch { release."3.3.0".sha256 = "sha256:963f95eea48b8f853cca9cbe4db49f22343c58e88dc961bc1da303356ef50dcd"; release."3.0.1".sha256 = "sha256-r4B0xn6UCVslVW4dHiqq8NBMGfNz44kZy48KDWeGquc="; release."2.0.7".sha256 = "sha256-gCM+vZK6vWlhSO1VMjiWHse23mvxVwRarhxwkIQK7e0="; @@ -57,7 +57,7 @@ let owner = "LPCIC"; repo = "elpi"; }; - }) version; + } version; in let inherit (fetched) version; diff --git a/pkgs/development/ocaml-modules/junit/default.nix b/pkgs/development/ocaml-modules/junit/default.nix index 0477e3d46a79..234afebf9f6b 100644 --- a/pkgs/development/ocaml-modules/junit/default.nix +++ b/pkgs/development/ocaml-modules/junit/default.nix @@ -6,7 +6,7 @@ tyxml, }: -buildDunePackage (rec { +buildDunePackage rec { pname = "junit"; version = "2.3.0"; @@ -28,4 +28,4 @@ buildDunePackage (rec { maintainers = [ ]; homepage = "https://github.com/Khady/ocaml-junit"; }; -}) +} diff --git a/pkgs/development/ocaml-modules/junit/ounit.nix b/pkgs/development/ocaml-modules/junit/ounit.nix index 6e4b79eea272..9704183c6e22 100644 --- a/pkgs/development/ocaml-modules/junit/ounit.nix +++ b/pkgs/development/ocaml-modules/junit/ounit.nix @@ -4,7 +4,7 @@ ounit2, }: -buildDunePackage ({ +buildDunePackage { pname = "junit_ounit"; inherit (junit) src version meta; @@ -15,4 +15,4 @@ buildDunePackage ({ ]; doCheck = true; -}) +} diff --git a/pkgs/development/ocaml-modules/menhir/lib.nix b/pkgs/development/ocaml-modules/menhir/lib.nix index f83bebbcc623..01d76971a2db 100644 --- a/pkgs/development/ocaml-modules/menhir/lib.nix +++ b/pkgs/development/ocaml-modules/menhir/lib.nix @@ -7,7 +7,7 @@ }: let - fetched = coqPackages.metaFetch ({ + fetched = coqPackages.metaFetch { release."20231231".sha256 = "sha256-veB0ORHp6jdRwCyDDAfc7a7ov8sOeHUmiELdOFf/QYk="; release."20240715".sha256 = "sha256-9CSxAIm0aEXkwF+aj8u/bqLG30y5eDNz65EnohJPjzI="; release."20250903".sha256 = "sha256-ap1OvcvCAuqmFDwhPwMBosHs3cm5NxPW/w1J8AzWduk="; @@ -17,7 +17,7 @@ let owner = "fpottier"; repo = "menhir"; }; - }) version; + } version; in buildDunePackage { pname = "menhirLib"; diff --git a/pkgs/development/python-modules/beaker/default.nix b/pkgs/development/python-modules/beaker/default.nix index 96ac8fb3c6e9..aad6383f249e 100644 --- a/pkgs/development/python-modules/beaker/default.nix +++ b/pkgs/development/python-modules/beaker/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { pycrypto cryptography ] - ++ lib.optionals (isPy27) [ + ++ lib.optionals isPy27 [ funcsigs pycryptopp ]; diff --git a/pkgs/development/python-modules/cfscrape/default.nix b/pkgs/development/python-modules/cfscrape/default.nix index c5fba3baf917..9dd60bed9769 100644 --- a/pkgs/development/python-modules/cfscrape/default.nix +++ b/pkgs/development/python-modules/cfscrape/default.nix @@ -9,12 +9,12 @@ buildPythonPackage { pname = "cfscrape"; version = "2.1.1"; format = "setuptools"; - src = fetchFromGitHub ({ + src = fetchFromGitHub { owner = "Anorov"; repo = "cloudflare-scrape"; rev = "9692fe7ff3c17b76ddf0f4d50d3dba7d1791c9c6"; hash = "sha256-uO8lBZonjk+mlFYoNSaz+GIN/W9yf8VL9OQ7MKfsMgI="; - }); + }; propagatedBuildInputs = [ requests ]; diff --git a/pkgs/development/python-modules/manim/default.nix b/pkgs/development/python-modules/manim/default.nix index aa2dc068aa49..67d820774f35 100644 --- a/pkgs/development/python-modules/manim/default.nix +++ b/pkgs/development/python-modules/manim/default.nix @@ -184,7 +184,7 @@ let ] ); # https://github.com/ManimCommunity/manim/pull/4037 - av_13_1 = av.overridePythonAttrs (rec { + av_13_1 = av.overridePythonAttrs rec { version = "13.1.0"; src = fetchFromGitHub { owner = "PyAV-Org"; @@ -192,7 +192,7 @@ let tag = "v${version}"; hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60="; }; - }); + }; in buildPythonPackage rec { pname = "manim"; diff --git a/pkgs/development/python-modules/pexpect/default.nix b/pkgs/development/python-modules/pexpect/default.nix index 0371859c5066..cb34296f7f79 100644 --- a/pkgs/development/python-modules/pexpect/default.nix +++ b/pkgs/development/python-modules/pexpect/default.nix @@ -9,7 +9,7 @@ sage, }: -buildPythonPackage (rec { +buildPythonPackage rec { pname = "pexpect"; version = "4.9.0"; pyproject = true; @@ -53,4 +53,4 @@ buildPythonPackage (rec { any platform that supports the standard Python pty module. ''; }; -}) +} diff --git a/pkgs/development/python-modules/pyscreenshot/default.nix b/pkgs/development/python-modules/pyscreenshot/default.nix index c45b97c2c018..846b267290cc 100644 --- a/pkgs/development/python-modules/pyscreenshot/default.nix +++ b/pkgs/development/python-modules/pyscreenshot/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { entrypoint2 pillow ] - ++ lib.optionals (isPy3k) [ + ++ lib.optionals isPy3k [ jeepney mss ]; diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index d4d34101e7cb..02b6b29de9c7 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -43,9 +43,9 @@ buildPythonPackage rec { scikit-learn scipy ] - ++ lib.optionals (withCvx) [ cvxpy ] - ++ lib.optionals (withVisualization) [ matplotlib ] - ++ lib.optionals (withJit) [ numba ]; + ++ lib.optionals withCvx [ cvxpy ] + ++ lib.optionals withVisualization [ matplotlib ] + ++ lib.optionals withJit [ numba ]; # Tests pythonImportsCheck = [ "qiskit.ignis" ]; diff --git a/pkgs/development/python-modules/sure/default.nix b/pkgs/development/python-modules/sure/default.nix index 8185fdc7676c..8306a1a96a8f 100644 --- a/pkgs/development/python-modules/sure/default.nix +++ b/pkgs/development/python-modules/sure/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { "tests/test_old_api.py" # require nose ]; - disabledTests = lib.optionals (isPyPy) [ + disabledTests = lib.optionals isPyPy [ # test extension of 'dict' object is broken "test_should_compare_dict_with_non_orderable_key_types" "test_should_compare_dict_with_enum_keys" diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 85055efe84e3..78c6a6bdf152 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -498,7 +498,7 @@ let # workaround for https://github.com/bazelbuild/bazel/issues/15359 "--spawn_strategy=sandboxed" ] - ++ lib.optionals (mklSupport) [ "--config=mkl" ]; + ++ lib.optionals mklSupport [ "--config=mkl" ]; bazelTargets = [ "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow" diff --git a/pkgs/development/python-modules/torch/source/src.nix b/pkgs/development/python-modules/torch/source/src.nix index f617227f4a6e..99d3d5561004 100644 --- a/pkgs/development/python-modules/torch/source/src.nix +++ b/pkgs/development/python-modules/torch/source/src.nix @@ -5,7 +5,7 @@ runCommand, }: assert version == "2.8.0"; -(rec { +rec { src_asmjit = fetchFromGitHub { owner = "asmjit"; repo = "asmjit"; @@ -716,5 +716,6 @@ assert version == "2.8.0"; src_vcpkg_recursive = src_vcpkg; src_VulkanMemoryAllocator_recursive = src_VulkanMemoryAllocator; src_XNNPACK_recursive = src_XNNPACK; -}).src_pytorch_recursive +} +.src_pytorch_recursive # Update using: unroll-src [version] diff --git a/pkgs/development/python-modules/vivisect/default.nix b/pkgs/development/python-modules/vivisect/default.nix index af4060ef9238..1a80e837d892 100644 --- a/pkgs/development/python-modules/vivisect/default.nix +++ b/pkgs/development/python-modules/vivisect/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { msgpack pycparser ] - ++ lib.optionals (withGui) optional-dependencies.gui; + ++ lib.optionals withGui optional-dependencies.gui; optional-dependencies.gui = [ pyqt5 diff --git a/pkgs/development/python-modules/vllm/default.nix b/pkgs/development/python-modules/vllm/default.nix index 7e56b1796f59..4e0e58410621 100644 --- a/pkgs/development/python-modules/vllm/default.nix +++ b/pkgs/development/python-modules/vllm/default.nix @@ -167,7 +167,7 @@ let rm -rf csrc/cutlass ln -sf ${cutlass} csrc/cutlass '' - + lib.optionalString (rocmSupport) '' + + lib.optionalString rocmSupport '' rm -rf csrc/composable_kernel; ln -sf ${rocmPackages.composable_kernel} csrc/composable_kernel ''; diff --git a/pkgs/development/rocq-modules/rocq-elpi/default.nix b/pkgs/development/rocq-modules/rocq-elpi/default.nix index 66c07bce7d4f..dcc4e07cd68c 100644 --- a/pkgs/development/rocq-modules/rocq-elpi/default.nix +++ b/pkgs/development/rocq-modules/rocq-elpi/default.nix @@ -38,7 +38,7 @@ let lib.switch rocq-core.rocq-version [ (case (range "9.0" "9.1") "3.1.0") (case (range "9.0" "9.1") "2.6.0") - (case ("9.0") "2.5.2") + (case "9.0" "2.5.2") ] null; release."3.1.0".sha256 = "sha256-ytGPGwJv+jmRT6uN0sg6q+xh8ND0PMIZ9ULB0Uwca1w="; release."3.0.0".sha256 = "sha256-YMe2is7duGcvAHjM4joUE90EloibjSxqfZThsJhstdU="; diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix index 99e254291373..40a390ff5168 100644 --- a/pkgs/development/tools/ammonite/default.nix +++ b/pkgs/development/tools/ammonite/default.nix @@ -32,7 +32,7 @@ let install -Dm755 $src $out/bin/amm sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm '' - + lib.optionalString (disableRemoteLogging) '' + + lib.optionalString disableRemoteLogging '' sed -i "0,/ammonite.Main/{s|ammonite.Main'|ammonite.Main' --no-remote-logging|}" $out/bin/amm sed -i '1i #!/bin/sh' $out/bin/amm ''; diff --git a/pkgs/development/tools/continuous-integration/buildbot/worker.nix b/pkgs/development/tools/continuous-integration/buildbot/worker.nix index 67e45ff6f80d..8bb6910bfed7 100644 --- a/pkgs/development/tools/continuous-integration/buildbot/worker.nix +++ b/pkgs/development/tools/continuous-integration/buildbot/worker.nix @@ -21,7 +21,7 @@ nixosTests, }: -buildPythonPackage ({ +buildPythonPackage { pname = "buildbot_worker"; inherit (buildbot) src version; format = "setuptools"; @@ -58,4 +58,4 @@ buildPythonPackage ({ teams = [ teams.buildbot ]; license = licenses.gpl2; }; -}) +} diff --git a/pkgs/development/tools/godot/3/mono/glue.nix b/pkgs/development/tools/godot/3/mono/glue.nix index b8901d0e386b..e4dfc2a9fdd6 100644 --- a/pkgs/development/tools/godot/3/mono/glue.nix +++ b/pkgs/development/tools/godot/3/mono/glue.nix @@ -26,7 +26,7 @@ patches = base.patches - ++ map (rp: ./patches + rp) ([ + ++ map (rp: ./patches + rp) [ # When building godot mono, a "glue version" gets baked into it, and into the mono glue code # generated by it. Godot mono export templates are also get a glue version baked in. If you # export a godot mono project using an export template for which the glue version doesn't @@ -55,7 +55,7 @@ # For convenience, the accompanying update-glue-version.sh script automates this work. Run it by # passing the godot version as an argument, e.g. "3.5.2". "/gen_cs_glue_version.py/hardcodeGlueVersion_${self.version}.patch" - ]); + ]; outputs = [ "out" ]; diff --git a/pkgs/development/tools/godot/common.nix b/pkgs/development/tools/godot/common.nix index f1cd98a46ce7..bdd87b4a96b5 100644 --- a/pkgs/development/tools/godot/common.nix +++ b/pkgs/development/tools/godot/common.nix @@ -114,7 +114,7 @@ let version = dottedVersion; }; } - // lib.optionalAttrs (editor) ( + // lib.optionalAttrs editor ( let project-src = runCommand "${pkg.name}-project-src" @@ -337,7 +337,7 @@ let outputs = [ "out" ] - ++ lib.optional (editor) "man"; + ++ lib.optional editor "man"; separateDebugInfo = true; # Set the build name which is part of the version. In official downloads, this diff --git a/pkgs/development/tools/haskell/ihaskell/wrapper.nix b/pkgs/development/tools/haskell/ihaskell/wrapper.nix index 21984b6e8da4..02de6f6e1ab4 100644 --- a/pkgs/development/tools/haskell/ihaskell/wrapper.nix +++ b/pkgs/development/tools/haskell/ihaskell/wrapper.nix @@ -24,10 +24,10 @@ let #! ${stdenv.shell} export GHC_PACKAGE_PATH="$(${ihaskellEnv}/bin/ghc --print-global-package-db):$GHC_PACKAGE_PATH" export PATH="${ - lib.makeBinPath ([ + lib.makeBinPath [ ihaskellEnv jupyter - ]) + ] }''${PATH:+:}$PATH" ${ihaskellEnv}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) && ${jupyter}/bin/jupyter notebook ''; diff --git a/pkgs/development/web/nodejs/gyp-patches.nix b/pkgs/development/web/nodejs/gyp-patches.nix index d3939887e0fd..3dd60e8a7e85 100644 --- a/pkgs/development/web/nodejs/gyp-patches.nix +++ b/pkgs/development/web/nodejs/gyp-patches.nix @@ -13,7 +13,7 @@ let url = "https://github.com/nodejs/gyp-next/commit/8224deef984add7e7afe846cfb82c9d3fa6da1fb.patch?full_index=1"; url_regex_handling = "https://github.com/nodejs/gyp-next/commit/b21ee3150eea9fc1a8811e910e5ba64f42e1fb77.patch?full_index=1"; in -lib.optionals patch_tools_catch_oserror ([ +lib.optionals patch_tools_catch_oserror [ # Fixes builds with Nix sandbox on Darwin for gyp. (fetchpatch2 { inherit url; @@ -21,16 +21,16 @@ lib.optionals patch_tools_catch_oserror ([ stripLen = 1; extraPrefix = "tools/gyp/"; }) -]) -++ lib.optionals patch_npm_catch_oserror ([ +] +++ lib.optionals patch_npm_catch_oserror [ (fetchpatch2 { inherit url; hash = "sha256-cXTwmCRHrNhuY1+3cD/EvU0CJ+1Nk4TRh6c3twvfaW8="; stripLen = 1; extraPrefix = "deps/npm/node_modules/node-gyp/gyp/"; }) -]) -++ lib.optionals patch_tools_regex_handling ([ +] +++ lib.optionals patch_tools_regex_handling [ # Fixes builds with Nix sandbox on Darwin for gyp. (fetchpatch2 { url = url_regex_handling; @@ -38,16 +38,16 @@ lib.optionals patch_tools_catch_oserror ([ stripLen = 1; extraPrefix = "tools/gyp/"; }) -]) -++ lib.optionals patch_npm_regex_handling ([ +] +++ lib.optionals patch_npm_regex_handling [ (fetchpatch2 { url = url_regex_handling; hash = "sha256-fW5kQh+weCK0g3wzTJLZgAuXxetb14UAf6yxW6bIgbU="; stripLen = 1; extraPrefix = "deps/npm/node_modules/node-gyp/gyp/"; }) -]) +] # TODO: remove the Darwin conditionals from this file -++ lib.optionals stdenv.buildPlatform.isDarwin ([ +++ lib.optionals stdenv.buildPlatform.isDarwin [ ./gyp-patches-set-fallback-value-for-CLT-darwin.patch -]) +] diff --git a/pkgs/games/armagetronad/default.nix b/pkgs/games/armagetronad/default.nix index cd9dfe4916f0..c42be9aed44c 100644 --- a/pkgs/games/armagetronad/default.nix +++ b/pkgs/games/armagetronad/default.nix @@ -226,7 +226,7 @@ let ''; passthru = - if (dedicatedServer) then + if dedicatedServer then { # No passthru, end of the line. # https://www.youtube.com/watch?v=NOMa56y_Was diff --git a/pkgs/games/quake2/yquake2/wrapper.nix b/pkgs/games/quake2/yquake2/wrapper.nix index 6c2437d3286e..d174dcae1e7b 100644 --- a/pkgs/games/quake2/yquake2/wrapper.nix +++ b/pkgs/games/quake2/yquake2/wrapper.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { desktopItems = map ( game: - makeDesktopItem ({ + makeDesktopItem { name = game.id; exec = game.title; icon = "yamagi-quake2"; @@ -59,7 +59,7 @@ stdenv.mkDerivation { "Game" "Shooter" ]; - }) + } ) games; meta = { diff --git a/pkgs/misc/documentation-highlighter/default.nix b/pkgs/misc/documentation-highlighter/default.nix index fb9ddb8589f3..dd17c353d115 100644 --- a/pkgs/misc/documentation-highlighter/default.nix +++ b/pkgs/misc/documentation-highlighter/default.nix @@ -12,13 +12,13 @@ runCommand "documentation-highlighter" src = ./.; filter = path: type: - lib.elem (baseNameOf path) ([ + lib.elem (baseNameOf path) [ "highlight.pack.js" "LICENSE" "loader.js" "mono-blue.css" "README.md" - ]); + ]; }; } '' diff --git a/pkgs/misc/logging/beats/7.x.nix b/pkgs/misc/logging/beats/7.x.nix index d509cb443db6..660349b1ac00 100644 --- a/pkgs/misc/logging/beats/7.x.nix +++ b/pkgs/misc/logging/beats/7.x.nix @@ -13,7 +13,7 @@ let beat = package: extraArgs: buildGoModule ( - lib.attrsets.recursiveUpdate (rec { + lib.attrsets.recursiveUpdate rec { pname = package; version = elk7Version; @@ -38,7 +38,7 @@ let ]; platforms = platforms.linux; }; - }) extraArgs + } extraArgs ); in rec { diff --git a/pkgs/misc/optee-os/default.nix b/pkgs/misc/optee-os/default.nix index e70727b7aac9..dca4d6000019 100644 --- a/pkgs/misc/optee-os/default.nix +++ b/pkgs/misc/optee-os/default.nix @@ -74,11 +74,11 @@ let "PLATFORM=${platform}" "CFG_USER_TA_TARGETS=${taTarget}" ] - ++ (lib.optionals (is32bit) [ + ++ (lib.optionals is32bit [ "CFG_ARM32_core=y" "CROSS_COMPILE32=${stdenv.cc.targetPrefix}" ]) - ++ (lib.optionals (is64bit) [ + ++ (lib.optionals is64bit [ "CFG_ARM64_core=y" "CROSS_COMPILE64=${stdenv.cc.targetPrefix}" ]) diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 7146a7e61b61..ce5dd347c49c 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -606,7 +606,7 @@ in wrapProgram $target/scripts/main.sh \ --prefix PATH : ${ with pkgs; - lib.makeBinPath ([ + lib.makeBinPath [ findutils fzf gnugrep @@ -614,7 +614,7 @@ in ncurses pkgs.pass tmux - ]) + ] } ''; @@ -770,13 +770,13 @@ in wrapProgram $target/bin/t \ --prefix PATH : ${ with pkgs; - lib.makeBinPath ([ + lib.makeBinPath [ fzf zoxide coreutils gnugrep gnused - ]) + ] } ''; }; @@ -1018,10 +1018,10 @@ in wrapProgram $out/share/tmux-plugins/t-smart-tmux-session-manager/bin/t \ --prefix PATH : ${ - lib.makeBinPath ([ + lib.makeBinPath [ pkgs.fzf pkgs.zoxide - ]) + ] } find $target -type f -print0 | xargs -0 sed -i -e 's|fzf |${pkgs.fzf}/bin/fzf |g' diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix index 91fbd2aa0b68..a8088b063bde 100644 --- a/pkgs/os-specific/bsd/freebsd/default.nix +++ b/pkgs/os-specific/bsd/freebsd/default.nix @@ -42,10 +42,10 @@ makeScopeWithSplicing' { { inherit branch; } - // callPackage ./package-set.nix ({ + // callPackage ./package-set.nix { sourceData = versions.${self.branch} or (throw (badBranchError self.branch)); versionData = self.sourceData.version; buildFreebsd = otherSplices.selfBuildHost; patchesRoot = ./patches + "/${self.versionData.revision}"; - }) self; + } self; } diff --git a/pkgs/os-specific/bsd/freebsd/lib/default.nix b/pkgs/os-specific/bsd/freebsd/lib/default.nix index ec07808f57d4..245385fb42ee 100644 --- a/pkgs/os-specific/bsd/freebsd/lib/default.nix +++ b/pkgs/os-specific/bsd/freebsd/lib/default.nix @@ -110,9 +110,9 @@ prefixedPath = builtins.elemAt (builtins.split " |\t" (builtins.elemAt patchLines 1)) 2; unfixedPath = lib.path.subpath.join (lib.lists.drop 1 (lib.path.subpath.components prefixedPath)); in - lib.lists.any (included: lib.path.hasPrefix (/. + ("/" + included)) (/. + ("/" + unfixedPath))) ( - paths - ); + lib.lists.any ( + included: lib.path.hasPrefix (/. + ("/" + included)) (/. + ("/" + unfixedPath)) + ) paths; filteredLines = builtins.filter filterFunc partitionedPatches; derive = patchLines: writeText "freebsd-patch" (lib.concatLines patchLines); derivedPatches = map derive filteredLines; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix b/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix index 5703f669d74e..9de0f0d01c6f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix @@ -9,7 +9,7 @@ makeMinimal, install, }: -mkDerivation ({ +mkDerivation { path = "usr.bin/localedef"; extraPaths = [ @@ -34,4 +34,4 @@ mkDerivation ({ ''; MK_TESTS = "no"; -}) +} diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index cf5b01f3acf4..a3caafc781e5 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1314,7 +1314,7 @@ let # required for P2P transfers between accelerators HSA_AMD_P2P = lib.mkIf stdenv.hostPlatform.is64bit (whenAtLeast "6.6" yes); - ZONE_DEVICE = lib.mkIf stdenv.hostPlatform.is64bit (yes); + ZONE_DEVICE = lib.mkIf stdenv.hostPlatform.is64bit yes; HMM_MIRROR = yes; DRM_AMDGPU_USERPTR = yes; diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix index 41f2039606ca..740e4bc0067e 100644 --- a/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -106,7 +106,7 @@ let HZ_1000 = yes; } - // lib.optionalAttrs (isLqx) { + // lib.optionalAttrs isLqx { # https://github.com/damentz/liquorix-package/commit/07b176edc002f2a7825ae181613e1f79a3650fd2 CMDLINE_BOOL = yes; CMDLINE = freeform "audit=0 intel_pstate=disable amd_pstate=disable "; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix index a5ef9673c399..84d35be7784b 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gnused/default.nix @@ -43,7 +43,7 @@ bash.runCommand "${pname}-${version}" mkdir ''${out} ''; } - ('' + '' # Unpack tar xzf ${src} cd sed-${version} @@ -64,4 +64,4 @@ bash.runCommand "${pname}-${version}" # Install make install - '') + '' diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gnused/mes.nix b/pkgs/os-specific/linux/minimal-bootstrap/gnused/mes.nix index f11881fa290a..51b53427023f 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gnused/mes.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gnused/mes.nix @@ -42,7 +42,7 @@ bash.runCommand "${pname}-${version}" mkdir ''${out} ''; } - ('' + '' # Unpack ungz --file ${src} --output sed.tar untar --file sed.tar @@ -60,4 +60,4 @@ bash.runCommand "${pname}-${version}" # Install make install PREFIX=$out - '') + '' diff --git a/pkgs/os-specific/linux/mxu11x0/default.nix b/pkgs/os-specific/linux/mxu11x0/default.nix index 7020dd608442..7978e5bb5830 100644 --- a/pkgs/os-specific/linux/mxu11x0/default.nix +++ b/pkgs/os-specific/linux/mxu11x0/default.nix @@ -6,7 +6,7 @@ }: let - srcs = import (./srcs.nix) { inherit fetchurl; }; + srcs = import ./srcs.nix { inherit fetchurl; }; in stdenv.mkDerivation rec { pname = "mxu11x0"; diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index d113e337bcc0..457d4cb144e6 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -346,7 +346,7 @@ let # https://github.com/openzfs/zfs/blob/077269bfeddf2d35eb20f98289ac9d017b4a32ff/lib/libspl/include/sys/isa_defs.h#L267-L270 platforms = with lib.systems.inspect.patterns; - map (p: p // isLinux) ([ + map (p: p // isLinux) [ isx86 isAarch isPower @@ -355,7 +355,7 @@ let isMips isRiscV64 isLoongArch64 - ]); + ]; inherit maintainers; mainProgram = "zfs"; diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index 58eda45da319..f83a00b9e610 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -708,7 +708,7 @@ optionalAttrs allowAliases aliases description = "Elixir value"; }; in - attrsOf (attrsOf (valueType)); + attrsOf (attrsOf valueType); lib = let diff --git a/pkgs/pkgs-lib/formats/java-properties/default.nix b/pkgs/pkgs-lib/formats/java-properties/default.nix index 18b80629ae6e..c97e9b275d19 100644 --- a/pkgs/pkgs-lib/formats/java-properties/default.nix +++ b/pkgs/pkgs-lib/formats/java-properties/default.nix @@ -46,7 +46,7 @@ in type = let elemType = - oneOf ([ + oneOf [ # `package` isn't generalized to `path` because path values # are ambiguous. Are they host path strings (toString /foo/bar) # or should they be added to the store? ("${/foo/bar}") @@ -56,7 +56,7 @@ in (coercedTo bool boolToString str) (coercedTo int toString str) (coercedTo float toString str) - ]) + ] // { description = "string, package, bool, int or float"; }; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index d0deaf0ff42e..4676768278d0 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -290,7 +290,7 @@ let }; }); - wolf-comm = super.wolf-comm.overridePythonAttrs (rec { + wolf-comm = super.wolf-comm.overridePythonAttrs rec { version = "0.0.23"; src = fetchFromGitHub { owner = "janrothkegel"; @@ -298,7 +298,7 @@ let tag = version; hash = "sha256-LpehooW3vmohiyMwOQTFNLiNCsaLKelWQxQk8bl+y1k="; }; - }); + }; # internal python packages only consumed by home-assistant itself hass-web-proxy-lib = self.callPackage ./python-modules/hass-web-proxy-lib { }; diff --git a/pkgs/servers/pulseaudio/qpaeq.nix b/pkgs/servers/pulseaudio/qpaeq.nix index c337761ec4d1..1b24600fe4e1 100644 --- a/pkgs/servers/pulseaudio/qpaeq.nix +++ b/pkgs/servers/pulseaudio/qpaeq.nix @@ -26,14 +26,14 @@ mkDerivation { inherit (pulseaudio) version src; buildInputs = [ - ( - (python3.withPackages ( - ps: with ps; [ - pyqt5 - dbus-python - ] - )) - ) + + (python3.withPackages ( + ps: with ps; [ + pyqt5 + dbus-python + ] + )) + ]; dontBuild = true; diff --git a/pkgs/servers/rainloop/default.nix b/pkgs/servers/rainloop/default.nix index b434178fb28a..d4f8bd7dd5ac 100644 --- a/pkgs/servers/rainloop/default.nix +++ b/pkgs/servers/rainloop/default.nix @@ -10,7 +10,7 @@ let common = { edition, sha256 }: - stdenv.mkDerivation (rec { + stdenv.mkDerivation rec { pname = "rainloop${lib.optionalString (edition != "") "-${edition}"}"; version = "1.16.0"; @@ -73,7 +73,7 @@ let platforms = platforms.all; maintainers = with maintainers; [ das_j ]; }; - }); + }; in { rainloop-community = common { diff --git a/pkgs/servers/sql/postgresql/ext/vectorchord/package.nix b/pkgs/servers/sql/postgresql/ext/vectorchord/package.nix index eeb3bcef1e3e..99c7f5c60267 100644 --- a/pkgs/servers/sql/postgresql/ext/vectorchord/package.nix +++ b/pkgs/servers/sql/postgresql/ext/vectorchord/package.nix @@ -46,7 +46,7 @@ buildPgrxExtension (finalAttrs: { ./0002-add-feature-flags.diff ]; - buildInputs = lib.optionals (useSystemJemalloc) [ + buildInputs = lib.optionals useSystemJemalloc [ rust-jemalloc-sys' ]; diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index ba42a85dec46..1a3e65ea650d 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -54,7 +54,7 @@ let showWarnings = config.showDerivationWarnings; getNameWithVersion = - attrs: attrs.name or ("${attrs.pname or "«name-missing»"}-${attrs.version or "«version-missing»"}"); + attrs: attrs.name or "${attrs.pname or "«name-missing»"}-${attrs.version or "«version-missing»"}"; allowUnfree = config.allowUnfree || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 9ebedb728989..07c50a683d3f 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -817,12 +817,12 @@ let env' = env // lib.optionalAttrs (mainProgram != null) { NIX_MAIN_PROGRAM = mainProgram; }; derivationArg = makeDerivationArgument ( - removeAttrs attrs ([ + removeAttrs attrs [ "meta" "passthru" "pos" "env" - ]) + ] // lib.optionalAttrs __structuredAttrs { env = checkedEnv; } // { cmakeFlags = makeCMakeFlags attrs; diff --git a/pkgs/test/vim/default.nix b/pkgs/test/vim/default.nix index 2606f7d92b63..a6f52963cd8a 100644 --- a/pkgs/test/vim/default.nix +++ b/pkgs/test/vim/default.nix @@ -10,7 +10,7 @@ let packages.myVimPackage.start = with vimPlugins; [ vim-nix ]; in -pkgs.recurseIntoAttrs ({ +pkgs.recurseIntoAttrs { vim_empty_config = vimUtils.vimrcFile { beforePlugins = ""; customRC = ""; @@ -28,4 +28,4 @@ pkgs.recurseIntoAttrs ({ name = "vim-with-vim-addon-nix"; vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ]; }; -}) +} diff --git a/pkgs/tools/misc/seaborn-data/default.nix b/pkgs/tools/misc/seaborn-data/default.nix index 555c9991b63b..65a81c299c80 100644 --- a/pkgs/tools/misc/seaborn-data/default.nix +++ b/pkgs/tools/misc/seaborn-data/default.nix @@ -44,8 +44,8 @@ let ); in lib.makeScope newScope (self: { - exercise = makeSeabornDataPackage ({ + exercise = makeSeabornDataPackage { pname = "exercise"; hash = "sha256-icoc2HkG303A8hCoW6kZxD5qhOKIpdxErLr288o04wE="; - }); + }; }) diff --git a/pkgs/tools/package-management/nix/modular/src/libflake-tests/package.nix b/pkgs/tools/package-management/nix/modular/src/libflake-tests/package.nix index ed1b51bda304..869b5b4c404e 100644 --- a/pkgs/tools/package-management/nix/modular/src/libflake-tests/package.nix +++ b/pkgs/tools/package-management/nix/modular/src/libflake-tests/package.nix @@ -44,12 +44,12 @@ mkMesonExecutable (finalAttrs: { meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages; buildInputs = [ writableTmpDirAsHomeHook ]; } - ('' + '' export _NIX_TEST_UNIT_DATA=${resolvePath ./data} export NIX_CONFIG="extra-experimental-features = flakes" ${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage} touch $out - ''); + ''; }; }; diff --git a/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix b/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix index 47e3128ec1a2..ae2c170b0567 100644 --- a/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix +++ b/pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix @@ -65,13 +65,13 @@ mkMesonExecutable (finalAttrs: { meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages; buildInputs = [ writableTmpDirAsHomeHook ]; } - ('' + '' export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"} export NIX_REMOTE=$HOME/store ${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage} \ --gtest_filter=-${lib.concatStringsSep ":" finalAttrs.excludedTestPatterns} touch $out - ''); + ''; }; }; diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 4a91d9b281ca..dfce039d8bb1 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -323,7 +323,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Real-time performance monitoring tool"; homepage = "https://www.netdata.cloud/"; changelog = "https://github.com/netdata/netdata/releases/tag/v${version}"; - license = [ licenses.gpl3Plus ] ++ lib.optionals (withCloudUi) [ licenses.ncul1 ]; + license = [ licenses.gpl3Plus ] ++ lib.optionals withCloudUi [ licenses.ncul1 ]; mainProgram = "netdata"; platforms = platforms.unix; maintainers = with maintainers; [ diff --git a/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix b/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix index e506100ecbb3..d179ef835a92 100644 --- a/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix +++ b/pkgs/tools/typesetting/tex/texlive/build-tex-env.nix @@ -46,7 +46,7 @@ lib.fix ( buildEnv' = args: ( - buildEnv ({ inherit (args) name paths; }) + buildEnv { inherit (args) name paths; } // lib.optionalAttrs (args ? extraOutputsToInstall) { inherit (args) extraOutputsToInstall; } ).overrideAttrs ( diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 530cba2af8f0..6d9d9fab80d6 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -61,9 +61,9 @@ let Cheerios = callPackage ../development/coq-modules/Cheerios { }; coinduction = callPackage ../development/coq-modules/coinduction { }; CoLoR = callPackage ../development/coq-modules/CoLoR ( - (lib.optionalAttrs (lib.versions.isEq self.coq.coq-version "8.13") { + lib.optionalAttrs (lib.versions.isEq self.coq.coq-version "8.13") { bignums = self.bignums.override { version = "8.13.0"; }; - }) + } ); compcert = callPackage ../development/coq-modules/compcert { inherit @@ -85,9 +85,9 @@ let coq-record-update = callPackage ../development/coq-modules/coq-record-update { }; coq-tactical = callPackage ../development/coq-modules/coq-tactical { }; coqeal = callPackage ../development/coq-modules/coqeal ( - (lib.optionalAttrs (lib.versions.range "8.13" "8.14" self.coq.coq-version) { + lib.optionalAttrs (lib.versions.range "8.13" "8.14" self.coq.coq-version) { bignums = self.bignums.override { version = "${self.coq.coq-version}.0"; }; - }) + } ); coqhammer = callPackage ../development/coq-modules/coqhammer { }; coqide = callPackage ../development/coq-modules/coqide { }; diff --git a/pkgs/top-level/darwin-aliases.nix b/pkgs/top-level/darwin-aliases.nix index b91c4da89618..717f2f58763a 100644 --- a/pkgs/top-level/darwin-aliases.nix +++ b/pkgs/top-level/darwin-aliases.nix @@ -96,7 +96,7 @@ let in stubs -// mapAliases ({ +// mapAliases { ### A ### apple_sdk_10_12 = throw "darwin.apple_sdk_10_12 was removed as Nixpkgs no longer supports macOS 10.12; see the 25.05 release notes"; # Added 2024-10-27 @@ -151,4 +151,4 @@ stubs stdenvNoCF = throw "darwin.stdenvNoCF has been removed; use `stdenv` or `stdenvNoCC`"; # converted to throw 2025-07-29 stubs = throw "'darwin.stubs.*' have been removed as they were unused"; # added 2025-04-20 swift-corelibs-foundation = throw "'darwin.swift-corelibs-foundation' has been removed, as it was broken and is no longer used"; # added 2025-04-20 -}) +} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 8b8feaa7e57d..7674234b5ff8 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -31,7 +31,7 @@ in ### Deprecated aliases - for backward compatibility -mapAliases ({ +mapAliases { # Prevent incorrect Python packaging attempts. # Note: `{ python3, python3Packages, ... }: with python3Packages; [ ... python3 ]` still works, since `with` has lower priority. pythonPackages = throw "do not use pythonPackages when building Python packages, specify each used package as a separate argument"; # do not remove @@ -918,4 +918,4 @@ mapAliases ({ zope_testing = zope-testing; # added 2023-11-12 zope_testrunner = zope-testrunner; # added 2024-01-06 zxing_cpp = zxing-cpp; # added 2023-11-05 -}) +} diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 341b63bf21c1..5370cc028964 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -47,7 +47,7 @@ in }; } -// (mapTestOn ({ +// (mapTestOn { aspell = all; at = linux; @@ -176,4 +176,4 @@ in xkeyboard_config = linux; zip = all; tests-stdenv-gcc-stageCompare = linux; -})) +}) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 9fa556ff7e02..926a132a3805 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -309,7 +309,7 @@ let # Fully static packages. # Currently uses Musl on Linux (couldn’t get static glibc to work). - pkgsStatic = nixpkgsFun ({ + pkgsStatic = nixpkgsFun { overlays = [ (self': super': { pkgsStatic = super'; @@ -328,7 +328,7 @@ let lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") { abi = "elfv2"; } // stdenv.hostPlatform.gcc or { }; }; - }); + }; }; # The complete chain of package set builders, applied from top to bottom. diff --git a/pkgs/top-level/variants.nix b/pkgs/top-level/variants.nix index b4e970f98a34..ea288206dfbc 100644 --- a/pkgs/top-level/variants.nix +++ b/pkgs/top-level/variants.nix @@ -114,12 +114,12 @@ self: super: { # Full package set with rocm on cuda off # Mostly useful for asserting pkgs.pkgsRocm.torchWithRocm == pkgs.torchWithRocm and similar - pkgsRocm = nixpkgsFun ({ + pkgsRocm = nixpkgsFun { config = super.config // { cudaSupport = false; rocmSupport = true; }; - }); + }; # Full package set with cuda on rocm off # Mostly useful for asserting pkgs.pkgsCuda.torchWithCuda == pkgs.torchWithCuda and similar