git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #150444 from fabaff/notifications-python-client

python3Packages.notifications-python-client: init at 6.3.0

commit7796f47d774d4cff44632d15421aeba5e2d4e9fa authorFabian Affolter <fabian@affolter-engineering.ch> dateMon 13 Dec 2021, 12:06 (5 years ago) parent7391b74ef3fded
2 files changed+61−1
pkgs/development/python-modules/notifications-python-client/default.nix+58 pkgs/top-level/python-packages.nix+3−1
pkgs/development/python-modules/notifications-python-client/default.nixnew file+58
@@ -0,0 +1,58 @@
1+{ lib
2+, buildPythonPackage
3+, docopt
4+, fetchFromGitHub
5+, freezegun
6+, mock
7+, pyjwt
8+, pytest-mock
9+, pytestCheckHook
10+, pythonOlder
11+, requests
12+, requests-mock
13+}:
14+
15+buildPythonPackage rec {
16+ pname = "notifications-python-client";
17+ version = "6.3.0";
18+ format = "setuptools";
19+
20+ disabled = pythonOlder "3.8";
21+
22+ src = fetchFromGitHub {
23+ owner = "alphagov";
24+ repo = pname;
25+ rev = version;
26+ sha256 = "sha256-pfOTVgsfXJQ9GIGowra3RAwxCri76RgnA9iyWbjomCk=";
27+ };
28+
29+ propagatedBuildInputs = [
30+ docopt
31+ pyjwt
32+ requests
33+ ];
34+
35+ checkInputs = [
36+ freezegun
37+ mock
38+ pytest-mock
39+ pytestCheckHook
40+ requests-mock
41+ ];
42+
43+ postPatch = ''
44+ substituteInPlace setup.py \
45+ --replace "'pytest-runner'" ""
46+ '';
47+
48+ pythonImportsCheck = [
49+ "notifications_python_client"
50+ ];
51+
52+ meta = with lib; {
53+ description = "Python client for the GOV.UK Notify API";
54+ homepage = "https://github.com/alphagov/notifications-python-client";
55+ license = with licenses; [ mit ];
56+ maintainers = with maintainers; [ fab ];
57+ };
58+}
pkgs/top-level/python-packages.nix+3−1
@@ -5302,10 +5302,12 @@ in {
53025302
53035303 notedown = callPackage ../development/python-modules/notedown { };
53045304
5305− notify2 = callPackage ../development/python-modules/notify2 { };
5305+ notifications-python-client = callPackage ../development/python-modules/notifications-python-client { };
53065306
53075307 notify-py = callPackage ../development/python-modules/notify-py { };
53085308
5309+ notify2 = callPackage ../development/python-modules/notify2 { };
5310+
53095311 notmuch = callPackage ../development/python-modules/notmuch {
53105312 inherit (pkgs) notmuch;
53115313 };