diff options
author | Pascal Bach <pascal.bach@nextrem.ch> | 2019-02-28 19:07:00 +0100 |
---|---|---|
committer | Pascal Bach <pascal.bach@nextrem.ch> | 2019-02-28 19:07:00 +0100 |
commit | 8b3ffebcdcaf169854b953541a12d0fc075102ea (patch) | |
tree | f44cf5df74705fdaa2d24bd8239b9014bcc896e3 /pkgs/servers/tautulli/default.nix | |
parent | 51c897c37d86240b774e0c00ca44b51db9281dcb (diff) | |
download | nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar.gz nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar.bz2 nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar.lz nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar.xz nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.tar.zst nixpkgs-8b3ffebcdcaf169854b953541a12d0fc075102ea.zip |
tautulli/plexpy: 1.4.25 -> 2.1.26 (renamed)
PlexPy was renamed to Tautulli. This renames the module as well as the application accordingly. Aliases are kept for backwards compatibility. # Conflicts: # nixos/modules/services/misc/tautulli.nix
Diffstat (limited to 'pkgs/servers/tautulli/default.nix')
-rw-r--r-- | pkgs/servers/tautulli/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/servers/tautulli/default.nix b/pkgs/servers/tautulli/default.nix new file mode 100644 index 00000000000..5dcd958b799 --- /dev/null +++ b/pkgs/servers/tautulli/default.nix @@ -0,0 +1,55 @@ +{stdenv, fetchFromGitHub, python }: + +stdenv.mkDerivation rec { + version = "2.1.26"; + pname = "Tautulli"; + name = "${pname}-${version}"; + + pythonPath = [ python.pkgs.setuptools ]; + buildInputs = [ python.pkgs.setuptools ]; + nativeBuildInputs = [ python.pkgs.wrapPython ]; + + src = fetchFromGitHub { + owner = "Tautulli"; + repo = pname; + rev = "v${version}"; + sha256 = "1gq13dazbqbzdb0wfw87maprr9nva357zdj8x0lfrbasi3h5522q"; + }; + + buildPhase = ":"; + + installPhase = '' + mkdir -p $out + cp -R * $out/ + + # 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 + # import bundled packages and manage the service + echo "#!/bin/bash" > $out/bin/tautulli + echo "$out/Tautulli.py \$*" >> $out/bin/tautulli + chmod +x $out/bin/tautulli + + # Creat backwards compatibility symlink to bin/plexpy + ln -s $out/bin/tautulli $out/bin/plexpy + + wrapPythonProgramsIn "$out" "$out $pythonPath" + ''; + + meta = with stdenv.lib; { + description = "A Python based monitoring and tracking tool for Plex Media Server."; + homepage = https://tautulli.com/; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with stdenv.lib.maintainers; [ csingley ]; + }; +} |