@@ -0,0 +1,40 @@
1+{ stdenv, fetchFromGitLab, pythonPackages }:
2+
3+stdenv.mkDerivation rec {
4+ name = "phwmon-${version}";
5+ version = "2016-03-13";
6+
7+ src = fetchFromGitLab {
8+ owner = "o9000";
9+ repo = "phwmon";
10+ rev = "90247ceaff915ad1040352c5cc9195e4153472d4";
11+ sha256 = "1gkjfmd8rai7bl1j7jz9drmzlw72n7mczl0akv39ya4l6k8plzvv";
12+ };
13+
14+ nativeBuildInputs = [ pythonPackages.wrapPython ];
15+
16+ buildInputs = [ pythonPackages.pygtk pythonPackages.psutil ];
17+
18+ pythonPath = [ pythonPackages.pygtk pythonPackages.psutil ];
19+
20+ patchPhase = ''
21+ substituteInPlace install.sh --replace "/usr/local" "$out"
22+ '';
23+
24+ installPhase = ''
25+ mkdir -p $out/bin $out/share/applications
26+ ./install.sh
27+ '';
28+
29+ postFixup = ''
30+ wrapPythonPrograms
31+ '';
32+
33+ meta = {
34+ homepage = https://gitlab.com/o9000/phwmon;
35+ description = "Hardware monitor (CPU, memory, network and disk I/O) for the system tray";
36+ license = stdenv.lib.licenses.gpl2;
37+ platforms = stdenv.lib.platforms.unix;
38+ maintainers = [ stdenv.lib.maintainers.romildo ];
39+ };
40+}