depot/third_party/nixpkgs/pkgs/development/python-modules/pytautulli/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

60 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pytautulli";
version = "23.1.1";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ludeeus";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-5wE8FjLFu1oQkVqnWsbp253dsQ1/QGWC6hHSIFwLajY=";
};
postPatch = ''
# Upstream is releasing with the help of a CI to PyPI, GitHub releases
# are not in their focus
substituteInPlace setup.py \
--replace 'version="main",' 'version="${version}",'
'';
propagatedBuildInputs = [
aiohttp
];
nativeCheckInputs = [
pytestCheckHook
];
checkInputs = [
aresponses
pytest-asyncio
];
pytestFlagsArray = [
"--asyncio-mode=auto"
];
pythonImportsCheck = [
"pytautulli"
];
meta = with lib; {
description = "Python module to get information from Tautulli";
homepage = "https://github.com/ludeeus/pytautulli";
changelog = "https://github.com/ludeeus/pytautulli/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}