2021-06-04 09:07:49 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonApplication, setuptools, wrapPython, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "Tautulli";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "2.7.7";
|
2020-11-30 08:33:03 +00:00
|
|
|
format = "other";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
pythonPath = [ setuptools ];
|
|
|
|
nativeBuildInputs = [ wrapPython makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tautulli";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "03zqpffc0hc8lrnc9m9562lh154bv3cnfw0n5x7j4wqr2jp5kb2h";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-11-30 08:33:03 +00:00
|
|
|
mkdir -p $out/bin $out/libexec/tautulli
|
|
|
|
cp -R contrib data lib plexpy Tautulli.py $out/libexec/tautulli
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Can't just symlink to the main script, since it uses __file__ to
|
|
|
|
# import bundled packages and manage the service
|
2020-11-30 08:33:03 +00:00
|
|
|
makeWrapper $out/libexec/tautulli/Tautulli.py $out/bin/tautulli
|
|
|
|
wrapPythonProgramsIn "$out/libexec/tautulli" "$pythonPath"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Creat backwards compatibility symlink to bin/plexpy
|
|
|
|
ln -s $out/bin/tautulli $out/bin/plexpy
|
2020-11-30 08:33:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
$out/bin/tautulli --help
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "A Python based monitoring and tracking tool for Plex Media Server";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://tautulli.com/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-11-30 08:33:03 +00:00
|
|
|
maintainers = with maintainers; [ csingley ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|