pythonPacakges.mock: refactor move to python-modules
This commit is contained in:
parent
5508797159
commit
34a2b86fbc
33
pkgs/development/python-modules/mock/default.nix
Normal file
33
pkgs/development/python-modules/mock/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, unittest2
|
||||
, funcsigs
|
||||
, six
|
||||
, pbr
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mock";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i";
|
||||
};
|
||||
|
||||
buildInputs = [ unittest2 ];
|
||||
propagatedBuildInputs = [ funcsigs six pbr ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Mock objects for Python";
|
||||
homepage = http://python-mock.sourceforge.net/;
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
};
|
||||
|
||||
}
|
@ -2805,27 +2805,7 @@ in {
|
||||
|
||||
editorconfig = callPackage ../development/python-modules/editorconfig { };
|
||||
|
||||
mock = buildPythonPackage (rec {
|
||||
name = "mock-2.0.0";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://pypi/m/mock/${name}.tar.gz";
|
||||
sha256 = "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i";
|
||||
};
|
||||
|
||||
buildInputs = with self; [ unittest2 ];
|
||||
propagatedBuildInputs = with self; [ funcsigs six pbr ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Mock objects for Python";
|
||||
homepage = http://python-mock.sourceforge.net/;
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
};
|
||||
});
|
||||
mock = callPackage ../development/python-modules/mock { };
|
||||
|
||||
mock-open = callPackage ../development/python-modules/mock-open { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user