2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
kissfft,
|
|
|
|
miniaudio,
|
|
|
|
pkg-config,
|
|
|
|
python3Packages,
|
|
|
|
gobject-introspection,
|
|
|
|
flac,
|
|
|
|
game-music-emu,
|
|
|
|
gtk3,
|
|
|
|
libappindicator,
|
|
|
|
libnotify,
|
|
|
|
libopenmpt,
|
|
|
|
librsvg,
|
|
|
|
libsamplerate,
|
|
|
|
libvorbis,
|
|
|
|
mpg123,
|
|
|
|
opusfile,
|
|
|
|
pango,
|
|
|
|
pipewire,
|
|
|
|
wavpack,
|
|
|
|
ffmpeg,
|
|
|
|
pulseaudio,
|
|
|
|
withDiscordRPC ? true,
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "tauon";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "7.8.3";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Taiko2k";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "Tauon";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-A7JRJ0Eh0ynuwPYZFLEeqWLf6OKdN59jM2vozdpSZC8=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +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-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tauon.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail 'install_mode = False' 'install_mode = True' \
|
|
|
|
--replace-fail 'install_directory = os.path.dirname(os.path.abspath(__file__))' 'install_directory = "${placeholder "out"}/share/tauon"'
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
substituteInPlace t_modules/t_main.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail 'install_mode = False' 'install_mode = True' \
|
|
|
|
--replace-fail 'libopenmpt.so' '${lib.getLib libopenmpt}/lib/libopenmpt.so'
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
substituteInPlace t_modules/t_phazor.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail 'lib/libphazor' '../../lib/libphazor'
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
substituteInPlace compile-phazor*.sh --replace-fail 'gcc' '${stdenv.cc.targetPrefix}cc'
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
substituteInPlace extra/tauonmb.desktop --replace-fail 'Exec=/opt/tauon-music-box/tauonmb.sh' 'Exec=${placeholder "out"}/bin/tauon'
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
2024-09-19 14:19:46 +00:00
|
|
|
bash ./compile-phazor.sh
|
|
|
|
bash ./compile-phazor-pipewire.sh
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
python3Packages.wrapPython
|
2023-08-10 07:59:29 +00:00
|
|
|
gobject-introspection
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
flac
|
2024-07-27 06:49:29 +00:00
|
|
|
game-music-emu
|
2021-09-18 10:52:07 +00:00
|
|
|
gtk3
|
2023-07-15 17:15:38 +00:00
|
|
|
libappindicator
|
2021-09-18 10:52:07 +00:00
|
|
|
libnotify
|
|
|
|
libopenmpt
|
2022-02-10 20:34:41 +00:00
|
|
|
librsvg
|
2021-09-18 10:52:07 +00:00
|
|
|
libsamplerate
|
|
|
|
libvorbis
|
|
|
|
mpg123
|
|
|
|
opusfile
|
|
|
|
pango
|
2024-09-19 14:19:46 +00:00
|
|
|
pipewire
|
2022-06-16 17:23:12 +00:00
|
|
|
wavpack
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonPath =
|
|
|
|
with python3Packages;
|
|
|
|
[
|
|
|
|
beautifulsoup4
|
|
|
|
dbus-python
|
|
|
|
unidecode
|
|
|
|
jxlpy
|
|
|
|
musicbrainzngs
|
|
|
|
mutagen
|
|
|
|
natsort
|
|
|
|
pillow
|
|
|
|
plexapi
|
|
|
|
pycairo
|
|
|
|
pychromecast
|
|
|
|
pylast
|
|
|
|
pygobject3
|
|
|
|
pysdl2
|
|
|
|
requests
|
|
|
|
send2trash
|
|
|
|
setproctitle
|
|
|
|
]
|
|
|
|
++ lib.optional withDiscordRPC pypresence
|
2023-04-29 16:46:19 +00:00
|
|
|
++ lib.optional stdenv.isLinux pulsectl;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
"--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
|
|
|
|
"--prefix LD_LIBRARY_PATH : ${
|
|
|
|
lib.makeLibraryPath [
|
|
|
|
game-music-emu
|
|
|
|
pulseaudio
|
|
|
|
]
|
|
|
|
}"
|
2021-09-18 10:52:07 +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-09-09 14:08:57 +00:00
|
|
|
cp -r assets input.txt t_modules theme templates $out/share/tauon
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
wrapPythonPrograms
|
2022-02-10 20:34:41 +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-18 16:21:45 +00:00
|
|
|
'';
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Linux desktop music player from the future";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "tauon";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://tauonmusicbox.rocks/";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/Taiko2k/TauonMusicBox/releases/tag/v${finalAttrs.version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.gpl3;
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ jansol ];
|
2023-04-29 16:46:19 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
})
|