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