2010-07-28 12:55:54 +01:00
|
|
|
{ composableDerivation, stdenv, fetchurl, alsaLib, jackaudio, ncurses }:
|
|
|
|
|
|
|
|
let inherit (composableDerivation) edf; in
|
|
|
|
|
|
|
|
composableDerivation.composableDerivation {} {
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2007-09-23 17:28:56 +01:00
|
|
|
name = "timidity-2.13.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2012-10-02 08:18:59 +01:00
|
|
|
url = mirror://sourceforge/timidity/TiMidity++-2.13.0.tar.bz2;
|
2007-09-23 17:28:56 +01:00
|
|
|
sha256 = "1jbmk0m375fh5nj2awqzns7pdjbi7dxpjdwcix04zipfcilppbmf";
|
|
|
|
};
|
|
|
|
|
2009-09-10 17:57:58 +01:00
|
|
|
mergeAttrBy.audioModes = a : b : "${a},${b}";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="$configureFlags --enable-audio=$audioModes"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# configure still has many more options...
|
|
|
|
flags = {
|
|
|
|
oss = {
|
|
|
|
audioModes = "oss";
|
|
|
|
};
|
|
|
|
alsa = {
|
|
|
|
audioModes = "alsa";
|
|
|
|
buildInputs = [alsaLib];
|
|
|
|
# this is better than /dev/dsp !
|
|
|
|
configureFlags = ["--with-default-output-mode=alsa"];
|
|
|
|
};
|
|
|
|
jack = {
|
|
|
|
audioModes = "jack";
|
|
|
|
buildInputs = [jackaudio];
|
|
|
|
NIX_LDFLAGS = ["-ljack -L${jackaudio}/lib64"];
|
|
|
|
};
|
|
|
|
} // edf { name = "ncurses"; enable = { buildInputs = [ncurses]; };};
|
|
|
|
|
|
|
|
cfg = {
|
|
|
|
ncursesSupport = true;
|
|
|
|
|
|
|
|
ossSupport = true;
|
|
|
|
alsaSupport = true;
|
|
|
|
jackSupport = true;
|
|
|
|
};
|
|
|
|
|
2009-03-03 13:27:40 +00:00
|
|
|
instruments = fetchurl {
|
|
|
|
url = http://www.csee.umbc.edu/pub/midia/instruments.tar.gz;
|
|
|
|
sha256 = "0lsh9l8l5h46z0y8ybsjd4pf6c22n33jsjvapfv3rjlfnasnqw67";
|
|
|
|
};
|
2007-09-23 17:28:56 +01:00
|
|
|
|
2009-09-10 17:57:58 +01:00
|
|
|
# the instruments could be compressed (?)
|
2009-03-03 13:27:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/timidity/;
|
|
|
|
cp ${./timidity.cfg} $out/share/timidity/timidity.cfg
|
2009-09-10 17:57:58 +01:00
|
|
|
tar --strip-components=1 -xf $instruments -C $out/share/timidity/
|
2009-03-03 13:27:40 +00:00
|
|
|
'';
|
2007-09-23 17:28:56 +01:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A software MIDI renderer";
|
2010-07-28 12:55:54 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
2007-09-23 17:28:56 +01:00
|
|
|
};
|
2009-09-10 17:57:58 +01:00
|
|
|
}
|