1{ 2 lib, 3 buildPythonPackage, 4 docopt, 5 fetchFromGitHub, 6 freezegun, 7 mock, 8 pyjwt, 9 pytest-mock, 10 pytestCheckHook, 11 pythonOlder, 12 requests, 13 requests-mock, 14 setuptools, 15}: 16 17buildPythonPackage rec { 18 pname = "notifications-python-client"; 19 version = "10.0.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "alphagov"; 26 repo = "notifications-python-client"; 27 tag = version; 28 hash = "sha256-k4q6FS3wjolt4+qtDQlunBLmCCPgLgrhr8zgOMEX4QU="; 29 }; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace-fail "pytest-runner" "" 34 ''; 35 36 build-system = [ setuptools ]; 37 38 dependencies = [ 39 docopt 40 pyjwt 41 requests 42 ]; 43 44 nativeCheckInputs = [ 45 freezegun 46 mock 47 pytest-mock 48 pytestCheckHook 49 requests-mock 50 ]; 51 52 pythonImportsCheck = [ "notifications_python_client" ]; 53 54 meta = with lib; { 55 description = "Python client for the GOV.UK Notify API"; 56 homepage = "https://github.com/alphagov/notifications-python-client"; 57 changelog = "https://github.com/alphagov/notifications-python-client/blob/${version}/CHANGELOG.md"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}