14 withJack ? stdenv.hostPlatform.isUnix,
19 char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str;
25 src = fetchFromGitHub {
28 rev = "${char2underscore "-" pname}_${char2underscore "." version}";
29 sha256 = "sha256-PqYPYnKPlnU3PByxksBscl4GqDRllQdmD6RWpy/Ura0=";
33 sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt
48 ++ lib.optionals stdenv.hostPlatform.isLinux [
52 ++ lib.optional withJack libjack2;
57 "-Dmt32emu-qt_USE_PULSEAUDIO_DYNAMIC_LOADING=OFF"
58 "-Dmunt_WITH_MT32EMU_QT=ON"
59 "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF"
62 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
63 mkdir $out/Applications
64 mv $out/bin/${pname}.app $out/Applications/
65 ln -s $out/{Applications/${pname}.app/Contents/MacOS,bin}/${pname}
69 homepage = "https://munt.sourceforge.net/";
70 description = "Synthesizer application built on Qt and libmt32emu";
71 mainProgram = "mt32emu-qt";
73 mt32emu-qt is a synthesiser application that facilitates both realtime
74 synthesis and conversion of pre-recorded SMF files to WAVE making use of
75 the mt32emu library and the Qt framework.
77 license = with licenses; [ gpl3Plus ];
78 maintainers = with maintainers; [ OPNA2608 ];
79 platforms = platforms.all;