nixpkgs/pkgs/applications/audio/munt/mt32emu-qt.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
1.8 KiB
Nix
Raw Normal View History

2022-02-01 20:36:52 +00:00
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, alsa-lib
, cmake
, libpulseaudio
, libmt32emu
, pkg-config
, portaudio
, qtbase
, qtmultimedia
, withJack ? stdenv.hostPlatform.isUnix, libjack2
}:
2022-05-12 14:53:35 +00:00
let
char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str;
2022-05-12 14:53:35 +00:00
in
2022-02-01 20:36:52 +00:00
mkDerivation rec {
pname = "mt32emu-qt";
2022-08-08 15:52:46 +00:00
version = "1.11.1";
2022-02-01 20:36:52 +00:00
src = fetchFromGitHub {
owner = "munt";
repo = "munt";
2022-05-12 14:53:35 +00:00
rev = "${char2underscore "-" pname}_${char2underscore "." version}";
2022-08-08 15:52:46 +00:00
sha256 = "sha256-PqYPYnKPlnU3PByxksBscl4GqDRllQdmD6RWpy/Ura0=";
2022-02-01 20:36:52 +00:00
};
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
2022-05-12 14:53:35 +00:00
mv $out/bin/${pname}.app $out/Applications/
ln -s $out/{Applications/${pname}.app/Contents/MacOS,bin}/${pname}
2022-02-01 20:36:52 +00:00
'';
meta = with lib; {
homepage = "https://munt.sourceforge.net/";
2022-02-01 20:36:52 +00:00
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;
};
}