1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchFromGitHub 5, pytest-aiohttp 6, pytestCheckHook 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "moonraker-api"; 12 version = "2.0.5"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.8"; 16 17 src = fetchFromGitHub { 18 owner = "cmroche"; 19 repo = pname; 20 rev = "v${version}"; 21 sha256 = "sha256-PgFsXmdAmHXK0wZ6xLTu94RdME1L2H1Mb6V+qFlGXSk="; 22 }; 23 24 postPatch = '' 25 # see comment on https://github.com/cmroche/moonraker-api/commit/e5ca8ab60d2839e150a81182fbe65255d84b4e4e 26 substituteInPlace setup.py \ 27 --replace 'name="moonraker-api",' 'name="moonraker-api",version="${version}",' 28 ''; 29 30 propagatedBuildInputs = [ 31 aiohttp 32 ]; 33 34 checkInputs = [ 35 pytest-aiohttp 36 pytestCheckHook 37 ]; 38 39 pythonImportsCheck = [ 40 "moonraker_api" 41 ]; 42 43 meta = with lib; { 44 description = "Python API for the Moonraker API"; 45 homepage = "https://github.com/cmroche/moonraker-api"; 46 license = with licenses; [ gpl3Only ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}