tautulli: 2.2.4 -> 2.6.1
This commit is contained in:
parent
186c1e760b
commit
fdad84f092
|
@ -1,54 +1,48 @@
|
||||||
{stdenv, fetchFromGitHub, python }:
|
{ lib, fetchFromGitHub, python, buildPythonApplication, bash, setuptools, wrapPython, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPythonApplication rec {
|
||||||
version = "2.2.4";
|
|
||||||
pname = "Tautulli";
|
pname = "Tautulli";
|
||||||
|
version = "2.6.1";
|
||||||
|
format = "other";
|
||||||
|
|
||||||
pythonPath = [ python.pkgs.setuptools ];
|
pythonPath = [ setuptools ];
|
||||||
buildInputs = [ python.pkgs.setuptools ];
|
nativeBuildInputs = [ wrapPython makeWrapper ];
|
||||||
nativeBuildInputs = [ python.pkgs.wrapPython ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Tautulli";
|
owner = "Tautulli";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0yg7r7yscx6jbs1lnl9nbax3v9r6ppvhr4igdm3gbvd2803j8fs7";
|
sha256 = "QHpVIOtGFzNqAEcBCv48YWO4pYatbTe/CWwcwjbj+34=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildPhase = ":";
|
doBuild = false;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out/bin $out/libexec/tautulli
|
||||||
cp -R * $out/
|
cp -R contrib data lib plexpy Tautulli.py $out/libexec/tautulli
|
||||||
|
|
||||||
# Remove the PlexPy.py compatibility file as it won't work after wrapping.
|
|
||||||
# We still have the plexpy executable in bin for compatibility.
|
|
||||||
rm $out/PlexPy.py
|
|
||||||
|
|
||||||
# Remove superfluous Python checks from main script;
|
|
||||||
# prepend shebang
|
|
||||||
echo "#!${python.interpreter}" > $out/Tautulli.py
|
|
||||||
tail -n +7 Tautulli.py >> $out/Tautulli.py
|
|
||||||
|
|
||||||
|
|
||||||
mkdir $out/bin
|
|
||||||
# Can't just symlink to the main script, since it uses __file__ to
|
# Can't just symlink to the main script, since it uses __file__ to
|
||||||
# import bundled packages and manage the service
|
# import bundled packages and manage the service
|
||||||
echo "#!/bin/bash" > $out/bin/tautulli
|
makeWrapper $out/libexec/tautulli/Tautulli.py $out/bin/tautulli
|
||||||
echo "$out/Tautulli.py \$*" >> $out/bin/tautulli
|
wrapPythonProgramsIn "$out/libexec/tautulli" "$pythonPath"
|
||||||
chmod +x $out/bin/tautulli
|
|
||||||
|
|
||||||
# Creat backwards compatibility symlink to bin/plexpy
|
# Creat backwards compatibility symlink to bin/plexpy
|
||||||
ln -s $out/bin/tautulli $out/bin/plexpy
|
ln -s $out/bin/tautulli $out/bin/plexpy
|
||||||
|
|
||||||
wrapPythonProgramsIn "$out" "$out $pythonPath"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
|
$out/bin/tautulli --help
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "A Python based monitoring and tracking tool for Plex Media Server";
|
description = "A Python based monitoring and tracking tool for Plex Media Server";
|
||||||
homepage = "https://tautulli.com/";
|
homepage = "https://tautulli.com/";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with stdenv.lib.maintainers; [ csingley ];
|
maintainers = with maintainers; [ csingley ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6507,7 +6507,7 @@ in
|
||||||
|
|
||||||
tab = callPackage ../tools/text/tab { };
|
tab = callPackage ../tools/text/tab { };
|
||||||
|
|
||||||
tautulli = callPackage ../servers/tautulli { python = python2; };
|
tautulli = python3Packages.callPackage ../servers/tautulli { };
|
||||||
|
|
||||||
ploticus = callPackage ../tools/graphics/ploticus {
|
ploticus = callPackage ../tools/graphics/ploticus {
|
||||||
libpng = libpng12;
|
libpng = libpng12;
|
||||||
|
|
Loading…
Reference in a new issue