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