2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, docopt
|
|
|
|
, fetchFromGitHub
|
|
|
|
, freezegun
|
|
|
|
, mock
|
|
|
|
, pyjwt
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notifications-python-client";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "6.4.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alphagov";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-HEHerdwplsPAld23Al8sUARu4T5IJLmY5kucAz2791c=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docopt
|
|
|
|
pyjwt
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
freezegun
|
|
|
|
mock
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"notifications_python_client"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the GOV.UK Notify API";
|
|
|
|
homepage = "https://github.com/alphagov/notifications-python-client";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|