From cb363c1033f7ee7f6a312aeb884b4945c804b2f4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 14 Sep 2015 23:09:17 +0200 Subject: [PATCH] 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 --- pkgs/os-specific/linux/dstat/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/dstat/default.nix b/pkgs/os-specific/linux/dstat/default.nix index b12ed2ee6ec..6b3b7fac8f3 100644 --- a/pkgs/os-specific/linux/dstat/default.nix +++ b/pkgs/os-specific/linux/dstat/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, python, pythonPackages }: stdenv.mkDerivation rec { name = "dstat-0.7.2"; @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { sha256 = "1bivnciwlamnl9q6i5ygr7jhs8pp833z2bkbrffvsa60szcqda9l"; }; - buildInputs = [ ]; + buildInputs = with pythonPackages; [ python-wifi wrapPython ]; + + pythonPath = with pythonPackages; [ python-wifi ]; patchPhase = '' sed -i -e 's|/usr/bin/env python|${python}/bin/python|' \ @@ -17,11 +19,15 @@ stdenv.mkDerivation rec { 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 ]; + maintainers = with maintainers; [ jgeerds nckx ]; }; }