0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

treewide: fix lints

Arg to lib.optional is a list

build time tool in buildInputs
This commit is contained in:
Artturin 2023-03-11 00:55:17 +02:00
parent 0c4800d579
commit cab4a24c34
28 changed files with 41 additions and 40 deletions

View file

@ -1300,7 +1300,7 @@ in {
SystemCallFilter = [ SystemCallFilter = [
"@system-service" "@system-service"
"~@privileged" "~@privileged"
] ++ lib.optional (cfg.settings.server.protocol == "socket") [ "@chown" ]; ] ++ lib.optionals (cfg.settings.server.protocol == "socket") [ "@chown" ];
UMask = "0027"; UMask = "0027";
}; };
preStart = '' preStart = ''

View file

@ -70,9 +70,9 @@ stdenv.mkDerivation rec {
Cocoa SystemConfiguration Cocoa SystemConfiguration
] ++ lib.optionals coreaudioSupport [ ] ++ lib.optionals coreaudioSupport [
CoreAudio CoreAudio
] ++ lib.optional sndioSupport [ ] ++ lib.optionals sndioSupport [
sndio sndio
] ++ lib.optional pipewireSupport [ ] ++ lib.optionals pipewireSupport [
pipewire pipewire
]; ];
@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
"-DDISABLE_STRIP=true" "-DDISABLE_STRIP=true"
]; ];
postFixup = lib.optionals stdenv.isDarwin '' postFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname} install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname}
install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname}d install_name_tool -add_rpath $out/share/${pname} $out/share/${pname}/${pname}d
''; '';

View file

@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ly2w9jmRlprm/PnyC0LYjrxBVK+J0DLiSpzuTUMZpWA="; sha256 = "sha256-ly2w9jmRlprm/PnyC0LYjrxBVK+J0DLiSpzuTUMZpWA=";
}; };
nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook ]; nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook intltool ];
buildInputs = [ intltool gtk3 ]; buildInputs = [ gtk3 ];
meta = with lib; { meta = with lib; {
description = "Simple text editor forked from Leafpad using GTK+ 3.x"; description = "Simple text editor forked from Leafpad using GTK+ 3.x";

View file

@ -26,13 +26,13 @@ stdenv.mkDerivation {
gtk3 gtk3
libGL libGL
libGLU libGLU
pkg-config
libX11 libX11
xcbutil xcbutil
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
upx upx
pkg-config
]; ];
postPatch = '' postPatch = ''

View file

@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
ffmpegthumbnailer ffmpeg ffmpegthumbnailer ffmpeg
] ++ lib.optional waylandSupport [ chafa ] ] ++ lib.optionals waylandSupport [ chafa ]
++ lib.optional x11Support [ ueberzug ]; ++ lib.optionals x11Support [ ueberzug ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];

View file

@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
gtksourceview5 gtksourceview5
libadwaita libadwaita
poppler poppler
] ++ lib.optional stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Foundation
]; ];

View file

@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
qtsvg qtsvg
qtwayland qtwayland
quazip quazip
] ++ lib.optional (qtVersion == "6") [ ] ++ lib.optionals (qtVersion == "6") [
qt5compat qt5compat
]; ];

View file

@ -118,7 +118,7 @@ stdenv.mkDerivation rec {
# "Illegal instruction (core dumped)" # "Illegal instruction (core dumped)"
gtk3 gtk3
gtk4 gtk4
] ++ lib.optional proprietaryCodecs [ ] ++ lib.optionals proprietaryCodecs [
vivaldi-ffmpeg-codecs vivaldi-ffmpeg-codecs
]; ];

View file

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
readline readline
sqlite sqlite
zlib zlib
] ++ lib.optional stdenv.isDarwin [ AppKit Cocoa Foundation ]; ] ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
cmakeFlags = [ cmakeFlags = [
"-DHAS_WHATSAPP=OFF" # go module build required "-DHAS_WHATSAPP=OFF" # go module build required

View file

@ -31,10 +31,10 @@ stdenv.mkDerivation rec {
bison bison
flex flex
git git
] ++ lib.optional useCore [ perl gsl ] ] ++ lib.optionals useCore [ perl gsl ]
++ lib.optional stdenv.isDarwin [ xcbuild ]; ++ lib.optionals stdenv.isDarwin [ xcbuild ];
buildInputs = lib.optional useIv [ buildInputs = lib.optionals useIv [
xorg.libX11.dev xorg.libX11.dev
xorg.libXcomposite.dev xorg.libXcomposite.dev
xorg.libXext.dev xorg.libXext.dev
@ -47,11 +47,11 @@ stdenv.mkDerivation rec {
python3.pkgs.setuptools python3.pkgs.setuptools
python3.pkgs.scikit-build python3.pkgs.scikit-build
python3.pkgs.matplotlib python3.pkgs.matplotlib
] ++ lib.optional useMpi [ ] ++ lib.optionals useMpi [
mpi mpi
] ++ lib.optional useMpi [ ] ++ lib.optionals useMpi [
python3.pkgs.mpi4py python3.pkgs.mpi4py
] ++ lib.optional useRx3d [ ] ++ lib.optionals useRx3d [
python3.pkgs.cython python3.pkgs.cython
python3.pkgs.numpy python3.pkgs.numpy
]; ];

View file

@ -79,9 +79,9 @@ mkDerivation rec {
python3Packages.mutagen python3Packages.mutagen
xapian xapian
zlib zlib
] ++ lib.optional withGui [ ] ++ lib.optionals withGui [
qtbase qtbase
] ++ lib.optional stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
libiconv libiconv
]; ];

View file

@ -26,12 +26,12 @@ stdenv.mkDerivation rec {
cmake cmake
pkg-config pkg-config
wrapQtAppsHook wrapQtAppsHook
] ++ lib.optional buildDocs [ doxygen qttools.dev ]; ] ++ lib.optionals buildDocs [ doxygen qttools.dev ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_LIBDIR=lib"
"-DPROJECT_VERSION=${version}" "-DPROJECT_VERSION=${version}"
] ++ lib.optional (!buildDocs) [ "-DBUILD_DOCS=OFF" ]; ] ++ lib.optionals (!buildDocs) [ "-DBUILD_DOCS=OFF" ];
propagatedBuildInputs = [ glibmm ]; propagatedBuildInputs = [ glibmm ];

View file

@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
qmakeFlags = [ qmakeFlags = [
"INSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms" "INSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms"
] ]
++ lib.optional (!waylandSupport) [ "CONFIG+=DISABLE_WAYLAND" ]; ++ lib.optionals (!waylandSupport) [ "CONFIG+=DISABLE_WAYLAND" ];
meta = with lib; { meta = with lib; {
description = "Qt platform plugins for DDE"; description = "Qt platform plugins for DDE";

View file

@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
sourceHighlight sourceHighlight
xz xz
zlib zlib
] ++ lib.optional stdenv.buildPlatform.isLinux [ ] ++ lib.optionals stdenv.buildPlatform.isLinux [
autoPatchelfHook autoPatchelfHook
elfutils elfutils
glibc glibc

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
hash = "sha256-IAL4egXgaGmCilzcryjuvOoHhahyrfGWY68GBfXXgAM="; hash = "sha256-IAL4egXgaGmCilzcryjuvOoHhahyrfGWY68GBfXXgAM=";
}; };
buildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
propagatedBuildInputs = [ propagatedBuildInputs = [
leptonica leptonica
zlib zlib

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
pname = "libax25"; pname = "libax25";
version = "0.0.12-rc5"; version = "0.0.12-rc5";
buildInputs = [ glibc ] ++ lib.optional stdenv.hostPlatform.isStatic [ glibc.static ]; buildInputs = [ glibc ] ++ lib.optionals stdenv.hostPlatform.isStatic [ glibc.static ];
# Due to recent unsolvable administrative domain problems with linux-ax25.org, # Due to recent unsolvable administrative domain problems with linux-ax25.org,
# the new domain is linux-ax25.in-berlin.de # the new domain is linux-ax25.in-berlin.de

View file

@ -30,7 +30,8 @@ stdenv.mkDerivation rec {
"--with-docbook-xsl-stylesheets=${docbook_xsl}/xml/xsl/docbook" "--with-docbook-xsl-stylesheets=${docbook_xsl}/xml/xsl/docbook"
]; ];
buildInputs = [ pkg-config autoreconfHook expat gpgme libgcrypt libxml2 libxslt gnutls curl docbook_xsl ]; nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ expat gpgme libgcrypt libxml2 libxslt gnutls curl docbook_xsl ];
meta = with lib; { meta = with lib; {
description = "Client library for accessing SOAP services of Czech government-provided Databox infomation system"; description = "Client library for accessing SOAP services of Czech government-provided Databox infomation system";

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config autoreconfHook ]; nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optional enablePsm2 [ libpsm2 ]; buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ];
configureFlags = [ configureFlags = [
(if enablePsm2 then "--enable-psm2=${libpsm2}" else "--disable-psm2") (if enablePsm2 then "--enable-psm2=${libpsm2}" else "--disable-psm2")

View file

@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-w+/5Ig+U8y4nwu7QisnZvc3UlZaEU/kovV6birOWndE="; cargoSha256 = "sha256-w+/5Ig+U8y4nwu7QisnZvc3UlZaEU/kovV6birOWndE=";
buildInputs = lib.optional stdenv.isDarwin [ buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.Security
]; ];

View file

@ -48,7 +48,7 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook pytest-astropy ]; nativeCheckInputs = [ pytestCheckHook pytest-astropy ];
disabledTests = lib.optional (!stdenv.hostPlatform.isDarwin) [ disabledTests = lib.optionals (!stdenv.hostPlatform.isDarwin) [
# Skipping 2 tests because it's failing. Domain knowledge was unavailable on decision. # Skipping 2 tests because it's failing. Domain knowledge was unavailable on decision.
# Error logs: https://gist.github.com/superherointj/3f616f784014eeb2e3039b0f4037e4e9 # Error logs: https://gist.github.com/superherointj/3f616f784014eeb2e3039b0f4037e4e9
"test_calculate_rotation_angle" "test_calculate_rotation_angle"

View file

@ -27,7 +27,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
redis redis
] ++ lib.optional withDjango [ ] ++ lib.optionals withDjango [
django-redis django-redis
]; ];

View file

@ -32,7 +32,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
pyyaml pyyaml
requests requests
] ++ lib.optional (!pythonAtLeast "3.9") [ ] ++ lib.optionals (!pythonAtLeast "3.9") [
importlib-resources importlib-resources
]; ];

View file

@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-uiKKyIy2IHDtHWJmG3G9UVHaASL9uEg5Zu+2Wj8mw0k="; cargoHash = "sha256-uiKKyIy2IHDtHWJmG3G9UVHaASL9uEg5Zu+2Wj8mw0k=";
buildInputs = lib.optional stdenv.isDarwin [ buildInputs = lib.optionals stdenv.isDarwin [
CoreServices CoreServices
]; ];

View file

@ -42,7 +42,6 @@ stdenv.mkDerivation rec {
enet enet
freetype freetype
glpk glpk
intltool
libpng libpng
libunibreak libunibreak
libvorbis libvorbis
@ -61,6 +60,7 @@ stdenv.mkDerivation rec {
meson meson
ninja ninja
pkg-config pkg-config
intltool
]; ];
mesonFlags = [ mesonFlags = [

View file

@ -64,7 +64,7 @@ stdenv.mkDerivation {
inherit (srcs.${dxvkVersion}) version src patches; inherit (srcs.${dxvkVersion}) version src patches;
nativeBuildInputs = [ glslang meson ninja ]; nativeBuildInputs = [ glslang meson ninja ];
buildInputs = lib.optional isWindows [ windows.pthreads ] buildInputs = lib.optionals isWindows [ windows.pthreads ]
++ lib.optionals isDxvk2 ( ++ lib.optionals isDxvk2 (
[ spirv-headers vulkan-headers ] [ spirv-headers vulkan-headers ]
++ lib.optional (!isWindows && sdl2Support) SDL2 ++ lib.optional (!isWindows && sdl2Support) SDL2

View file

@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ buildInputs = [
ncurses ncurses
openssl openssl
] ++ lib.optional stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
Security Security
]; ];

View file

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
"ARCH=${stdenv.hostPlatform.linuxArch}" "ARCH=${stdenv.hostPlatform.linuxArch}"
("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n")) ("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n"))
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
]; ];

View file

@ -28,7 +28,7 @@ let
buildFeatures = [ buildFeatures = [
"kubernetes-discovery" "kubernetes-discovery"
] ++ ] ++
(lib.optional (lib.versionAtLeast version "0.8") [ (lib.optionals (lib.versionAtLeast version "0.8") [
"bundled-libs" "bundled-libs"
"sled" "sled"
"metrics" "metrics"
@ -45,7 +45,7 @@ let
"k2v" "k2v"
"kubernetes-discovery" "kubernetes-discovery"
] ++ ] ++
(lib.optional (lib.versionAtLeast version "0.8") [ (lib.optionals (lib.versionAtLeast version "0.8") [
"bundled-libs" "bundled-libs"
"sled" "sled"
"metrics" "metrics"