summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/apple-weatherkit/default.nix
blob: cd38737c53c5f3e8e38735c4415fbe83bea6b6f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  aiohttp,
  aiohttp-retry,
  pythonOlder,
  pyjwt,
}:

buildPythonPackage rec {
  pname = "apple-weatherkit";
  version = "1.1.3";
  pyproject = true;

  disabled = pythonOlder "3.11";

  src = fetchFromGitHub {
    owner = "tjhorner";
    repo = "python-weatherkit";
    tag = "v${version}";
    hash = "sha256-JvN8GmlTxz9VGttIFVG6q//c+BhP2pt1tBOhnJhNwJg=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    aiohttp
    aiohttp-retry
    pyjwt
  ]
  ++ pyjwt.optional-dependencies.crypto;

  # Module has no tests
  doCheck = false;

  pythonImportsCheck = [ "apple_weatherkit" ];

  meta = {
    description = "Python library for Apple WeatherKit";
    homepage = "https://github.com/tjhorner/python-weatherkit";
    changelog = "https://github.com/tjhorner/python-weatherkit/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}