about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/bootchart/default.nix
blob: 9842bd85783a337c85269eaa4ad32bd783ac2c03 (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
26
27
28
29
30
31
{stdenv, fetchFromGitHub, pkgconfig, glib, gtk2, python2Packages }:

stdenv.mkDerivation rec {
  version = "0.14.8";
  name = "bootchart-${version}";

  src = fetchFromGitHub {
    owner = "mmeeks";
    repo = "bootchart";
    rev = version;
    sha256 = "12ja2hp6f49416zfjdx0kjfmlkh9wl9b7wz7gk372kps4gjnypqx";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ glib gtk2 python2Packages.python python2Packages.wrapPython python2Packages.pygtk ];
  pythonPath = with python2Packages; [ pygtk pycairo ];

  installPhase = ''
    make install DESTDIR=$out BINDIR=/bin PY_LIBDIR=/lib/${python2Packages.python.libPrefix}
    wrapProgram $out/bin/pybootchartgui \
      --prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
  '';

  meta = with stdenv.lib; {
    homepage = http://www.bootchart.org/;
    description = "Performance analysis and visualization of the GNU/Linux boot process";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
  };

}