nixpkgs/pkgs/servers/tautulli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.4 KiB
Nix
Raw Normal View History

2021-06-03 19:55:15 +03:00
{ lib, fetchFromGitHub, buildPythonApplication, setuptools, wrapPython, makeWrapper }:
2020-11-21 17:50:37 +03:00
buildPythonApplication rec {
pname = "Tautulli";
2023-08-31 02:11:46 +03:00
version = "2.13.1";
2020-11-21 17:50:37 +03:00
format = "other";
2020-11-21 17:50:37 +03:00
pythonPath = [ setuptools ];
nativeBuildInputs = [ wrapPython makeWrapper ];
src = fetchFromGitHub {
owner = "Tautulli";
repo = pname;
rev = "v${version}";
2023-08-31 02:11:46 +03:00
sha256 = "sha256-+uVBvtwMJRqPWJKQ0Tn9wLiuR02Btsbxd9+rl9tAlgg=";
};
installPhase = ''
runHook preInstall
2020-11-21 17:50:37 +03:00
mkdir -p $out/bin $out/libexec/tautulli
cp -R contrib data lib plexpy Tautulli.py CHANGELOG.md $out/libexec/tautulli
echo "master" > $out/libexec/tautulli/branch.txt
echo "v${version}" > $out/libexec/tautulli/version.txt
# Can't just symlink to the main script, since it uses __file__ to
# import bundled packages and manage the service
2020-11-21 17:50:37 +03: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
runHook postInstall
2020-11-21 17:50:37 +03:00
'';
checkPhase = ''
runHook preCheck
$out/bin/tautulli --help
2020-11-21 17:50:37 +03:00
runHook postCheck
'';
2020-11-21 17:50:37 +03:00
meta = with lib; {
description = "A Python based monitoring and tracking tool for Plex Media Server";
2020-03-12 12:23:24 +03:00
homepage = "https://tautulli.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
2022-12-27 03:40:06 +03:00
maintainers = with maintainers; [ rhoriguchi ];
};
}