2022-02-01 20:35:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, glib
|
|
|
|
, libmt32emu
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
2022-05-12 14:57:32 +00:00
|
|
|
let
|
2022-12-12 01:36:03 +00:00
|
|
|
char2underscore = char: str: lib.replaceStrings [ char ] [ "_" ] str;
|
2022-05-12 14:57:32 +00:00
|
|
|
in
|
2022-02-01 20:35:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mt32emu-smf2wav";
|
2022-08-02 14:20:02 +00:00
|
|
|
version = "1.9.0";
|
2022-02-01 20:35:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "munt";
|
|
|
|
repo = "munt";
|
2022-05-12 14:57:32 +00:00
|
|
|
rev = "${char2underscore "-" pname}_${char2underscore "." version}";
|
2022-08-02 14:20:02 +00:00
|
|
|
sha256 = "sha256-XGds9lDfSiY0D8RhYG4TGyjYEVvVYuAfNSv9+VxiJEs=";
|
2022-02-01 20:35:19 +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-01-21 21:41:12 +00:00
|
|
|
homepage = "https://munt.sourceforge.net/";
|
2022-02-01 20:35:19 +00:00
|
|
|
description = "Produces a WAVE file from a Standard MIDI file (SMF)";
|
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|