nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 42 lines 832 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, python 6, pythonOlder 7, pytest 8}: 9 10buildPythonPackage rec { 11 pname = "mock"; 12 version = "4.0.3"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.6"; 16 17 src = fetchPypi { 18 inherit pname version; 19 sha256 = "7d3fbbde18228f4ff2f1f119a45cdffa458b4c0dee32eb4d2bb2f82554bac7bc"; 20 }; 21 22 patches = [ 23 (fetchpatch { 24 url = "https://github.com/testing-cabal/mock/commit/f3e3d82aab0ede7e25273806dc0505574d85eae2.patch"; 25 sha256 = "sha256-wPrv1/WeICZHn31UqFlICFsny2knvn3+Xg8BZoaGbwQ="; 26 }) 27 ]; 28 29 checkPhase = '' 30 ${python.interpreter} -m unittest discover 31 ''; 32 33 checkInputs = [ 34 pytest 35 ]; 36 37 meta = with lib; { 38 description = "Mock objects for Python"; 39 homepage = "https://github.com/testing-cabal/mock"; 40 license = licenses.bsd2; 41 }; 42}