From 4cdef761253dfdd4c14821ce121a592a5186db31 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 26 Oct 2024 17:15:04 +0200 Subject: [PATCH] htop: backport configuration path fix See https://github.com/htop-dev/htop/pull/1412 This is useful if the htop configuration is managed by something like Home Manager. Signed-off-by: Sefa Eyeoglu --- pkgs/tools/system/htop/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index c0a689c4c621..e9e1b2db6754 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, stdenv, autoreconfHook, pkg-config +{ lib, fetchFromGitHub, fetchpatch2, stdenv, autoreconfHook, pkg-config , ncurses , IOKit , libcap @@ -20,6 +20,16 @@ stdenv.mkDerivation rec { hash = "sha256-qDhQkzY2zj2yxbgFUXwE0MGEgAFOsAhnapUuetO9WTw="; }; + patches = [ + # See https://github.com/htop-dev/htop/pull/1412 + # Remove when updating to 3.4.0 + (fetchpatch2 { + name = "htop-resolve-configuration-path.patch"; + url = "https://github.com/htop-dev/htop/commit/0dac8e7d38ec3aeae901a987717b5177986197e4.patch"; + hash = "sha256-Er1d/yV1fioYfEmXNlLO5ayAyXkyy+IaGSx1KWXvlv0="; + }) + ]; + nativeBuildInputs = [ autoreconfHook ] ++ lib.optional stdenv.hostPlatform.isLinux pkg-config ;