From b1b3f87d63c9ed6f0e22f0ec0670d281a32f10a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 2 May 2022 12:01:30 +0200 Subject: [PATCH] htop: remove with lib over entire file --- pkgs/tools/system/htop/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index 26d10d1278da..7024fdfb0cd2 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -5,8 +5,6 @@ , systemdSupport ? stdenv.isLinux, systemd }: -with lib; - assert systemdSupport -> stdenv.isLinux; stdenv.mkDerivation rec { @@ -23,25 +21,25 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ ncurses ] - ++ optional stdenv.isDarwin IOKit - ++ optional sensorsSupport lm_sensors - ++ optional systemdSupport systemd + ++ lib.optional stdenv.isDarwin IOKit + ++ lib.optional sensorsSupport lm_sensors + ++ lib.optional systemdSupport systemd ; configureFlags = [ "--enable-unicode" "--sysconfdir=/etc" ] - ++ optional sensorsSupport "--with-sensors" + ++ lib.optional sensorsSupport "--with-sensors" ; postFixup = let - optionalPatch = pred: so: optionalString pred "patchelf --add-needed ${so} $out/bin/htop"; + optionalPatch = pred: so: lib.optionalString pred "patchelf --add-needed ${so} $out/bin/htop"; in '' ${optionalPatch sensorsSupport "${lm_sensors}/lib/libsensors.so"} ${optionalPatch systemdSupport "${systemd}/lib/libsystemd.so"} ''; - meta = { + meta = with lib; { description = "An interactive process viewer for Linux"; homepage = "https://htop.dev"; license = licenses.gpl2Only;