at master 63 lines 1.5 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonApplication, 5 setuptools, 6 wrapPython, 7 makeWrapper, 8}: 9 10buildPythonApplication rec { 11 pname = "Tautulli"; 12 version = "2.16.0"; 13 format = "other"; 14 15 pythonPath = [ setuptools ]; 16 nativeBuildInputs = [ 17 wrapPython 18 makeWrapper 19 ]; 20 21 src = fetchFromGitHub { 22 owner = "Tautulli"; 23 repo = pname; 24 tag = "v${version}"; 25 sha256 = "sha256-nqSqWRst+gx9aZ2Ko+/tKzpQX7wuU4Bn3vLR5F87aJA="; 26 }; 27 28 installPhase = '' 29 runHook preInstall 30 31 mkdir -p $out/bin $out/libexec/tautulli 32 cp -R contrib data lib plexpy Tautulli.py CHANGELOG.md $out/libexec/tautulli 33 34 echo "master" > $out/libexec/tautulli/branch.txt 35 echo "v${version}" > $out/libexec/tautulli/version.txt 36 37 # Can't just symlink to the main script, since it uses __file__ to 38 # import bundled packages and manage the service 39 makeWrapper $out/libexec/tautulli/Tautulli.py $out/bin/tautulli 40 wrapPythonProgramsIn "$out/libexec/tautulli" "$pythonPath" 41 42 # Creat backwards compatibility symlink to bin/plexpy 43 ln -s $out/bin/tautulli $out/bin/plexpy 44 45 runHook postInstall 46 ''; 47 48 checkPhase = '' 49 runHook preCheck 50 51 $out/bin/tautulli --help 52 53 runHook postCheck 54 ''; 55 56 meta = with lib; { 57 description = "Python based monitoring and tracking tool for Plex Media Server"; 58 homepage = "https://tautulli.com/"; 59 license = licenses.gpl3Plus; 60 platforms = platforms.linux; 61 maintainers = with maintainers; [ rhoriguchi ]; 62 }; 63}