diff --git a/pkgs/applications/audio/munt/default.nix b/pkgs/applications/audio/munt/default.nix deleted file mode 100644 index 6a308ba74c43..000000000000 --- a/pkgs/applications/audio/munt/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib -, stdenv -, mkDerivation -, fetchFromGitHub -, alsa-lib -, cmake -, glib -, pkg-config -, qtbase -, withJack ? stdenv.hostPlatform.isUnix, jack -}: - -mkDerivation rec { - pname = "munt"; - version = "2.5.3"; - - src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = "libmt32emu_${lib.replaceChars [ "." ] [ "_" ] version}"; - hash = "sha256-n5VV5Swh1tOVQGT3urEKl64A/w7cY95/0y5wC5ZuLm4="; - }; - - dontFixCmake = true; - - nativeBuildInputs = [ - cmake - pkg-config - ]; - - buildInputs = [ - glib - qtbase - ] - ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib - ++ lib.optional withJack jack; - - postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' - mkdir $out/Applications - mv $out/bin/${meta.mainProgram}.app $out/Applications/ - ln -s $out/{Applications/${meta.mainProgram}.app/Contents/MacOS,bin}/${meta.mainProgram} - ''; - - meta = with lib; { - homepage = "http://munt.sourceforge.net/"; - description = "An emulator of Roland MT-32, CM-32L, CM-64 and LAPC-I devices"; - license = with licenses; [ lgpl21 gpl3 ]; - maintainers = with maintainers; [ OPNA2608 ]; - platforms = platforms.all; - mainProgram = "mt32emu-qt"; - }; -} diff --git a/pkgs/applications/audio/munt/libmt32emu.nix b/pkgs/applications/audio/munt/libmt32emu.nix new file mode 100644 index 000000000000..f79a2667542f --- /dev/null +++ b/pkgs/applications/audio/munt/libmt32emu.nix @@ -0,0 +1,38 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +}: + +stdenv.mkDerivation rec { + pname = "libmt32emu"; + version = "2.5.3"; + + src = fetchFromGitHub { + owner = "munt"; + repo = "munt"; + rev = "${pname}_${lib.replaceChars [ "." ] [ "_" ] version}"; + hash = "sha256-n5VV5Swh1tOVQGT3urEKl64A/w7cY95/0y5wC5ZuLm4="; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + cmake + ]; + + dontFixCmake = true; + + cmakeFlags = [ + "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF" + "-Dmunt_WITH_MT32EMU_QT=OFF" + ]; + + meta = with lib; { + homepage = "http://munt.sourceforge.net/"; + description = "A library to emulate Roland MT-32, CM-32L, CM-64 and LAPC-I devices"; + license = with licenses; [ lgpl21Plus ]; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.unix; # Not tested on ReactOS yet :) + }; +} diff --git a/pkgs/applications/audio/munt/mt32emu-qt.nix b/pkgs/applications/audio/munt/mt32emu-qt.nix new file mode 100644 index 000000000000..0c541885689e --- /dev/null +++ b/pkgs/applications/audio/munt/mt32emu-qt.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, mkDerivation +, fetchFromGitHub +, alsa-lib +, cmake +, libpulseaudio +, libmt32emu +, pkg-config +, portaudio +, qtbase +, qtmultimedia +, withJack ? stdenv.hostPlatform.isUnix, libjack2 +}: + +mkDerivation rec { + pname = "mt32emu-qt"; + version = "1.9.0"; + + src = fetchFromGitHub { + owner = "munt"; + repo = "munt"; + rev = "mt32emu_qt_${lib.replaceChars [ "." ] [ "_" ] version}"; + hash = "sha256-9vapBKpl1NC3mIDetuCb452IHV6c7c7NCzSyiBry5oo="; + }; + + postPatch = '' + sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt + ''; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libmt32emu + portaudio + qtbase + qtmultimedia + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + alsa-lib + libpulseaudio + ] + ++ lib.optional withJack libjack2; + + dontFixCmake = true; + + cmakeFlags = [ + "-Dmt32emu-qt_USE_PULSEAUDIO_DYNAMIC_LOADING=OFF" + "-Dmunt_WITH_MT32EMU_QT=ON" + "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF" + ]; + + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir $out/Applications + mv $out/bin/${meta.mainProgram}.app $out/Applications/ + ln -s $out/{Applications/${meta.mainProgram}.app/Contents/MacOS,bin}/${meta.mainProgram} + ''; + + meta = with lib; { + homepage = "http://munt.sourceforge.net/"; + description = "A synthesizer application built on Qt and libmt32emu"; + longDescription = '' + mt32emu-qt is a synthesiser application that facilitates both realtime + synthesis and conversion of pre-recorded SMF files to WAVE making use of + the mt32emu library and the Qt framework. + ''; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.all; + mainProgram = "mt32emu-qt"; + }; +} diff --git a/pkgs/applications/audio/munt/mt32emu-smf2wav.nix b/pkgs/applications/audio/munt/mt32emu-smf2wav.nix new file mode 100644 index 000000000000..378b5dd8fb83 --- /dev/null +++ b/pkgs/applications/audio/munt/mt32emu-smf2wav.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, glib +, libmt32emu +, pkg-config +}: + +stdenv.mkDerivation rec { + pname = "mt32emu-smf2wav"; + version = "1.7.0"; + + src = fetchFromGitHub { + owner = "munt"; + repo = "munt"; + rev = "mt32emu_smf2wav_${lib.replaceChars [ "." ] [ "_" ] version}"; + hash = "sha256-FnKlKJxe7P4Yqpv0oVGgV4253dMgSmgtb7EAa2FI+aI="; + }; + + postPatch = '' + sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt + ''; + + dontFixCmake = true; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libmt32emu + glib + ]; + + cmakeFlags = [ + "-Dmunt_WITH_MT32EMU_QT=OFF" + "-Dmunt_WITH_MT32EMU_SMF2WAV=ON" + ]; + + meta = with lib; { + homepage = "http://munt.sourceforge.net/"; + description = "Produces a WAVE file from a Standard MIDI file (SMF)"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.all; + mainProgram = "mt32emu-smf2wav"; + }; +} diff --git a/pkgs/misc/emulators/dosbox-staging/default.nix b/pkgs/misc/emulators/dosbox-staging/default.nix index 3322c43a0c54..05c970507b2a 100644 --- a/pkgs/misc/emulators/dosbox-staging/default.nix +++ b/pkgs/misc/emulators/dosbox-staging/default.nix @@ -1,6 +1,21 @@ -{ lib, fetchFromGitHub, stdenv -, gtest, makeWrapper, meson, ninja, pkg-config -, alsa-lib, fluidsynth, libGL, libGLU, libogg, libpng, munt, opusfile, SDL2, SDL2_net +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, SDL2_net +, alsa-lib +, fluidsynth +, gtest +, libGL +, libGLU +, libogg +, libpng +, makeWrapper +, meson +, libmt32emu +, ninja +, opusfile +, pkg-config }: stdenv.mkDerivation rec { @@ -14,34 +29,53 @@ stdenv.mkDerivation rec { sha256 = "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x"; }; - nativeBuildInputs = [ gtest makeWrapper meson ninja pkg-config ]; - buildInputs = [ alsa-lib fluidsynth libGL libGLU libogg libpng munt opusfile SDL2 SDL2_net ]; + nativeBuildInputs = [ + gtest + makeWrapper + meson + ninja + pkg-config + ]; + + buildInputs = [ + SDL2 + SDL2_net + alsa-lib + fluidsynth + libGL + libGLU + libmt32emu + libogg + libpng + opusfile + ]; hardeningDisable = [ "format" ]; mesonFlags = [ "--buildtype=release" - "-Ddefault_library=static" "-Db_asneeded=true" - "-Dtry_static_libs=png" + "-Ddefault_library=static" "-Dfluidsynth:enable-floats=true" "-Dfluidsynth:try-static-deps=true" + "-Dtry_static_libs=png" ]; postFixup = '' - # Rename binary, add a wrapper, and copy manual to avoid conflict with vanilla dosbox. - # Doing it this way allows us to work with frontends and launchers that expect the - # binary to be named dosbox, but get out of the way of vanilla dosbox if the user - # desires to install that as well. + # Rename binary, add a wrapper, and copy manual to avoid conflict with + # vanilla dosbox. Doing it this way allows us to work with frontends and + # launchers that expect the binary to be named dosbox, but get out of the + # way of vanilla dosbox if the user desires to install that as well. + mv $out/bin/dosbox $out/bin/${pname} makeWrapper $out/bin/dosbox-staging $out/bin/dosbox cp $out/share/man/man1/dosbox.1.gz $out/share/man/man1/${pname}.1.gz ''; meta = with lib; { - description = "A modernized DOS emulator"; homepage = "https://dosbox-staging.github.io/"; - license = licenses.gpl2; + description = "A modernized DOS emulator"; + license = licenses.gpl2Plus; maintainers = with maintainers; [ joshuafern ]; platforms = platforms.unix; priority = 101; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5755b82a0bb6..266a2c92a542 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7999,10 +7999,6 @@ with pkgs; munge = callPackage ../tools/security/munge { }; - munt = libsForQt5.callPackage ../applications/audio/munt { - jack = libjack2; - }; - mutagen = callPackage ../tools/misc/mutagen { }; mycli = callPackage ../tools/admin/mycli { }; @@ -26439,6 +26435,12 @@ with pkgs; musikcube = callPackage ../applications/audio/musikcube {}; + libmt32emu = callPackage ../applications/audio/munt/libmt32emu.nix { }; + + mt32emu-qt = libsForQt5.callPackage ../applications/audio/munt/mt32emu-qt.nix { }; + + mt32emu-smf2wav = callPackage ../applications/audio/munt/mt32emu-smf2wav.nix { }; + p2pool = callPackage ../applications/misc/p2pool { }; pass2csv = python3Packages.callPackage ../tools/security/pass2csv {};