3
0
Fork 0
forked from mirrors/nixpkgs

htop: remove with lib over entire file

This commit is contained in:
Sandro Jäckel 2022-05-02 12:01:30 +02:00
parent fb679d351a
commit b1b3f87d63
No known key found for this signature in database
GPG key ID: B1763F8651144063

View file

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