1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

dstat: fix bad interpreter: No such file

This commit is contained in:
Frederik Rietdijk 2016-12-10 14:21:34 +01:00
parent a1d9d7efc0
commit 033525c6b8

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, python2Packages }:
stdenv.mkDerivation rec {
python2Packages.mkPythonDerivation rec {
name = "dstat-${version}";
version = "0.7.3";
@ -9,21 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6";
};
buildInputs = with python2Packages; [ python-wifi wrapPython ];
pythonPath = with python2Packages; [ python-wifi ];
patchPhase = ''
sed -i -e 's|/usr/bin/env python|${python2Packages.python.interpreter}|' \
-e "s|/usr/share/dstat|$out/share/dstat|" dstat
'';
propagatedBuildInputs = with python2Packages; [ python-wifi ];
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";