at 16.09-beta 935 B view raw
1{ stdenv, fetchurl, python, pythonPackages }: 2 3stdenv.mkDerivation rec { 4 name = "dstat-${version}"; 5 version = "0.7.3"; 6 7 src = fetchurl { 8 url = "https://github.com/dagwieers/dstat/archive/${version}.tar.gz"; 9 sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6"; 10 }; 11 12 buildInputs = with pythonPackages; [ python-wifi wrapPython ]; 13 14 pythonPath = with pythonPackages; [ python-wifi ]; 15 16 patchPhase = '' 17 sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \ 18 -e "s|/usr/share/dstat|$out/share/dstat|" dstat 19 ''; 20 21 makeFlags = [ "prefix=$(out)" ]; 22 23 postInstall = '' 24 wrapPythonProgramsIn $out/bin "$out $pythonPath" 25 ''; 26 27 meta = with stdenv.lib; { 28 homepage = http://dag.wieers.com/home-made/dstat/; 29 description = "Versatile resource statistics tool"; 30 license = licenses.gpl2; 31 platforms = platforms.linux; 32 maintainers = with maintainers; [ jgeerds nckx ]; 33 }; 34}