2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
docopt,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freezegun,
|
|
|
|
mock,
|
|
|
|
pyjwt,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-mock,
|
|
|
|
setuptools,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notifications-python-client";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "10.0.0";
|
|
|
|
pyproject = true;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alphagov";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "notifications-python-client";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-qjiI+aTJLOz3XSTHKrpZrJ/wg1xP+V7ww0//xX3Kf1E=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail "pytest-runner" ""
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2021-12-19 01:06:50 +00:00
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "notifications_python_client" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the GOV.UK Notify API";
|
|
|
|
homepage = "https://github.com/alphagov/notifications-python-client";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/alphagov/notifications-python-client/blob/${version}/CHANGELOG.md";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = licenses.mit;
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|