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