1{ 2 lib, 3 buildPythonPackage, 4 click, 5 defusedxml, 6 fetchFromGitHub, 7 httpx, 8 mashumaro, 9 poetry-core, 10 pytest-asyncio, 11 pytestCheckHook, 12 pythonOlder, 13 respx, 14}: 15 16buildPythonPackage rec { 17 pname = "sfrbox-api"; 18 version = "0.0.11"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.9"; 22 23 src = fetchFromGitHub { 24 owner = "hacf-fr"; 25 repo = "sfrbox-api"; 26 tag = "v${version}"; 27 hash = "sha256-Ec3UOserFijBK6goyM6AMOekfLgjBq8l/9sMKYnj240="; 28 }; 29 30 pythonRelaxDeps = [ 31 "defusedxml" 32 ]; 33 34 build-system = [ poetry-core ]; 35 36 dependencies = [ 37 defusedxml 38 mashumaro 39 httpx 40 ]; 41 42 optional-dependencies = { 43 cli = [ click ]; 44 }; 45 46 nativeCheckInputs = [ 47 pytest-asyncio 48 pytestCheckHook 49 respx 50 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 51 52 pythonImportsCheck = [ "sfrbox_api" ]; 53 54 meta = with lib; { 55 description = "Module for the SFR Box API"; 56 homepage = "https://github.com/hacf-fr/sfrbox-api"; 57 changelog = "https://github.com/hacf-fr/sfrbox-api/releases/tag/v${version}"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ fab ]; 60 mainProgram = "sfrbox-api"; 61 }; 62}