13 , withJack ? stdenv.hostPlatform.isUnix, libjack2
17 char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str;
23 src = fetchFromGitHub {
26 rev = "${char2underscore "-" pname}_${char2underscore "." version}";
27 sha256 = "sha256-PqYPYnKPlnU3PByxksBscl4GqDRllQdmD6RWpy/Ura0=";
31 sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt
45 ++ lib.optionals stdenv.hostPlatform.isLinux [
49 ++ lib.optional withJack libjack2;
54 "-Dmt32emu-qt_USE_PULSEAUDIO_DYNAMIC_LOADING=OFF"
55 "-Dmunt_WITH_MT32EMU_QT=ON"
56 "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF"
59 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
60 mkdir $out/Applications
61 mv $out/bin/${pname}.app $out/Applications/
62 ln -s $out/{Applications/${pname}.app/Contents/MacOS,bin}/${pname}
66 homepage = "https://munt.sourceforge.net/";
67 description = "A synthesizer application built on Qt and libmt32emu";
68 mainProgram = "mt32emu-qt";
70 mt32emu-qt is a synthesiser application that facilitates both realtime
71 synthesis and conversion of pre-recorded SMF files to WAVE making use of
72 the mt32emu library and the Qt framework.
74 license = with licenses; [ gpl3Plus ];
75 maintainers = with maintainers; [ OPNA2608 ];
76 platforms = platforms.all;