summary refs log tree commit diff
path: root/pkgs/tools/system/htop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/htop/default.nix')
-rw-r--r--pkgs/tools/system/htop/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix
index cb79607ebbf..305761e0c3b 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"
   ;