2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, glib
|
|
|
|
, libmt32emu
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
2022-12-17 10:02:37 +00:00
|
|
|
char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str;
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mt32emu-smf2wav";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.9.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "munt";
|
|
|
|
repo = "munt";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "${char2underscore "-" pname}_${char2underscore "." version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-XGds9lDfSiY0D8RhYG4TGyjYEVvVYuAfNSv9+VxiJEs=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://munt.sourceforge.net/";
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "Produces a WAVE file from a Standard MIDI file (SMF)";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mt32emu-smf2wav";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|