1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonOlder,
9 tzdata,
10}:
11
12buildPythonPackage rec {
13 pname = "aiozoneinfo";
14 version = "0.2.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "bluetooth-devices";
21 repo = "aiozoneinfo";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-u7yQiy5xKK1A19cmpXjA4MMK4q7RvtuvwkUECnddzG8=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace-fail "--cov=aiozoneinfo --cov-report=term-missing:skip-covered" ""
29 '';
30
31 build-system = [ poetry-core ];
32
33 dependencies = [ tzdata ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "aiozoneinfo" ];
41
42 meta = with lib; {
43 description = "Tools to fetch zoneinfo with asyncio";
44 homepage = "https://github.com/bluetooth-devices/aiozoneinfo";
45 changelog = "https://github.com/bluetooth-devices/aiozoneinfo/blob/${version}/CHANGELOG.md";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}