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