nixpkgs/pkgs/os-specific/linux/dstat/default.nix
Tobias Geerinckx-Rice cb363c1033 dstat: add python-wifi dependency for --wifi
This is limited to kernels with the (legacy) Wireless Extensions,
and supported wireless cards. Also add myself as a maintainer.

CC maintainer @jgeerds
2015-09-14 23:53:21 +02:00

34 lines
898 B
Nix

{ stdenv, fetchurl, python, pythonPackages }:
stdenv.mkDerivation rec {
name = "dstat-0.7.2";
src = fetchurl {
url = "http://dag.wieers.com/home-made/dstat/${name}.tar.bz2";
sha256 = "1bivnciwlamnl9q6i5ygr7jhs8pp833z2bkbrffvsa60szcqda9l";
};
buildInputs = with pythonPackages; [ python-wifi wrapPython ];
pythonPath = with pythonPackages; [ python-wifi ];
patchPhase = ''
sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \
-e "s|/usr/share/dstat|$out/share/dstat|" dstat
'';
makeFlags = "prefix=$(out)";
postInstall = ''
wrapPythonProgramsIn $out/bin "$out $pythonPath"
'';
meta = with stdenv.lib; {
homepage = http://dag.wieers.com/home-made/dstat/;
description = "Versatile resource statistics tool";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ jgeerds nckx ];
};
}