1 { lib, fetchFromGitHub, buildPythonApplication, setuptools, wrapPython, makeWrapper }:
3 buildPythonApplication rec {
8 pythonPath = [ setuptools ];
9 nativeBuildInputs = [ wrapPython makeWrapper ];
11 src = fetchFromGitHub {
14 rev = "refs/tags/v${version}";
15 sha256 = "sha256-QhJc4Jwxlp3yB0jWa7sRDnIOWLW8CQUupnzbUscJH+c=";
21 mkdir -p $out/bin $out/libexec/tautulli
22 cp -R contrib data lib plexpy Tautulli.py CHANGELOG.md $out/libexec/tautulli
24 echo "master" > $out/libexec/tautulli/branch.txt
25 echo "v${version}" > $out/libexec/tautulli/version.txt
27 # Can't just symlink to the main script, since it uses __file__ to
28 # import bundled packages and manage the service
29 makeWrapper $out/libexec/tautulli/Tautulli.py $out/bin/tautulli
30 wrapPythonProgramsIn "$out/libexec/tautulli" "$pythonPath"
32 # Creat backwards compatibility symlink to bin/plexpy
33 ln -s $out/bin/tautulli $out/bin/plexpy
41 $out/bin/tautulli --help
47 description = "Python based monitoring and tracking tool for Plex Media Server";
48 homepage = "https://tautulli.com/";
49 license = licenses.gpl3Plus;
50 platforms = platforms.linux;
51 maintainers = with maintainers; [ rhoriguchi ];