From feaf1a72bc088afc0aec83f1e1a1a503c60303e1 Mon Sep 17 00:00:00 2001 From: novenary Date: Sun, 22 Jan 2023 18:38:06 +0200 Subject: [PATCH] htop: enable extra features --- pkgs/tools/system/htop/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index cb79607ebbf8..305761e0c3be 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -1,6 +1,8 @@ -{ lib, fetchFromGitHub, stdenv, autoreconfHook +{ lib, fetchFromGitHub, stdenv, autoreconfHook, pkg-config , ncurses , IOKit +, libcap +, libnl , sensorsSupport ? stdenv.isLinux, lm_sensors , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: @@ -18,15 +20,23 @@ stdenv.mkDerivation rec { sha256 = "sha256-MwtsvdPHcUdegsYj9NGyded5XJQxXri1IM1j4gef1Xk="; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook ] + ++ lib.optional stdenv.isLinux pkg-config + ; buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin IOKit + ++ lib.optionals stdenv.isLinux [ libcap libnl ] ++ lib.optional sensorsSupport lm_sensors ++ lib.optional systemdSupport systemd ; configureFlags = [ "--enable-unicode" "--sysconfdir=/etc" ] + ++ lib.optionals stdenv.isLinux [ + "--enable-affinity" + "--enable-capabilities" + "--enable-delayacct" + ] ++ lib.optional sensorsSupport "--with-sensors" ;