2022-12-02 07:44:13 +00:00
|
|
|
{lib, stdenv, fetchFromGitLab, fetchpatch, autoconf, automake, gettext, ncurses}:
|
2007-12-11 11:47:23 +00:00
|
|
|
|
2009-06-15 21:43:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-09-26 13:47:45 +00:00
|
|
|
pname = "psmisc";
|
2022-08-01 07:06:34 +00:00
|
|
|
version = "23.5";
|
2010-10-25 14:38:45 +00:00
|
|
|
|
2018-09-26 13:47:45 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-01 07:06:34 +00:00
|
|
|
sha256 = "sha256-02jvRPqN8DS30ID42hQFu400NoFC5QiH5YA3NB+EoFI=";
|
2007-12-11 11:47:23 +00:00
|
|
|
};
|
2010-10-25 14:38:45 +00:00
|
|
|
|
2022-12-02 07:44:13 +00:00
|
|
|
patches = [
|
|
|
|
# Upstream patch to be released in the next version
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fallback-to-kill.diff";
|
|
|
|
url = "https://gitlab.com/psmisc/psmisc/-/commit/6892e321e7042e3df60a5501a1c59d076e8a856f.patch";
|
|
|
|
sha256 = "sha256-3uk1KXEOqAxpHWBORUw5+dR5s/Z55JJs5tuBZlTdjlo=";
|
|
|
|
excludes = [ "ChangeLog" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-09-26 13:47:45 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake gettext ];
|
|
|
|
buildInputs = [ ncurses ];
|
2007-12-11 11:47:23 +00:00
|
|
|
|
2021-01-15 14:45:37 +00:00
|
|
|
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
2018-10-12 13:03:50 +00:00
|
|
|
# Goes past the rpl_malloc linking failure
|
|
|
|
export ac_cv_func_malloc_0_nonnull=yes
|
|
|
|
export ac_cv_func_realloc_0_nonnull=yes
|
|
|
|
'' + ''
|
2018-09-26 13:47:45 +00:00
|
|
|
echo $version > .tarball-version
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://gitlab.com/psmisc/psmisc";
|
2007-12-11 11:47:23 +00:00
|
|
|
description = "A set of small useful utilities that use the proc filesystem (such as fuser, killall and pstree)";
|
2018-09-26 13:47:45 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ ryantm ];
|
2007-12-11 11:47:23 +00:00
|
|
|
};
|
|
|
|
}
|