1{
2 lib,
3 aiohttp,
4 aresponses,
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 = "vehicle";
20 version = "2.2.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.11";
24
25 src = fetchFromGitHub {
26 owner = "frenck";
27 repo = "python-vehicle";
28 tag = "v${version}";
29 hash = "sha256-MPK5Aim/kGXLMOapttkp5ygl8gIlHv0675sBBf6kyAA=";
30 };
31
32 postPatch = ''
33 # Upstream doesn't set a version for the pyproject.toml
34 substituteInPlace pyproject.toml \
35 --replace "0.0.0" "${version}" \
36 '';
37
38 build-system = [ poetry-core ];
39
40 dependencies = [
41 aiohttp
42 mashumaro
43 orjson
44 yarl
45 ];
46
47 nativeCheckInputs = [
48 aresponses
49 pytest-asyncio
50 pytest-cov-stub
51 pytestCheckHook
52 syrupy
53 ];
54
55 pythonImportsCheck = [ "vehicle" ];
56
57 meta = with lib; {
58 description = "Python client providing RDW vehicle information";
59 homepage = "https://github.com/frenck/python-vehicle";
60 changelog = "https://github.com/frenck/python-vehicle/releases/tag/v${version}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ fab ];
63 };
64}