treewide: fix lints and remove a unneeded cmake input

This commit is contained in:
Artturin 2022-12-09 00:26:13 +02:00
parent e600ef059c
commit c55b931644
21 changed files with 42 additions and 39 deletions

View File

@ -156,7 +156,7 @@ stdenv.mkDerivation rec {
WITH_X11 = true;
};
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
"-DTARGET_OS_IPHONE=0"
"-DTARGET_OS_WATCH=0"
"-include AudioToolbox/AudioToolbox.h"

View File

@ -71,25 +71,27 @@ stdenv.mkDerivation rec {
] ++ lib.optionals withNetworkManager [
networkmanager
glib
] ++ lib.optional withSensors [
] ++ lib.optionals withSensors [
lm_sensors
];
propagatedBuildInputs = [
] ++ lib.optional withPython (python3.withPackages (ps: [
] ++ lib.optionals withPython [
(python3.withPackages (ps: [
ps.numpy
ps.protobuf
ps.pyserial
ps.setuptools
ps.websockets
]));
]))
];
configureFlags = [
] ++ lib.optional (!withNetworkManager) [
] ++ lib.optionals (!withNetworkManager) [
"--disable-libnm"
] ++ lib.optional (!withPython) [
] ++ lib.optionals (!withPython) [
"--disable-python-tools"
] ++ lib.optional (!withSensors) [
] ++ lib.optionals (!withSensors) [
"--disable-lmsensors"
];

View File

@ -119,7 +119,7 @@ let
flatten flip
concatMapStrings concatStringsSep
getDev getLib
optional optionals optionalString;
optionals optionalString;
jre' = jre17_minimal.override {
modules = [ "java.base" "java.desktop" "java.logging" "java.sql" ];
@ -195,7 +195,7 @@ in
tar -xf ${srcs.translations}
'';
patches = optional (variant == "still") [ ./skip-failed-test-with-icu70.patch ./gpgme-1.18.patch ]
patches = optionals (variant == "still") [ ./skip-failed-test-with-icu70.patch ./gpgme-1.18.patch ]
;
### QT/KDE

View File

@ -48,7 +48,7 @@ rec {
};
buildInputs = oldAttrs.buildInputs
++ lib.optional withSeccomp [ libseccomp ];
++ lib.optionals withSeccomp [ libseccomp ];
});
docker-tini = tini.overrideAttrs (oldAttrs: {

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
};
};
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
"-DTARGET_OS_IPHONE=0"
"-DTARGET_OS_WATCH=0"
];

View File

@ -26,7 +26,7 @@ buildDunePackage rec {
};
propagatedBuildInputs = [ zed lwt_log lwt_react mew_vi ]
++ lib.optional (lib.versionAtLeast version "3.3.1") [ uucp logs ] ;
++ lib.optionals (lib.versionAtLeast version "3.3.1") [ uucp logs ] ;
meta = {
description = "Terminal manipulation library for OCaml";

View File

@ -32,7 +32,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
cryptography jinja2 Mako passlib pyyaml requests tomlkit librouteros
] ++ lib.optional (pythonOlder "3.11") [ rtoml ];
] ++ lib.optionals (pythonOlder "3.11") [ rtoml ];
pythonImportsCheck = [ "bundlewrap" ];

View File

@ -40,7 +40,7 @@ buildPythonPackage rec {
babel
jupyter_server
tomli
] ++ lib.optional (pythonOlder "3.10") [
] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
];

View File

@ -37,7 +37,7 @@ buildPythonPackage {
buildPackages."protobuf${lib.versions.major protobuf.version}_${lib.versions.minor protobuf.version}"
];
setupPyGlobalFlags = "--cpp_implementation";
setupPyGlobalFlags = [ "--cpp_implementation" ];
pythonImportsCheck = [
"google.protobuf"

View File

@ -35,7 +35,7 @@ buildPythonPackage rec {
];
# `stripLen` does not seem to work here
patchFlags = "-p2";
patchFlags = [ "-p2" ];
sourceRoot = "${src.name}/src";

View File

@ -133,7 +133,7 @@ buildPythonPackage rec {
# https://github.com/python-lsp/python-lsp-server/issues/243
"test_numpy_completions"
"test_workspace_loads_pycodestyle_config"
] ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) [
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# pyqt5 is broken on aarch64-darwin
"test_pyqt_completion"
];

View File

@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
sconsFlags = "platform=linuxbsd target=editor production=true";
sconsFlags = [ "platform=linuxbsd target=editor production=true" ];
preConfigure = ''
sconsFlags+=" ${
lib.concatStringsSep " "

View File

@ -397,7 +397,7 @@ lib.composeManyExtensions [
(
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ])
++ lib.optional (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ]
++ lib.optionals (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ]
++ lib.optional (!self.isPyPy) pyBuildPackages.cffi
++ lib.optional (lib.versionAtLeast old.version "3.5" && !isWheel)
(with pkgs.rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
@ -1078,9 +1078,9 @@ lib.composeManyExtensions [
buildInputs = old.buildInputs or [ ] ++ [
pkgs.which
] ++ lib.optional enableGhostscript [
] ++ lib.optionals enableGhostscript [
pkgs.ghostscript
] ++ lib.optional stdenv.isDarwin [
] ++ lib.optionals stdenv.isDarwin [
Cocoa
];
@ -1097,7 +1097,7 @@ lib.composeManyExtensions [
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkg-config
] ++ lib.optional (lib.versionAtLeast super.matplotlib.version "3.5.0") [
] ++ lib.optionals (lib.versionAtLeast super.matplotlib.version "3.5.0") [
self.setuptools-scm
self.setuptools-scm-git-archive
];
@ -2111,8 +2111,8 @@ lib.composeManyExtensions [
if old.format != "wheel" then {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++
[ pkgs.gfortran ] ++
lib.optional (lib.versionAtLeast super.scipy.version "1.7.0") [ self.pythran ] ++
lib.optional (lib.versionAtLeast super.scipy.version "1.9.0") [ self.meson-python pkg-config ];
lib.optionals (lib.versionAtLeast super.scipy.version "1.7.0") [ self.pythran ] ++
lib.optionals (lib.versionAtLeast super.scipy.version "1.9.0") [ self.meson-python pkg-config ];
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pybind11 ];
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
enableParallelBuilding = true;

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
buildFlags = [ "module" ];
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];

View File

@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-uIr8aUDErHVUKML2l6nITSBpOxqg3h1Md0948BxvutI=";
buildInputs = lib.optional stdenv.isDarwin [
buildInputs = lib.optionals stdenv.isDarwin [
Security
];

View File

@ -1,4 +1,4 @@
{ pkgs, lib, stdenv, fetchFromGitHub, fetchzip, substituteAll, nixosTests, iputils }:
{ pkgs, lib, stdenv, fetchFromGitHub, fetchzip, nixosTests, iputils, nodejs, makeWrapper }:
let
deps = import ./composition.nix { inherit pkgs; };
in
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
--replace "/sbin/ping" "${iputils}/bin/ping"
'';
buildInputs = [ pkgs.makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/share/
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
postFixup = ''
makeWrapper ${pkgs.nodejs}/bin/node $out/bin/uptime-kuma-server \
makeWrapper ${nodejs}/bin/node $out/bin/uptime-kuma-server \
--add-flags $out/share/server/server.js \
--chdir $out/share/
'';

View File

@ -42,7 +42,7 @@ in
stdenv.mkDerivation {
inherit pname version;
buildInputs = [
nativeBuildInputs = [
makeWrapper
];

View File

@ -38,7 +38,7 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre_headless util-linux ]
++ optional enableUnfree [ zlib libxcrypt ];
++ optionals enableUnfree [ zlib libxcrypt ];
installPhase = ''
mkdir -p $out

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation {
"--enable-pcre"
"--enable-zprofile=${placeholder "out"}/etc/zprofile"
"--disable-site-fndir"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform && !stdenv.hostPlatform.isStatic) [
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && !stdenv.hostPlatform.isStatic) [
# Also see: https://github.com/buildroot/buildroot/commit/2f32e668aa880c2d4a2cce6c789b7ca7ed6221ba
"zsh_cv_shared_environ=yes"
"zsh_cv_shared_tgetent=yes"

View File

@ -17,11 +17,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-laf1DEtdEs7q+rtp5Y5rb+7AGsKUv5T413CFWJiURWw=";
};
autoreconfFlags = "-if";
nativeBuildInputs = [
autoreconfHook pkg-config check
];
autoreconfFlags = [ "-if" ];
meta = with lib; {
description = "What would cron do? Read crontab entries from stdin and print time of next execution(s)";
homepage = "https://git.sr.ht/~bitfehler/wwcd";

View File

@ -25,8 +25,8 @@ stdenv.mkDerivation rec {
};
depsBuildBuild = [ pkg-config ];
buildInputs = [ libdrm wayland wayland-protocols wl-clipboard libxkbcommon cmake libressl ];
nativeBuildInputs = [ meson ninja ];
buildInputs = [ libdrm wayland wayland-protocols wl-clipboard libxkbcommon libressl ];
postPatch = ''
substituteInPlace waynergy.desktop --replace "Exec=/usr/bin/waynergy" "Exec=$out/bin/waynergy"