astroterm: 1.0.4 -> 1.0.6 (#378908)
[NixPkgs.git] / pkgs / by-name / ps / pstree / package.nix
blobded439f93cc105fd7a671bfed60719106b8823c4
2   lib,
3   stdenv,
4   fetchurl,
5 }:
7 stdenv.mkDerivation rec {
8   pname = "pstree";
9   version = "2.39";
11   src = fetchurl {
12     urls = [
13       "https://distfiles.macports.org/${pname}/${pname}-${version}.tar.gz"
14       "https://fossies.org/linux/misc/${pname}-${version}.tar.gz"
15       "ftp://ftp.thp.uni-duisburg.de/pub/source/${pname}-${version}.tar.gz"
16     ];
17     sha256 = "17s7v15c4gryjpi11y1xq75022nkg4ggzvjlq2dkmyg67ssc76vw";
18   };
20   sourceRoot = ".";
21   buildPhase = ''
22     runHook preBuild
23     $CC $NIX_CFLAGS -o pstree pstree.c
24     runHook postBuild
25   '';
27   installPhase = ''
28     runHook preInstall
29     install -Dm0555 ${pname} -t $out/bin
30     install -Dm0444 ${pname}.1 -t $out/share/man/man1
31     runHook postInstall
32   '';
34   meta = with lib; {
35     description = "Show the set of running processes as a tree";
36     homepage = "http://www.thp.uni-duisburg.de/pstree/";
37     license = licenses.gpl2;
38     maintainers = [ maintainers.c0bw3b ];
39     platforms = platforms.unix;
40     priority = 5; # Lower than psmisc also providing pstree on Linux platforms
41     mainProgram = "pstree";
42   };