e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, docopt
|
|
, fetchFromGitHub
|
|
, freezegun
|
|
, mock
|
|
, pyjwt
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
, requests-mock
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "notifications-python-client";
|
|
version = "9.0.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alphagov";
|
|
repo = "notifications-python-client";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-HDxCVwagHFenx0S2TPxiMIyyq4ovxe0yNi76sX2CC9s=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
docopt
|
|
pyjwt
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
mock
|
|
pytest-mock
|
|
pytestCheckHook
|
|
requests-mock
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"notifications_python_client"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python client for the GOV.UK Notify API";
|
|
homepage = "https://github.com/alphagov/notifications-python-client";
|
|
changelog = "https://github.com/alphagov/notifications-python-client/blob/${version}/CHANGELOG.md";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|