nixpkgs-suyu/pkgs/servers/tautulli/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2020-11-21 15:50:37 +01:00
{ lib, fetchFromGitHub, python, buildPythonApplication, bash, setuptools, wrapPython, makeWrapper }:
2020-11-21 15:50:37 +01:00
buildPythonApplication rec {
pname = "Tautulli";
2021-03-09 23:15:39 +01:00
version = "2.6.8";
2020-11-21 15:50:37 +01:00
format = "other";
2020-11-21 15:50:37 +01:00
pythonPath = [ setuptools ];
nativeBuildInputs = [ wrapPython makeWrapper ];
src = fetchFromGitHub {
owner = "Tautulli";
repo = pname;
rev = "v${version}";
2021-03-09 23:15:39 +01:00
sha256 = "0pkki72maxnrp3frninw2qbxyf76rvkza23k3s8fppandkr7qpvj";
};
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
# 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"
# 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
2020-11-21 15:50:37 +01:00
runHook postCheck
'';
2020-11-21 15:50:37 +01:00
meta = with lib; {
description = "A Python based monitoring and tracking tool for Plex Media Server";
2020-03-12 10:23:24 +01:00
homepage = "https://tautulli.com/";
license = licenses.gpl3;
platforms = platforms.linux;
2020-11-21 15:50:37 +01:00
maintainers = with maintainers; [ csingley ];
};
}