forked from mirrors/nixpkgs
htop: remove with lib over entire file
This commit is contained in:
parent
fb679d351a
commit
b1b3f87d63
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue