about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/system/htop/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix
index 7e1d64942d579..e3dca89c46468 100644
--- a/pkgs/tools/system/htop/default.nix
+++ b/pkgs/tools/system/htop/default.nix
@@ -2,7 +2,8 @@
 , ncurses
 , IOKit
 , sensorsSupport ? stdenv.isLinux, lm_sensors
-, systemdSupport ? stdenv.isLinux, systemd
+, systemdSupport ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
+, systemd
 }:
 
 assert systemdSupport -> stdenv.isLinux;
@@ -33,8 +34,7 @@ stdenv.mkDerivation rec {
   postFixup =
     let
       optionalPatch = pred: so: lib.optionalString pred "patchelf --add-needed ${so} $out/bin/htop";
-    in
-    ''
+    in lib.optionalString (!stdenv.hostPlatform.isStatic) ''
       ${optionalPatch sensorsSupport "${lm_sensors}/lib/libsensors.so"}
       ${optionalPatch systemdSupport "${systemd}/lib/libsystemd.so"}
     '';