Skip to content

Commit e370e4c

Browse files
authored
htop-vim: unstable-2023-02-16 -> 3.4.0 (NixOS#389798)
2 parents cb10a81 + fcbc51a commit e370e4c

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

pkgs/by-name/ht/htop-vim/package.nix

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,36 @@ assert systemdSupport -> stdenv.hostPlatform.isLinux;
1919

2020
stdenv.mkDerivation rec {
2121
pname = "htop-vim";
22-
version = "unstable-2023-02-16";
22+
version = "3.4.0";
2323

2424
src = fetchFromGitHub {
25-
owner = "KoffeinFlummi";
25+
owner = "htop-dev";
2626
repo = pname;
27-
rev = "b2b58f8f152343b70c33b79ba51a298024278621";
28-
hash = "sha256-ZfdBAlnjoy8g6xwrR/i2+dGldMOfLlX6DRlNqB8pkGM=";
27+
rev = version;
28+
hash = "sha256-4M2Kzy/tTpIZzpyubnXWywQh7Np5InT4sYkVG2v6wWs";
2929
};
3030

3131
patches = [
32-
# See https://github.com/htop-dev/htop/pull/1412
33-
# Remove when updating to 3.4.0
3432
(fetchpatch2 {
35-
name = "htop-resolve-configuration-path.patch";
36-
url = "https://github.com/htop-dev/htop/commit/0dac8e7d38ec3aeae901a987717b5177986197e4.patch";
37-
hash = "sha256-Er1d/yV1fioYfEmXNlLO5ayAyXkyy+IaGSx1KWXvlv0=";
33+
name = "vim-keybindings.patch";
34+
url = "https://aur.archlinux.org/cgit/aur.git/plain/vim-keybindings.patch?h=htop-vim&id=d10f022b3ca1207200187a55f5b116a5bd8224f7";
35+
hash = "sha256-fZDTA2dCOmXxUYD6Wm41q7TxL7fgQOj8a/8yJC7Zags=";
3836
})
3937
];
4038

39+
# upstream removed pkg-config support and uses dlopen now
40+
postPatch =
41+
let
42+
libnlPath = lib.getLib libnl;
43+
in
44+
lib.optionalString stdenv.hostPlatform.isLinux ''
45+
substituteInPlace configure.ac \
46+
--replace-fail /usr/include/libnl3 ${lib.getDev libnl}/include/libnl3
47+
substituteInPlace linux/LibNl.c \
48+
--replace-fail libnl-3.so ${libnlPath}/lib/libnl-3.so \
49+
--replace-fail libnl-genl-3.so ${libnlPath}/lib/libnl-genl-3.so
50+
'';
51+
4152
nativeBuildInputs = [ autoreconfHook ] ++ lib.optional stdenv.hostPlatform.isLinux pkg-config;
4253

4354
buildInputs =
@@ -73,7 +84,7 @@ stdenv.mkDerivation rec {
7384

7485
meta = with lib; {
7586
description = "Interactive process viewer, with vim-style keybindings";
76-
homepage = "https://github.com/KoffeinFlummi/htop-vim";
87+
homepage = "https://aur.archlinux.org/packages/htop-vim";
7788
license = licenses.gpl2Only;
7889
platforms = platforms.all;
7990
maintainers = with maintainers; [ thiagokokada ];

0 commit comments

Comments
 (0)