Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, fetchpatch 6, pytest 7, pytest-asyncio 8, pytestCheckHook 9, setuptools-scm 10}: 11 12buildPythonPackage rec { 13 pname = "pytest-mock"; 14 version = "3.10.0"; 15 16 disabled = pythonOlder "3.7"; 17 18 format = "setuptools"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-+72whe98JSoyb9jNysCqOxMz2IEfExvcxwEALhvn7U8="; 23 }; 24 25 patches = [ 26 (fetchpatch { 27 # Remove unnecessary py.code import 28 url = "https://github.com/pytest-dev/pytest-mock/pull/328/commits/e2016928db1147a2a46de6ee9fa878ca0e9d8fc8.patch"; 29 hash = "sha256-5Gpzi7h7Io1CMykmBCZR/upM8E9isc3jEItYgwjEOWA="; 30 }) 31 ]; 32 33 nativeBuildInputs = [ setuptools-scm ]; 34 35 buildInputs = [ 36 pytest 37 ]; 38 39 nativeCheckInputs = [ 40 pytest-asyncio 41 pytestCheckHook 42 ]; 43 44 pythonImportsCheck = [ "pytest_mock" ]; 45 46 meta = with lib; { 47 description = "Thin wrapper around the mock package for easier use with pytest"; 48 homepage = "https://github.com/pytest-dev/pytest-mock"; 49 changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ dotlambda ]; 52 }; 53}