Merge pull request #212134 from 9ary/htop-features

htop: enable extra features
This commit is contained in:
Nick Cao 2023-01-24 16:42:28 +08:00 committed by GitHub
commit 42567f62c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
;