1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchFromGitHub 5, fetchpatch 6, importlib-metadata 7, poetry-core 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "freebox-api"; 14 version = "0.0.10"; 15 format = "pyproject"; 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "hacf-fr"; 20 repo = pname; 21 rev = "v${version}"; 22 sha256 = "sha256-yUcHdSHSgWxZl0z7Ue0MestvGhiXkDsxArNoDk0ZkR4="; 23 }; 24 25 patches = [ 26 # Switch to poetry-core, https://github.com/hacf-fr/freebox-api/pull/187 27 (fetchpatch { 28 name = "switch-to-poetry-core.patch"; 29 url = "https://github.com/hacf-fr/freebox-api/commit/07356ac65483bc24fb1ed32612e77f2c2eed0134.patch"; 30 sha256 = "1zwricrwsqy01pmhrjy41gh4kxb3gki8z8yxlpywd66y7gid547r"; 31 }) 32 ]; 33 34 nativeBuildInputs = [ 35 poetry-core 36 ]; 37 38 propagatedBuildInputs = [ 39 aiohttp 40 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 41 42 checkInputs = [ 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "freebox_api" ]; 47 48 meta = with lib; { 49 description = "Python module to interact with the Freebox OS API"; 50 homepage = "https://github.com/hacf-fr/freebox-api"; 51 license = with licenses; [ gpl3Only ]; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}