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 = "23.1.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "ludeeus"; 20 repo = pname; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-5wE8FjLFu1oQkVqnWsbp253dsQ1/QGWC6hHSIFwLajY="; 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 nativeCheckInputs = [ 37 pytestCheckHook 38 ]; 39 40 checkInputs = [ 41 aresponses 42 pytest-asyncio 43 ]; 44 45 pytestFlagsArray = [ 46 "--asyncio-mode=auto" 47 ]; 48 49 pythonImportsCheck = [ 50 "pytautulli" 51 ]; 52 53 meta = with lib; { 54 description = "Python module to get information from Tautulli"; 55 homepage = "https://github.com/ludeeus/pytautulli"; 56 changelog = "https://github.com/ludeeus/pytautulli/releases/tag/${version}"; 57 license = with licenses; [ mit ]; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}