1{ stdenv, fetchurl, cmake, alsaLib, freepats }:
2
3stdenv.mkDerivation rec {
4 name = "wildmidi-0.3.6";
5
6 src = fetchurl {
7 url = "https://github.com/Mindwerks/wildmidi/archive/${name}.tar.gz";
8 sha256 = "0y8r812f8h9jqlajwbzni7f23k8kfcp4wxz3jdq75z902bsmdzpf";
9 };
10
11 nativeBuildInputs = [ cmake ];
12
13 buildInputs = [ alsaLib ];
14
15 preConfigure = ''
16 substituteInPlace CMakeLists.txt \
17 --replace /etc/wildmidi $out/etc
18 '';
19
20 postInstall = ''
21 mkdir "$out"/etc
22 echo "dir ${freepats}" > "$out"/etc/wildmidi.cfg
23 echo "source ${freepats}/freepats.cfg" >> "$out"/etc/wildmidi.cfg
24 '';
25
26 meta = with stdenv.lib; {
27 description = "Software MIDI player and library";
28 longDescription = ''
29 WildMIDI is a simple software midi player which has a core softsynth
30 library that can be use with other applications.
31 '';
32 homepage = http://wildmidi.sourceforge.net/;
33 # The library is LGPLv3, the wildmidi executable is GPLv3
34 license = licenses.lgpl3;
35 platforms = platforms.linux;
36 maintainers = [ maintainers.bjornfor ];
37 };
38}