1{ 2 lib, 3 aiohttp, 4 aioresponses, 5 buildPythonPackage, 6 click, 7 cryptography, 8 dateparser, 9 fetchFromGitHub, 10 marshmallow-dataclass, 11 poetry-core, 12 pyjwt, 13 pythonOlder, 14 pytest-asyncio, 15 pytestCheckHook, 16 tabulate, 17 typeguard, 18}: 19 20buildPythonPackage rec { 21 pname = "renault-api"; 22 version = "0.2.2"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "hacf-fr"; 29 repo = "renault-api"; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-FZ1VNO8gEH7HJRu9EVuKIwSQbceG720tCVqAPqHwISQ="; 32 }; 33 34 build-system = [ poetry-core ]; 35 36 propagatedBuildInputs = [ 37 aiohttp 38 cryptography 39 marshmallow-dataclass 40 pyjwt 41 ]; 42 43 dependencies = [ 44 aioresponses 45 pytest-asyncio 46 ]; 47 48 passthru.optional-dependencies = { 49 cli = [ 50 click 51 dateparser 52 tabulate 53 ]; 54 }; 55 56 nativeCheckInputs = [ 57 pytestCheckHook 58 typeguard 59 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 60 61 pytestFlagsArray = [ "--asyncio-mode=auto" ]; 62 63 pythonImportsCheck = [ "renault_api" ]; 64 65 meta = with lib; { 66 description = "Python library to interact with the Renault API"; 67 homepage = "https://github.com/hacf-fr/renault-api"; 68 changelog = "https://github.com/hacf-fr/renault-api/releases/tag/v${version}"; 69 license = licenses.mit; 70 maintainers = with maintainers; [ fab ]; 71 mainProgram = "renault-api"; 72 }; 73}