diff options
author | Christopher Singley <csingley@gmail.com> | 2017-10-29 19:28:16 -0500 |
---|---|---|
committer | Christopher Singley <csingley@gmail.com> | 2017-10-29 19:28:16 -0500 |
commit | e697f10fc4e5343c9fc3c253efb910fecb6f84da (patch) | |
tree | 49c66a2c5ac3cdf0efcb8b3a5b32161fbda57cde /pkgs/servers | |
parent | 14291c2723aaa0c3d369258e5b47ad40b2382133 (diff) |
PlexPy: init at 1.4.25
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/plexpy/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/servers/plexpy/default.nix b/pkgs/servers/plexpy/default.nix new file mode 100644 index 0000000000000..2875ecc524046 --- /dev/null +++ b/pkgs/servers/plexpy/default.nix @@ -0,0 +1,41 @@ +{stdenv, fetchFromGitHub, python}: + +stdenv.mkDerivation rec { + version = "1.4.25"; + pname = "plexpy"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "JonnyWong16"; + repo = pname; + rev = "v${version}"; + sha256 = "0a4ynrfamlwkgqil4n61v47p21czxpjdzg0mias4kdjam2nnwnjx"; + }; + + buildPhase = ":"; + + installPhase = '' + mkdir -p $out + cp -R * $out/ + + # Remove superfluous Python checks from main script; + # prepend shebang + echo "#!${python.interpreter}" > $out/PlexPy.py + tail -n +7 PlexPy.py >> $out/PlexPy.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/plexpy + echo "$out/PlexPy.py \$*" >> $out/bin/plexpy + chmod +x $out/bin/plexpy + ''; + + meta = with stdenv.lib; { + description = "A Python based monitoring and tracking tool for Plex Media Server."; + homepage = http://jonnywong16.github.io/plexpy/; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with stdenv.lib.maintainers; [ csingley ]; + }; +} |