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 pythonImportsCheck = [
43 "pytautulli"
44 ];
45
46 meta = with lib; {
47 description = "Python module to get information from Tautulli";
48 homepage = "https://github.com/ludeeus/pytautulli";
49 license = with licenses; [ mit ];
50 maintainers = with maintainers; [ fab ];
51 };
52}