2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2019-05-20 19:51:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-20 19:54:22 +00:00
|
|
|
pname = "pstree";
|
|
|
|
version = "2.39";
|
2019-05-20 19:51:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
2019-05-20 19:54:22 +00:00
|
|
|
"https://distfiles.macports.org/${pname}/${pname}-${version}.tar.gz"
|
|
|
|
"https://fossies.org/linux/misc/${pname}-${version}.tar.gz"
|
|
|
|
"ftp://ftp.thp.uni-duisburg.de/pub/source/${pname}-${version}.tar.gz"
|
2019-05-20 19:51:33 +00:00
|
|
|
];
|
|
|
|
sha256 = "17s7v15c4gryjpi11y1xq75022nkg4ggzvjlq2dkmyg67ssc76vw";
|
|
|
|
};
|
|
|
|
|
2019-05-20 19:54:22 +00:00
|
|
|
sourceRoot = ".";
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
$CC $NIX_CFLAGS -o pstree pstree.c
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2019-05-20 19:51:33 +00:00
|
|
|
|
2019-05-20 19:54:22 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm0555 ${pname} -t $out/bin
|
|
|
|
install -Dm0444 ${pname}.1 -t $out/share/man/man1
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2019-05-20 19:51:33 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-20 19:51:33 +00:00
|
|
|
description = "Show the set of running processes as a tree";
|
2019-05-20 19:54:22 +00:00
|
|
|
homepage = "http://www.thp.uni-duisburg.de/pstree/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.c0bw3b ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
priority = 5; # Lower than psmisc also providing pstree on Linux platforms
|
2019-05-20 19:51:33 +00:00
|
|
|
};
|
|
|
|
}
|