treewide: fix lints

Arg to lib.optional is a list

build time tool in buildInputs

*Flags not a list

https://github.com/nix-community/nixpkgs-lint

Artturin eac28f38 9984ca05

Changed files
+16 -17
nixos
modules
services
networking
pkgs
applications
misc
blender
klipper-estimator
networking
cluster
ssm-session-manager-plugin
science
biology
blast
development
libraries
appstream
ucx
lisp-modules
python-modules
snitun
traittypes
tools
marksman
os-specific
linux
freeipa
servers
audiobookshelf
tools
system
monit
+2 -2
nixos/modules/services/networking/wstunnel.nix
···
DynamicUser = true;
SupplementaryGroups = optional (serverCfg.useACMEHost != null) certConfig.group;
PrivateTmp = true;
-
AmbientCapabilities = optional (serverCfg.listen.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
+
AmbientCapabilities = optionals (serverCfg.listen.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
NoNewPrivileges = true;
RestrictNamespaces = "uts ipc pid user cgroup";
ProtectSystem = "strict";
···
EnvironmentFile = optional (clientCfg.environmentFile != null) clientCfg.environmentFile;
DynamicUser = true;
PrivateTmp = true;
-
AmbientCapabilities = (optional (clientCfg.soMark != null) [ "CAP_NET_ADMIN" ]) ++ (optional ((clientCfg.dynamicToRemote.port or 1024) < 1024 || (any (x: x.local.port < 1024) clientCfg.localToRemote)) [ "CAP_NET_BIND_SERVICE" ]);
+
AmbientCapabilities = (optionals (clientCfg.soMark != null) [ "CAP_NET_ADMIN" ]) ++ (optionals ((clientCfg.dynamicToRemote.port or 1024) < 1024 || (any (x: x.local.port < 1024) clientCfg.localToRemote)) [ "CAP_NET_BIND_SERVICE" ]);
NoNewPrivileges = true;
RestrictNamespaces = "uts ipc pid user cgroup";
ProtectSystem = "strict";
+1 -1
pkgs/applications/misc/blender/default.nix
···
libharu
libepoxy
]
-
++ lib.optional (!stdenv.isAarch64) [
+
++ lib.optionals (!stdenv.isAarch64) [
openimagedenoise
embree
]
+1 -2
pkgs/applications/misc/klipper-estimator/default.nix
···
buildInputs =
[ openssl ]
-
++ lib.optional stdenv.isDarwin [ libgit2 Security ];
+
++ lib.optionals stdenv.isDarwin [ libgit2 Security ];
nativeBuildInputs = [ pkg-config ];
···
maintainers = with maintainers; [ tmarkus ];
};
}
-
+1 -1
pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix
···
'';
doCheck = true;
-
checkFlags = "-skip TestSetSessionHandlers";
+
checkFlags = [ "-skip=TestSetSessionHandlers" ];
preCheck = ''
if ! [[ $(go/bin/sessionmanagerplugin-main --version) = ${lib.escapeShellArg version} ]]; then
+1 -1
pkgs/applications/science/biology/blast/bin.nix
···
stdenv.mkDerivation {
inherit pname version src;
-
nativeBuildInputs = lib.optional stdenv.isLinux [ autoPatchelfHook ];
+
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = [ python3 perl ] ++ lib.optionals stdenv.isLinux [ zlib bzip2 glib libxml2 ];
+1 -1
pkgs/development/libraries/appstream/default.nix
···
itstool
vala
gperf
-
] ++ lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
+1 -1
pkgs/development/libraries/ucx/default.nix
···
rdma-core
zlib
] ++ lib.optional enableCuda cudatoolkit
-
++ lib.optional enableRocm [ rocm-core rocm-runtime rocm-device-libs hip ];
+
++ lib.optionals enableRocm [ rocm-core rocm-runtime rocm-device-libs hip ];
configureFlags = [
"--with-rdmacm=${rdma-core}"
+2 -2
pkgs/development/lisp-modules/packages.nix
···
sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
};
-
buildInputs = [
-
pkgs.makeWrapper
+
nativeBuildInputs = [ pkgs.makeWrapper ];
+
buildInputs = [
# needed for GSETTINGS_SCHEMAS_PATH
pkgs.gsettings-desktop-schemas pkgs.glib pkgs.gtk3
+1 -1
pkgs/development/python-modules/snitun/default.nix
···
"test_snitun_single_runner_throttling"
# ConnectionResetError: [Errno 54] Connection reset by peer
"test_peer_listener_timeout"
-
] ++ lib.optional (pythonAtLeast "3.11") [
+
] ++ lib.optionals (pythonAtLeast "3.11") [
# TypeError: Passing coroutines is forbidden, use tasks explicitly.
"test_snitun_runner_updown"
];
+1 -1
pkgs/development/python-modules/traittypes/default.nix
···
nativeCheckInputs = [ numpy pandas xarray nose pytestCheckHook ];
-
disabledTestPaths = lib.optional (lib.versionAtLeast numpy.version "1.17") [
+
disabledTestPaths = lib.optionals (lib.versionAtLeast numpy.version "1.17") [
# https://github.com/jupyter-widgets/traittypes/blob/master/setup.py#L86-L87
"traittypes/tests/test_traittypes.py"
];
+1 -1
pkgs/development/tools/marksman/default.nix
···
};
projectFile = "Marksman/Marksman.fsproj";
-
dotnetBuildFlags = "-p:VersionString=${version}";
+
dotnetBuildFlags = [ "-p:VersionString=${version}" ];
doCheck = true;
testProjectFile = "Tests/Tests.fsproj";
+1 -1
pkgs/os-specific/linux/freeipa/default.nix
···
automake
autoconf
gettext
+
pkg-config
];
buildInputs = [
···
sasl
curl
xmlrpc_c
-
pkg-config
ding-libs
p11-kit
python3
+1 -1
pkgs/servers/audiobookshelf/default.nix
···
buildInputs = [ util-linux ];
dontNpmBuild = true;
-
npmInstallFlags = "--only-production";
+
npmInstallFlags = [ "--only-production" ];
npmDepsHash = "sha256-0PFeXiS8RSffhrocrHODNpb6d9+nbpulCW5qYIrytDI=";
installPhase = ''
+1 -1
pkgs/tools/system/monit/default.nix
···
};
nativeBuildInputs = [ bison flex ] ++
-
lib.optional stdenv.hostPlatform.isDarwin [
+
lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.DiskArbitration
];