@@ -0,0 +1,50 @@
1+{ lib
2+, aiohttp
3+, aioresponses
4+, buildPythonPackage
5+, fetchFromGitHub
6+, pytest-asyncio
7+, pytestCheckHook
8+, python-dateutil
9+, pythonOlder
10+, pytz
11+}:
12+
13+buildPythonPackage rec {
14+ pname = "py-nightscout";
15+ version = "1.3.2";
16+ format = "setuptools";
17+
18+ disabled = pythonOlder "3.8";
19+
20+ src = fetchFromGitHub {
21+ owner = "marciogranzotto";
22+ repo = pname;
23+ rev = "v${version}";
24+ sha256 = "06i8vc7ykk5112y66cjixbrks46mdx3r0ygkmyah6gfgq1ddc39j";
25+ };
26+
27+ propagatedBuildInputs = [
28+ python-dateutil
29+ pytz
30+ aiohttp
31+ ];
32+
33+ checkInputs = [
34+ aioresponses
35+ pytestCheckHook
36+ pytest-asyncio
37+ ];
38+
39+
40+ pythonImportsCheck = [
41+ "py_nightscout"
42+ ];
43+
44+ meta = with lib; {
45+ description = "Python library that provides an interface to Nightscout";
46+ homepage = "https://github.com/marciogranzotto/py-nightscout";
47+ license = with licenses; [ mit ];
48+ maintainers = with maintainers; [ fab ];
49+ };
50+}