From 58e2348eaf0403b88bbb2654a62de4c1894d4b1d Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Feb 2022 13:26:43 -0300 Subject: [PATCH 1/5] munt: remove Munt is a monorepo, and it uses multiple directories for their various subprojects. While there is an attempt to unified release tags for future releases, for now we will rely on this current state of things and release each useful program "independently". This specific patch is just for cleanup purposes. --- pkgs/applications/audio/munt/default.nix | 52 ------------------------ pkgs/top-level/all-packages.nix | 4 -- 2 files changed, 56 deletions(-) delete mode 100644 pkgs/applications/audio/munt/default.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 96fee403acbb..ad21e3bbd4ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7997,10 +7997,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 { }; From 9a48bd49493b7d4a65c38398d19f5ce2f16099f2 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Feb 2022 17:28:47 -0300 Subject: [PATCH 2/5] libmt32emu: init at 2.5.3 --- pkgs/applications/audio/munt/libmt32emu.nix | 38 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/audio/munt/libmt32emu.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad21e3bbd4ec..62fb7845be10 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26461,6 +26461,8 @@ with pkgs; musikcube = callPackage ../applications/audio/musikcube {}; + libmt32emu = callPackage ../applications/audio/munt/libmt32emu.nix { }; + p2pool = callPackage ../applications/misc/p2pool { }; pass2csv = python3Packages.callPackage ../tools/security/pass2csv {}; From a5d0007c7c550c8e9c5a610213428ffdad059488 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Feb 2022 17:35:19 -0300 Subject: [PATCH 3/5] mt32emu-smf2wav: init at 1.7.0 --- .../audio/munt/mt32emu-smf2wav.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/applications/audio/munt/mt32emu-smf2wav.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 62fb7845be10..a7ec6f4a5530 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26463,6 +26463,8 @@ with pkgs; libmt32emu = callPackage ../applications/audio/munt/libmt32emu.nix { }; + mt32emu-smf2wav = callPackage ../applications/audio/munt/mt32emu-smf2wav.nix { }; + p2pool = callPackage ../applications/misc/p2pool { }; pass2csv = python3Packages.callPackage ../tools/security/pass2csv {}; From b5d5688a44b4d1cb60b5061706d17c715a958fb5 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Feb 2022 17:36:52 -0300 Subject: [PATCH 4/5] mt32emu-qt: init at 1.9.0 --- pkgs/applications/audio/munt/mt32emu-qt.nix | 75 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 77 insertions(+) create mode 100644 pkgs/applications/audio/munt/mt32emu-qt.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7ec6f4a5530..eb981cda4ff5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26463,6 +26463,8 @@ with pkgs; 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 { }; From 31b7fe92c030b3843d51d13225f1d384d23bb818 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Feb 2022 17:42:56 -0300 Subject: [PATCH 5/5] dosbox-staging: munt is now libmt32emu --- .../misc/emulators/dosbox-staging/default.nix | 60 +++++++++++++++---- 1 file changed, 47 insertions(+), 13 deletions(-) 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;