summary refs log tree commit diff
path: root/pkgs/os-specific/linux/i7z/default.nix
blob: 2d0fde3c7836615dfdf0f5e54fc6f3a9485fdd6b (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
32
33
34
35
36
37
38
39
40
{ stdenv, fetchurl, qt4, ncurses}:

stdenv.mkDerivation rec {
  name = "i7z-0.27.1";

  src = fetchurl {
    url = "http://i7z.googlecode.com/files/${name}.tar.gz";
    sha256 = "0n3pry1qmpq4basnny3gddls2zlwz0813ixnas87092rvlgjhbc6";
  };

  buildInputs = [qt4 ncurses];

  patchPhase = ''
    substituteInPlace Makefile --replace "/usr/sbin" "$out/sbin"
  '';

  buildPhase = ''
    make
    cd GUI
    qmake
    make clean
    make
    cd ..
  '';

  installPhase = ''
    pwd
    ensureDir $out/sbin
    make install
    install -Dm755 GUI/i7z_GUI $out/sbin/i7z-gui
  '';

  meta = {
    description = "A better i7 (and now i3, i5) reporting tool for Linux";
    homepage = http://code.google.com/p/i7z;
    license = "GPLv2";
    maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
  };
}