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