1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 aiohttp,
7 aiohttp-retry,
8 pythonOlder,
9 pyjwt,
10}:
11
12buildPythonPackage rec {
13 pname = "apple-weatherkit";
14 version = "1.1.2";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.11";
18
19 src = fetchFromGitHub {
20 owner = "tjhorner";
21 repo = "python-weatherkit";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-w3KinicaF01I6fIidI7XYHpB8eq52RTUw/BMLrx6Grk=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 aiohttp
30 aiohttp-retry
31 pyjwt
32 ] ++ pyjwt.optional-dependencies.crypto;
33
34 # Module has no tests
35 doCheck = false;
36
37 pythonImportsCheck = [ "apple_weatherkit" ];
38
39 meta = with lib; {
40 description = "Python library for Apple WeatherKit";
41 homepage = "https://github.com/tjhorner/python-weatherkit";
42 changelog = "https://github.com/tjhorner/python-weatherkit/releases/tag/v${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ fab ];
45 };
46}