Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pytautulli / default.nix
blob5d2c51675c43bbcb4d4e9467bff4432cc60ff2ab
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , pytest-asyncio
7 , pytestCheckHook
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "pytautulli";
13   version = "23.1.1";
14   format = "setuptools";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "ludeeus";
20     repo = pname;
21     rev = "refs/tags/${version}";
22     hash = "sha256-5wE8FjLFu1oQkVqnWsbp253dsQ1/QGWC6hHSIFwLajY=";
23   };
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   '';
32   propagatedBuildInputs = [
33     aiohttp
34   ];
36   nativeCheckInputs = [
37     pytestCheckHook
38   ];
40   checkInputs = [
41     aresponses
42     pytest-asyncio
43   ];
45   pytestFlagsArray = [
46     "--asyncio-mode=auto"
47   ];
49   pythonImportsCheck = [
50     "pytautulli"
51   ];
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   };