Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 39 lines 963 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, unittest2 5, funcsigs 6, six 7, pbr 8, python 9}: 10 11buildPythonPackage rec { 12 pname = "mock"; 13 version = "2.0.0"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"; 18 }; 19 20 buildInputs = [ unittest2 ]; 21 propagatedBuildInputs = [ funcsigs six pbr ]; 22 23 # On PyPy for Python 2.7 in particular, Mock's tests have a known failure. 24 # Mock upstream has a decoration to disable the failing test and make 25 # everything pass, but it is not yet released. The commit: 26 # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12 27 doCheck = !(python.isPyPy && python.isPy27); 28 29 checkPhase = '' 30 ${python.interpreter} -m unittest discover 31 ''; 32 33 meta = with stdenv.lib; { 34 description = "Mock objects for Python"; 35 homepage = http://python-mock.sourceforge.net/; 36 license = stdenv.lib.licenses.bsd2; 37 }; 38 39}