1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, httpx
7, pytest-asyncio
8, pytest-httpx
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "luftdaten";
14 version = "0.7.4";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "home-assistant-ecosystem";
21 repo = "python-luftdaten";
22 rev = version;
23 hash = "sha256-nOhJKlUJ678DJ/ilyRHaiQ2fGfoCl+x6l9lsczVLAGw=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 httpx
32 ];
33
34 nativeCheckInputs = [
35 pytest-asyncio
36 pytest-httpx
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "luftdaten" ];
41
42 meta = with lib; {
43 description = "Python API for interacting with luftdaten.info";
44 homepage = "https://github.com/home-assistant-ecosystem/python-luftdaten";
45 license = licenses.mit;
46 maintainers = with maintainers; [ dotlambda fab ];
47 };
48}