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