nixpkgs/pkgs/os-specific/linux/dstat/default.nix

35 lines
935 B
Nix
Raw Normal View History

{ stdenv, fetchurl, python, pythonPackages }:
2012-08-05 13:55:44 +01:00
stdenv.mkDerivation rec {
2016-06-20 17:08:31 +01:00
name = "dstat-${version}";
version = "0.7.3";
2012-08-05 13:55:44 +01:00
src = fetchurl {
2016-06-20 17:08:31 +01:00
url = "https://github.com/dagwieers/dstat/archive/${version}.tar.gz";
sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6";
2012-08-05 13:55:44 +01:00
};
buildInputs = with pythonPackages; [ python-wifi wrapPython ];
pythonPath = with pythonPackages; [ python-wifi ];
2012-08-05 13:55:44 +01:00
patchPhase = ''
sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \
-e "s|/usr/share/dstat|$out/share/dstat|" dstat
'';
makeFlags = [ "prefix=$(out)" ];
2012-08-05 13:55:44 +01:00
postInstall = ''
wrapPythonProgramsIn $out/bin "$out $pythonPath"
'';
2015-06-22 07:25:07 +01:00
meta = with stdenv.lib; {
2012-08-05 13:55:44 +01:00
homepage = http://dag.wieers.com/home-made/dstat/;
description = "Versatile resource statistics tool";
2015-06-22 07:25:07 +01:00
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ jgeerds nckx ];
2012-08-05 13:55:44 +01:00
};
}