diff options
author | Artturin <Artturin@artturin.com> | 2022-10-06 19:38:53 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-10-10 15:40:21 +0300 |
commit | 7e49471316373c471a3bf4b78c130ebc907ae2d2 (patch) | |
tree | 73e4fd3e290d0a79934d2b9273c1b5b51c8af8f1 /pkgs/tools | |
parent | f4ea1208ec732d423a784bbb2b882f997b6af902 (diff) |
treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
Diffstat (limited to 'pkgs/tools')
27 files changed, 32 insertions, 32 deletions
diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix index 72f8cc0be2e98..55e0e51e5f448 100644 --- a/pkgs/tools/cd-dvd/dvdisaster/default.nix +++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext pkg-config which ]; buildInputs = [ glib gtk2 ]; - patches = lib.optional enableSoftening [ + patches = lib.optionals enableSoftening [ ./encryption.patch ./dvdrom.patch ]; diff --git a/pkgs/tools/compression/bsdiff/default.nix b/pkgs/tools/compression/bsdiff/default.nix index b8a86eae89bde..6db5d99246771 100644 --- a/pkgs/tools/compression/bsdiff/default.nix +++ b/pkgs/tools/compression/bsdiff/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { }) ./CVE-2020-14315.patch ./include-systypes.patch - ] ++ lib.optional stdenv.hostPlatform.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ (fetchpatch { url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/30-bug-632585-mmap-src-file-instead-of-malloc-read-it.patch"; sha256 = "sha256-esbhz2/efUiuQDuF7LGfSeEn3/f1WbqCxQpTs2A0ulI="; diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix index 7202f9f8b5628..9639a7881f0f4 100644 --- a/pkgs/tools/graphics/mangohud/default.nix +++ b/pkgs/tools/graphics/mangohud/default.nix @@ -108,7 +108,7 @@ in stdenv.mkDerivation rec { libdbus = dbus.lib; inherit hwdata libX11; }) - ] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [ + ] ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [ # Support 32bit OpenGL applications by appending the mangohud32 # lib path to LD_LIBRARY_PATH. # diff --git a/pkgs/tools/misc/hiksink/default.nix b/pkgs/tools/misc/hiksink/default.nix index 9cc91035afe05..05d7e1c9f44ea 100644 --- a/pkgs/tools/misc/hiksink/default.nix +++ b/pkgs/tools/misc/hiksink/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/jsonwatch/default.nix b/pkgs/tools/misc/jsonwatch/default.nix index 3fe4f5008fd69..6f11e7d97e5da 100644 --- a/pkgs/tools/misc/jsonwatch/default.nix +++ b/pkgs/tools/misc/jsonwatch/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-Gjb7v3kz11iOml3Ykxhy43KNxzaprgMbb5DpPNChLTc="; - buildInputs = lib.optional stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/less/default.nix b/pkgs/tools/misc/less/default.nix index df8d9eef22ac5..a7212ccf7648a 100644 --- a/pkgs/tools/misc/less/default.nix +++ b/pkgs/tools/misc/less/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; configureFlags = [ "--sysconfdir=/etc" ] # Look for ‘sysless’ in /etc. - ++ lib.optional lessSecure [ "--with-secure" ]; + ++ lib.optionals lessSecure [ "--with-secure" ]; buildInputs = [ ncurses ]; diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 3e34a81cd4f82..4c23143b103ee 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { "--with-systemdtmpfilesdir=${placeholder "out"}/lib/tmpfiles.d" "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" "--with-pager=less" - ] ++ lib.optional stdenv.hostPlatform.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "ac_cv_func__set_invalid_parameter_handler=no" "ac_cv_func_posix_fadvise=no" "ac_cv_func_mempcpy=no" diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix index b233e94f4f60f..b6c971dd3c2ef 100644 --- a/pkgs/tools/misc/otfcc/default.nix +++ b/pkgs/tools/misc/otfcc/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ./move-makefiles.patch ]; - buildFlags = lib.optional stdenv.isAarch64 [ "config=release_arm" ]; + buildFlags = lib.optionals stdenv.isAarch64 [ "config=release_arm" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/pre-commit/default.nix b/pkgs/tools/misc/pre-commit/default.nix index 4c455d6fb2d7b..1d475ead4605a 100644 --- a/pkgs/tools/misc/pre-commit/default.nix +++ b/pkgs/tools/misc/pre-commit/default.nix @@ -37,9 +37,9 @@ buildPythonPackage rec { pyyaml toml virtualenv - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ]; diff --git a/pkgs/tools/misc/rust-motd/default.nix b/pkgs/tools/misc/rust-motd/default.nix index a2c7710984ea9..b881d94438cd7 100644 --- a/pkgs/tools/misc/rust-motd/default.nix +++ b/pkgs/tools/misc/rust-motd/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/sheldon/default.nix b/pkgs/tools/misc/sheldon/default.nix index db6aa9d8f1708..8f2c458fe1d6f 100644 --- a/pkgs/tools/misc/sheldon/default.nix +++ b/pkgs/tools/misc/sheldon/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-uRcaHuDLQm6OYqt01kLbW/mfZnL4HaDabaweaw1EOfs="; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin [ Security curl ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ]; nativeBuildInputs = [ installShellFiles pkg-config ]; # Needs network connection diff --git a/pkgs/tools/misc/ttwatch/default.nix b/pkgs/tools/misc/ttwatch/default.nix index ecfc40bdf6f34..273d34ffdb8e4 100644 --- a/pkgs/tools/misc/ttwatch/default.nix +++ b/pkgs/tools/misc/ttwatch/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake perl pkg-config ]; buildInputs = [ openssl curl libusb1 protobufc ]; - cmakeFlags = lib.optional enableUnsafe [ "-Dunsafe=on" ]; + cmakeFlags = lib.optionals enableUnsafe [ "-Dunsafe=on" ]; preFixup = '' chmod +x $out/bin/ttbin2mysports diff --git a/pkgs/tools/networking/bore-cli/default.nix b/pkgs/tools/networking/bore-cli/default.nix index 5ca16499fe823..ae39bfb6204fd 100644 --- a/pkgs/tools/networking/bore-cli/default.nix +++ b/pkgs/tools/networking/bore-cli/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-ZnEVTFiPo3AFyo1BoV88X2nCqYzRK6PkcbawiR+QnV0="; - buildInputs = lib.optional stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/eternal-terminal/default.nix b/pkgs/tools/networking/eternal-terminal/default.nix index 05e3152bec192..96315e305ad56 100644 --- a/pkgs/tools/networking/eternal-terminal/default.nix +++ b/pkgs/tools/networking/eternal-terminal/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { "-DDISABLE_CRASH_LOG=TRUE" ]; - CXXFLAGS = lib.optional stdenv.cc.isClang [ + CXXFLAGS = lib.optionals stdenv.cc.isClang [ "-std=c++17" ]; diff --git a/pkgs/tools/networking/ipv6calc/default.nix b/pkgs/tools/networking/ipv6calc/default.nix index 6df96e268effa..8489ffd6f7074 100644 --- a/pkgs/tools/networking/ipv6calc/default.nix +++ b/pkgs/tools/networking/ipv6calc/default.nix @@ -43,11 +43,11 @@ stdenv.mkDerivation rec { "--disable-bundled-md5" "--disable-dynamic-load" "--enable-shared" - ] ++ lib.optional (libmaxminddb != null) [ + ] ++ lib.optionals (libmaxminddb != null) [ "--enable-mmdb" - ] ++ lib.optional (geolite-legacy != null) [ + ] ++ lib.optionals (geolite-legacy != null) [ "--with-geoip-db=${geolite-legacy}/share/GeoIP" - ] ++ lib.optional (ip2location-c != null) [ + ] ++ lib.optionals (ip2location-c != null) [ "--enable-ip2location" ]; diff --git a/pkgs/tools/networking/rathole/default.nix b/pkgs/tools/networking/rathole/default.nix index ceaf89ef92e96..cb392114e0627 100644 --- a/pkgs/tools/networking/rathole/default.nix +++ b/pkgs/tools/networking/rathole/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin [ CoreServices ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 7fbf30614e7ac..70e1643199400 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { dbus libssh openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation diff --git a/pkgs/tools/networking/toxvpn/default.nix b/pkgs/tools/networking/toxvpn/default.nix index 57a5510bd4306..633ecf654924e 100644 --- a/pkgs/tools/networking/toxvpn/default.nix +++ b/pkgs/tools/networking/toxvpn/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optional stdenv.isLinux [ "-DSYSTEMD=1" ]; + cmakeFlags = lib.optionals stdenv.isLinux [ "-DSYSTEMD=1" ]; postInstall = "$out/bin/toxvpn -h"; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 25fcc1bcc397e..5e44eb0dabf58 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { "--with-rootkey-file=${dns-root-data}/root.key" "--enable-pie" "--enable-relro-now" - ] ++ lib.optional stdenv.hostPlatform.isStatic [ + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ "--disable-flto" ] ++ lib.optionals withSystemd [ "--enable-systemd" diff --git a/pkgs/tools/networking/vde2/default.nix b/pkgs/tools/networking/vde2/default.nix index c14aa8bb3c13b..83cee2e466af5 100644 --- a/pkgs/tools/networking/vde2/default.nix +++ b/pkgs/tools/networking/vde2/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-Yf6QB7j5lYld2XtqhYspK4037lTtimoFc7nCavCP+mU="; }; - patches = lib.optional stdenv.hostPlatform.isMusl [ + patches = lib.optionals stdenv.hostPlatform.isMusl [ (fetchpatch { url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238"; sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af"; diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index f69ee083af1f5..95fbd0782b798 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -113,7 +113,7 @@ self = stdenv.mkDerivation { propagatedBuildInputs = [ boehmgc - ] ++ lib.optional (atLeast27) [ + ] ++ lib.optionals (atLeast27) [ nlohmann_json ]; diff --git a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix index 13327a84fff00..28913c685778b 100644 --- a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix +++ b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { substitutions = [ ''--replace "convert" "${imagemagick}/bin/convert"'' ''--replace "qrencode" "${qrencode.bin}/bin/qrencode"'' - ] ++ lib.optional testQR [ + ] ++ lib.optionals testQR [ ''--replace "hash zbarimg" "true"'' # hash does not work on NixOS ''--replace "$(zbarimg --raw" "$(${zbar.out}/bin/zbarimg --raw"'' ]; diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 5b4957139d753..64a4946136f09 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -48,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { setupPyBuildFlags = [ "--build-lib=$CHIPSEC_BUILD_LIB" - ] ++ lib.optional (!withDriver) [ + ] ++ lib.optionals (!withDriver) [ "--skip-driver" ]; diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix index e071f460b1aa9..b539772213bb6 100644 --- a/pkgs/tools/security/rhash/default.nix +++ b/pkgs/tools/security/rhash/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { installTargets = [ "install" "install-lib-headers" - ] ++ lib.optional (!enableStatic) [ + ] ++ lib.optionals (!enableStatic) [ "install-lib-so-link" ]; diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix index 429027df872df..d667734ef9916 100644 --- a/pkgs/tools/security/sudo/default.nix +++ b/pkgs/tools/security/sudo/default.nix @@ -35,10 +35,10 @@ stdenv.mkDerivation rec { "--with-iologdir=/var/log/sudo-io" "--with-sendmail=${sendmailPath}" "--enable-tmpfiles.d=no" - ] ++ lib.optional withInsults [ + ] ++ lib.optionals withInsults [ "--with-insults" "--with-all-insults" - ] ++ lib.optional withSssd [ + ] ++ lib.optionals withSssd [ "--with-sssd" "--with-sssd-lib=${sssd}/lib" ]; diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index 0fc90be2dcbf1..c2c46e9a5d14e 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { pythonPath = [ python3.pkgs.six ]; - makeWrapperArgs = lib.optional withGnuplot [ + makeWrapperArgs = lib.optionals withGnuplot [ "--prefix PATH : ${lib.makeBinPath [ gnuplot ]}" ]; diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 96ca146358d26..d27ebc4e2a64a 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -99,9 +99,9 @@ in stdenv.mkDerivation rec { "--sysconfdir=/etc" "--disable-ebpf" "--with-jemalloc=${jemalloc}" - ] ++ optional (!withDBengine) [ + ] ++ optionals (!withDBengine) [ "--disable-dbengine" - ] ++ optional (!withCloud) [ + ] ++ optionals (!withCloud) [ "--disable-cloud" ]; |