1{ lib 2, aiohttp 3, aresponses 4, buildPythonPackage 5, fetchFromGitHub 6, pytest-asyncio 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "pytautulli"; 13 version = "21.11.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "ludeeus"; 20 repo = pname; 21 rev = version; 22 sha256 = "sha256-zODU3aN+8Fdw/GQ/EfZhn6kOuLDARKgLULzRw2+b2BM="; 23 }; 24 25 postPatch = '' 26 # Upstream is releasing with the help of a CI to PyPI, GitHub releases 27 # are not in their focus 28 substituteInPlace setup.py \ 29 --replace 'version="main",' 'version="${version}",' 30 ''; 31 32 propagatedBuildInputs = [ 33 aiohttp 34 ]; 35 36 checkInputs = [ 37 aresponses 38 pytest-asyncio 39 pytestCheckHook 40 ]; 41 42 pytestFlagsArray = [ 43 "--asyncio-mode=auto" 44 ]; 45 46 pythonImportsCheck = [ 47 "pytautulli" 48 ]; 49 50 meta = with lib; { 51 description = "Python module to get information from Tautulli"; 52 homepage = "https://github.com/ludeeus/pytautulli"; 53 license = with licenses; [ mit ]; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}