summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/notifications-python-client
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-12-12 16:36:08 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-12-12 16:36:08 +0100
commitef3fdedc15ca715206c2bb57f4271fffc926cc75 (patch)
tree4dbab4b54082418dbdc901785faec9d682afab93 /pkgs/development/python-modules/notifications-python-client
parent5e4feb3c2da78853c87f29d97e34096facf5a10d (diff)
python3Packages.notifications-python-client: init at 6.3.0
Diffstat (limited to 'pkgs/development/python-modules/notifications-python-client')
-rw-r--r--pkgs/development/python-modules/notifications-python-client/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/notifications-python-client/default.nix b/pkgs/development/python-modules/notifications-python-client/default.nix
new file mode 100644
index 000000000000..1f59b808912f
--- /dev/null
+++ b/pkgs/development/python-modules/notifications-python-client/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, buildPythonPackage
+, docopt
+, fetchFromGitHub
+, freezegun
+, mock
+, pyjwt
+, pytest-mock
+, pytestCheckHook
+, pythonOlder
+, requests
+, requests-mock
+}:
+
+buildPythonPackage rec {
+ pname = "notifications-python-client";
+ version = "6.3.0";
+ format = "setuptools";
+
+ disabled = pythonOlder "3.8";
+
+ src = fetchFromGitHub {
+ owner = "alphagov";
+ repo = pname;
+ rev = version;
+ sha256 = "sha256-pfOTVgsfXJQ9GIGowra3RAwxCri76RgnA9iyWbjomCk=";
+ };
+
+ propagatedBuildInputs = [
+ docopt
+ pyjwt
+ requests
+ ];
+
+ checkInputs = [
+ 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 ];
+ };
+}