summary refs log tree commit diff
path: root/pkgs/applications/misc/pstree/default.nix
blob: 3cd52af6d32185363302cc4ddf796a0f12fe22df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "pstree-2.39";

  src = fetchurl {
    urls = [
      "http://www.sfr-fresh.com/unix/misc/${name}.tar.gz"
      "https://distfiles.macports.org/pstree/${name}.tar.gz"
    ];
    sha256 = "17s7v15c4gryjpi11y1xq75022nkg4ggzvjlq2dkmyg67ssc76vw";
  };

  unpackPhase = "unpackFile \$src; sourceRoot=.";

  buildPhase = "pwd; $CC -o pstree pstree.c";
  installPhase = "mkdir -p \$out/bin; cp pstree \$out/bin";

  meta = {
    description = "Show the set of running processes as a tree";
    license = "GPL";
    maintainers = [ ];
    platforms = stdenv.lib.platforms.unix;
  };
}