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