1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 mashumaro,
8 orjson,
9 poetry-core,
10 pytest-asyncio,
11 pytestCheckHook,
12 pythonOlder,
13 syrupy,
14 yarl,
15}:
16
17buildPythonPackage rec {
18 pname = "aiotankerkoenig";
19 version = "0.4.1";
20 pyproject = true;
21
22 disabled = pythonOlder "3.11";
23
24 src = fetchFromGitHub {
25 owner = "jpbede";
26 repo = "aiotankerkoenig";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-BB1Cy4Aji5m06LlNj03as4CWF8RcYKAYy4oxPomOP68=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace-fail "--cov" ""
34 '';
35
36 nativeBuildInputs = [ poetry-core ];
37
38 propagatedBuildInputs = [
39 aiohttp
40 mashumaro
41 orjson
42 yarl
43 ];
44
45 nativeCheckInputs = [
46 aioresponses
47 pytest-asyncio
48 pytestCheckHook
49 syrupy
50 ];
51
52 pythonImportsCheck = [ "aiotankerkoenig" ];
53
54 meta = with lib; {
55 description = "Python module for interacting with tankerkoenig.de";
56 homepage = "https://github.com/jpbede/aiotankerkoenig";
57 changelog = "https://github.com/jpbede/aiotankerkoenig/releases/tag/v${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61}