git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #146359 from fabaff/nessclient
commit595dde5dbe42f2ca60cb2e5e7454fa3076e86610 authorMartin Weinelt <mweinelt@users.noreply.github.com> dateSat 20 Nov 2021, 23:01 (5 years ago) parent12b52be6ba4962
5 files changed+94−1
pkgs/development/python-modules/justbackoff/default.nix+41 pkgs/development/python-modules/nessclient/default.nix+47 pkgs/servers/home-assistant/component-packages.nix+1−1 pkgs/servers/home-assistant/default.nix+1 pkgs/top-level/python-packages.nix+4
pkgs/development/python-modules/justbackoff/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+, pythonOlder
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "justbackoff";
10+ version = "0.6.0";
11+ format = "setuptools";
12+
13+ disabled = pythonOlder "3.8";
14+
15+ src = fetchFromGitHub {
16+ owner = "alexferl";
17+ repo = pname;
18+ rev = "v${version}";
19+ sha256 = "097j6jxgl4b3z46x9y9z10643vnr9v831vhagrxzrq6nviil2z6l";
20+ };
21+
22+ checkInputs = [
23+ pytestCheckHook
24+ ];
25+
26+ postPatch = ''
27+ substituteInPlace setup.py \
28+ --replace "pytest-runner>=5.2" ""
29+ '';
30+
31+ pythonImportsCheck = [
32+ "justbackoff"
33+ ];
34+
35+ meta = with lib; {
36+ description = "Simple backoff algorithm in Python";
37+ homepage = "https://github.com/alexferl/justbackoff";
38+ license = with licenses; [ mit ];
39+ maintainers = with maintainers; [ fab ];
40+ };
41+}
pkgs/development/python-modules/nessclient/default.nixnew file+47
@@ -0,0 +1,47 @@
1+{ lib
2+, asynctest
3+, buildPythonPackage
4+, click
5+, fetchFromGitHub
6+, justbackoff
7+, pythonOlder
8+, pytest-asyncio
9+, pytestCheckHook
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "nessclient";
14+ version = "0.9.16b2";
15+ format = "setuptools";
16+
17+ disabled = pythonOlder "3.8";
18+
19+ src = fetchFromGitHub {
20+ owner = "nickw444";
21+ repo = pname;
22+ rev = version;
23+ sha256 = "1g3q9bv1nn1b8n6bklc05k8pac4cndzfxfr7liky0gnnbri15k81";
24+ };
25+
26+ propagatedBuildInputs = [
27+ justbackoff
28+ click
29+ ];
30+
31+ checkInputs = [
32+ asynctest
33+ pytest-asyncio
34+ pytestCheckHook
35+ ];
36+
37+ pythonImportsCheck = [
38+ "nessclient"
39+ ];
40+
41+ meta = with lib; {
42+ description = "Python implementation/abstraction of the Ness D8x/D16x Serial Interface ASCII protocol";
43+ homepage = "https://github.com/nickw444/nessclient";
44+ license = with licenses; [ mit ];
45+ maintainers = with maintainers; [ fab ];
46+ };
47+}
pkgs/servers/home-assistant/component-packages.nix+1−1
@@ -559,7 +559,7 @@
559559 "nanoleaf" = ps: with ps; [ aionanoleaf ];
560560 "neato" = ps: with ps; [ aiohttp-cors pybotvac ];
561561 "nederlandse_spoorwegen" = ps: with ps; [ nsapi ];
562− "ness_alarm" = ps: with ps; [ ]; # missing inputs: nessclient
562+ "ness_alarm" = ps: with ps; [ nessclient ];
563563 "nest" = ps: with ps; [ aiohttp-cors ha-ffmpeg python-nest ]; # missing inputs: google-nest-sdm
564564 "netatmo" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa pyatmo ];
565565 "netdata" = ps: with ps; [ netdata ];
pkgs/servers/home-assistant/default.nix+1
@@ -536,6 +536,7 @@ in with py.pkgs; buildPythonApplication rec {
536536 "nam"
537537 "namecheapdns"
538538 "neato"
539+ "ness_alarm"
539540 "netatmo"
540541 "nexia"
541542 "nightscout"
pkgs/top-level/python-packages.nix+4
@@ -4109,6 +4109,8 @@ in {
41094109
41104110 jupytext = callPackage ../development/python-modules/jupytext { };
41114111
4112+ justbackoff = callPackage ../development/python-modules/justbackoff { };
4113+
41124114 jwcrypto = callPackage ../development/python-modules/jwcrypto { };
41134115
41144116 jxmlease = callPackage ../development/python-modules/jxmlease { };
@@ -5074,6 +5076,8 @@ in {
50745076
50755077 neo = callPackage ../development/python-modules/neo { };
50765078
5079+ nessclient = callPackage ../development/python-modules/nessclient { };
5080+
50775081 nest-asyncio = callPackage ../development/python-modules/nest-asyncio { };
50785082
50795083 nestedtext = callPackage ../development/python-modules/nestedtext { };