python.pkgs.psutil: move to separate expression

This commit is contained in:
Frederik Rietdijk 2017-11-23 16:59:42 +01:00
parent 59d82d8895
commit 543136e863
2 changed files with 34 additions and 24 deletions

View File

@ -0,0 +1,28 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, darwin
, mock
}:
buildPythonPackage rec {
pname = "psutil";
version = "4.3.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6";
};
# No tests in archive
doCheck = false;
buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit ];
meta = {
description = "Process and system utilization information interface for python";
homepage = https://github.com/giampaolo/psutil;
license = stdenv.lib.licenses.bsd3;
};
}

View File

@ -14878,31 +14878,13 @@ in {
psd-tools = callPackage ../development/python-modules/psd-tools { };
psutil = buildPythonPackage rec {
name = "psutil-${version}";
version = "4.3.0";
psutil = callPackage ../development/python-modules/psutil { };
src = pkgs.fetchurl {
url = "mirror://pypi/p/psutil/${name}.tar.gz";
sha256 = "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6";
};
# Certain tests fail due to being in a chroot.
# See also the older issue: https://code.google.com/p/psutil/issues/detail?id=434
doCheck = false;
buildInputs = with self; [ mock ] ++ optionals stdenv.isDarwin [ pkgs.darwin.IOKit ];
meta = {
description = "Process and system utilization information interface for python";
homepage = https://github.com/giampaolo/psutil;
};
};
psutil_1 = self.psutil.overrideDerivation (self: rec {
name = "psutil-1.2.1";
src = pkgs.fetchurl {
url = "mirror://pypi/p/psutil/${name}.tar.gz";
psutil_1 = self.psutil.overrideAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "1.2.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "0ibclqy6a4qmkjhlk3g8jhpvnk0v9aywknc61xm3hfi5r124m3jh";
};
});