2021-09-05 01:24:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, python3Packages
|
|
|
|
, ffmpeg
|
|
|
|
, flac
|
2022-05-22 00:13:26 +00:00
|
|
|
, libjxl
|
2022-02-05 18:44:11 +00:00
|
|
|
, librsvg
|
2021-09-05 01:24:45 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
2022-07-28 21:24:20 +00:00
|
|
|
, kissfft
|
2021-09-05 01:24:45 +00:00
|
|
|
, libnotify
|
|
|
|
, libsamplerate
|
|
|
|
, libvorbis
|
2022-07-28 21:24:20 +00:00
|
|
|
, miniaudio
|
2021-09-05 01:24:45 +00:00
|
|
|
, mpg123
|
|
|
|
, libopenmpt
|
|
|
|
, opusfile
|
2022-05-22 00:13:26 +00:00
|
|
|
, wavpack
|
2021-09-05 01:24:45 +00:00
|
|
|
, pango
|
|
|
|
, pulseaudio
|
2021-09-21 19:09:49 +00:00
|
|
|
, withDiscordRPC ? false
|
2021-09-05 01:24:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tauon";
|
2023-02-17 18:27:38 +00:00
|
|
|
version = "7.5.0";
|
2021-09-05 01:24:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Taiko2k";
|
|
|
|
repo = "TauonMusicBox";
|
|
|
|
rev = "v${version}";
|
2023-02-17 18:27:38 +00:00
|
|
|
hash = "sha256-9/mzh8lRBjd7d9oEyG1XGWmOdgPEFCVjHZxDnAhYDwc=";
|
2021-09-05 01:24:45 +00:00
|
|
|
};
|
|
|
|
|
2022-07-28 21:24:20 +00:00
|
|
|
postUnpack = ''
|
|
|
|
rmdir source/src/phazor/kissfft
|
|
|
|
ln -s ${kissfft.src} source/src/phazor/kissfft
|
|
|
|
|
|
|
|
rmdir source/src/phazor/miniaudio
|
|
|
|
ln -s ${miniaudio.src} source/src/phazor/miniaudio
|
|
|
|
'';
|
|
|
|
|
2021-09-05 01:24:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tauon.py \
|
|
|
|
--replace 'install_mode = False' 'install_mode = True' \
|
2022-02-05 18:44:11 +00:00
|
|
|
--replace 'install_directory = os.path.dirname(os.path.abspath(__file__))' 'install_directory = "${placeholder "out"}/share/tauon"'
|
2021-09-05 01:24:45 +00:00
|
|
|
|
|
|
|
substituteInPlace t_modules/t_main.py \
|
|
|
|
--replace 'install_mode = False' 'install_mode = True' \
|
|
|
|
--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
|
2022-02-06 13:44:34 +00:00
|
|
|
|
|
|
|
substituteInPlace extra/tauonmb.desktop --replace 'Exec=/opt/tauon-music-box/tauonmb.sh' 'Exec=${placeholder "out"}/bin/tauon'
|
2021-09-05 01:24:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
./compile-phazor.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
python3Packages.wrapPython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
flac
|
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
libopenmpt
|
2022-02-05 18:44:11 +00:00
|
|
|
librsvg
|
2021-09-05 01:24:45 +00:00
|
|
|
libsamplerate
|
|
|
|
libvorbis
|
|
|
|
mpg123
|
|
|
|
opusfile
|
|
|
|
pango
|
2022-05-22 00:13:26 +00:00
|
|
|
wavpack
|
2021-09-05 01:24:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = with python3Packages; [
|
2022-02-05 18:44:11 +00:00
|
|
|
beautifulsoup4
|
|
|
|
gst-python
|
2021-09-05 01:24:45 +00:00
|
|
|
dbus-python
|
|
|
|
isounidecode
|
2022-05-22 00:13:26 +00:00
|
|
|
libjxl
|
2021-09-05 01:24:45 +00:00
|
|
|
musicbrainzngs
|
|
|
|
mutagen
|
2022-05-22 00:13:26 +00:00
|
|
|
natsort
|
2021-09-05 01:24:45 +00:00
|
|
|
pillow
|
2022-02-05 18:44:11 +00:00
|
|
|
plexapi
|
2021-09-05 01:24:45 +00:00
|
|
|
pulsectl
|
|
|
|
pycairo
|
2022-05-22 00:13:26 +00:00
|
|
|
PyChromecast
|
2021-09-05 01:24:45 +00:00
|
|
|
pylast
|
|
|
|
pygobject3
|
|
|
|
pylyrics
|
|
|
|
pysdl2
|
|
|
|
requests
|
|
|
|
send2trash
|
2022-02-05 18:44:11 +00:00
|
|
|
setproctitle
|
2021-09-21 19:09:49 +00:00
|
|
|
] ++ lib.optional withDiscordRPC pypresence;
|
2021-09-05 01:24:45 +00:00
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix PATH : ${lib.makeBinPath [ffmpeg]}"
|
2022-07-12 22:03:36 +00:00
|
|
|
"--prefix LD_LIBRARY_PATH : ${pulseaudio}/lib"
|
2021-09-05 01:24:45 +00:00
|
|
|
"--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
|
2022-08-27 05:05:44 +00:00
|
|
|
cp -r assets input.txt t_modules theme templates $out/share/tauon
|
2021-09-05 01:24:45 +00:00
|
|
|
|
|
|
|
wrapPythonPrograms
|
2022-02-06 13:44:34 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
install -Dm755 extra/tauonmb.desktop $out/share/applications/tauonmb.desktop
|
|
|
|
mkdir -p $out/share/icons/hicolor/scalable/apps
|
|
|
|
install -Dm644 extra/tauonmb{,-symbolic}.svg $out/share/icons/hicolor/scalable/apps
|
2022-07-12 22:03:36 +00:00
|
|
|
'';
|
2021-09-05 01:24:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Linux desktop music player from the future";
|
|
|
|
homepage = "https://tauonmusicbox.rocks/";
|
2022-11-26 19:12:01 +00:00
|
|
|
changelog = "https://github.com/Taiko2k/TauonMusicBox/releases/tag/v${version}";
|
2021-09-05 01:24:45 +00:00
|
|
|
license = licenses.gpl3;
|
2022-10-01 21:11:31 +00:00
|
|
|
maintainers = with maintainers; [ jansol ];
|
2021-09-05 01:24:45 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|