2014-07-31 12:47:17 +02:00
|
|
|
{ composableDerivation, stdenv, fetchurl, alsaLib, jack2, ncurses }:
|
2010-07-28 13:55:54 +02:00
|
|
|
|
|
|
|
let inherit (composableDerivation) edf; in
|
|
|
|
|
|
|
|
composableDerivation.composableDerivation {} {
|
2009-03-03 14:27:40 +01:00
|
|
|
|
2014-12-19 11:25:35 +01:00
|
|
|
name = "timidity-2.14.0";
|
2007-09-23 18:28:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-12-19 11:25:35 +01:00
|
|
|
url = mirror://sourceforge/timidity/TiMidity++-2.14.0.tar.bz2;
|
|
|
|
sha256 = "0xk41w4qbk23z1fvqdyfblbz10mmxsllw0svxzjw5sa9y11vczzr";
|
2007-09-23 18:28:56 +02:00
|
|
|
};
|
|
|
|
|
2009-09-10 18:57:58 +02: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";
|
2014-07-31 12:47:17 +02:00
|
|
|
buildInputs = [jack2];
|
|
|
|
NIX_LDFLAGS = ["-ljack -L${jack2}/lib64"];
|
2009-09-10 18:57:58 +02:00
|
|
|
};
|
|
|
|
} // edf { name = "ncurses"; enable = { buildInputs = [ncurses]; };};
|
|
|
|
|
|
|
|
cfg = {
|
|
|
|
ncursesSupport = true;
|
|
|
|
|
|
|
|
ossSupport = true;
|
|
|
|
alsaSupport = true;
|
|
|
|
jackSupport = true;
|
|
|
|
};
|
|
|
|
|
2009-03-03 14:27:40 +01:00
|
|
|
instruments = fetchurl {
|
|
|
|
url = http://www.csee.umbc.edu/pub/midia/instruments.tar.gz;
|
|
|
|
sha256 = "0lsh9l8l5h46z0y8ybsjd4pf6c22n33jsjvapfv3rjlfnasnqw67";
|
|
|
|
};
|
2007-09-23 18:28:56 +02:00
|
|
|
|
2009-09-10 18:57:58 +02:00
|
|
|
# the instruments could be compressed (?)
|
2009-03-03 14:27:40 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/timidity/;
|
|
|
|
cp ${./timidity.cfg} $out/share/timidity/timidity.cfg
|
2009-09-10 18:57:58 +02:00
|
|
|
tar --strip-components=1 -xf $instruments -C $out/share/timidity/
|
2009-03-03 14:27:40 +01:00
|
|
|
'';
|
2007-09-23 18:28:56 +02:00
|
|
|
|
2014-12-19 11:25:35 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://sourceforge.net/projects/timidity/;
|
|
|
|
license = licenses.gpl2;
|
2009-03-03 14:27:40 +01:00
|
|
|
description = "A software MIDI renderer";
|
2014-12-19 11:25:35 +01:00
|
|
|
maintainers = [ maintainers.marcweber ];
|
2007-09-23 18:28:56 +02:00
|
|
|
};
|
2009-09-10 18:57:58 +02:00
|
|
|
}
|