about summary refs log tree commit diff
path: root/pkgs/applications/audio/tauon/default.nix
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-09-05 03:24:45 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-09-08 02:27:00 +0200
commit76a0ad1833645fe89783701376c1e040e9ebed78 (patch)
tree958bbe50ed77edaad0d645f486df2c46397d36da /pkgs/applications/audio/tauon/default.nix
parent7d23657cf3732072652707a307f3660dd0c90dab (diff)
tauon: init at 6.7.1
Diffstat (limited to 'pkgs/applications/audio/tauon/default.nix')
-rw-r--r--pkgs/applications/audio/tauon/default.nix109
1 files changed, 109 insertions, 0 deletions
diff --git a/pkgs/applications/audio/tauon/default.nix b/pkgs/applications/audio/tauon/default.nix
new file mode 100644
index 0000000000000..530c41ab92205
--- /dev/null
+++ b/pkgs/applications/audio/tauon/default.nix
@@ -0,0 +1,109 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, python3Packages
+, ffmpeg
+, flac
+, gobject-introspection
+, gtk3
+, libnotify
+, libsamplerate
+, libvorbis
+, mpg123
+, libopenmpt
+, opusfile
+, pango
+, pulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tauon";
+  version = "6.7.1";
+
+  src = fetchFromGitHub {
+    owner = "Taiko2k";
+    repo = "TauonMusicBox";
+    rev = "v${version}";
+    sha256 = "1hm82yfq7q2akrrvff3vmwrd3bz34d2dk8jzhnizhnhar6xc6fzp";
+  };
+
+  postPatch = ''
+    substituteInPlace tauon.py \
+      --replace 'install_mode = False' 'install_mode = True' \
+      --replace 'install_directory = os.path.dirname(__file__)' 'install_directory = "${placeholder "out"}/share/tauon"'
+
+    substituteInPlace t_modules/t_main.py \
+      --replace 'install_mode = False' 'install_mode = True' \
+      --replace 'install_directory = sys.path[0]' 'install_directory = "${placeholder "out"}/share/tauon"' \
+      --replace 'libopenmpt.so' '${lib.getLib libopenmpt}/lib/libopenmpt.so' \
+      --replace 'lib/libphazor.so' '../../lib/libphazor.so'
+
+    substituteInPlace t_modules/t_phazor.py \
+      --replace 'lib/libphazor.so' '../../lib/libphazor.so'
+
+    patchShebangs compile-phazor.sh
+  '';
+
+  postBuild = ''
+    ./compile-phazor.sh
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    python3Packages.wrapPython
+  ];
+
+  buildInputs = [
+    flac
+    gobject-introspection
+    gtk3
+    libnotify
+    libopenmpt
+    libsamplerate
+    libvorbis
+    mpg123
+    opusfile
+    pango
+    pulseaudio
+  ];
+
+  pythonPath = with python3Packages; [
+    dbus-python
+    isounidecode
+    musicbrainzngs
+    mutagen
+    pillow
+    pulsectl
+    pycairo
+    pylast
+    pygobject3
+    pylyrics
+    pysdl2
+    requests
+    send2trash
+  ];
+
+  makeWrapperArgs = [
+    "--prefix PATH : ${lib.makeBinPath [ffmpeg]}"
+    "--prefix PYTHONPATH : $out/share/tauon"
+    "--set GI_TYPELIB_PATH $GI_TYPELIB_PATH"
+  ];
+
+  installPhase = ''
+    install -Dm755 tauon.py $out/bin/tauon
+    mkdir -p $out/share/tauon
+    cp -r lib $out
+    cp -r assets input.txt t_modules theme $out/share/tauon
+
+    wrapPythonPrograms
+  '';
+
+  meta = with lib; {
+    description = "The Linux desktop music player from the future";
+    homepage = "https://tauonmusicbox.rocks/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+    platforms = platforms.linux;
+  };
+}