nixpkgs/pkgs/os-specific/linux/psmisc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.3 KiB
Nix
Raw Normal View History

{lib, stdenv, fetchFromGitLab, fetchpatch, autoconf, automake, gettext, ncurses}:
stdenv.mkDerivation rec {
2018-09-26 13:47:45 +00:00
pname = "psmisc";
2022-08-01 07:06:34 +00:00
version = "23.5";
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=";
};
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 ];
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
'';
meta = with lib; {
homepage = "https://gitlab.com/psmisc/psmisc";
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 ];
};
}