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 = "9.0.0"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "alphagov"; 26 repo = "notifications-python-client"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-HDxCVwagHFenx0S2TPxiMIyyq4ovxe0yNi76sX2CC9s="; 29 }; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace "pytest-runner" "" 34 ''; 35 36 nativeBuildInputs = [ setuptools ]; 37 38 propagatedBuildInputs = [ 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 = with licenses; [ mit ]; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}