2021-07-21 07:28:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, freepats }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "wildmidi";
|
|
|
|
version = "0.4.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mindwerks";
|
|
|
|
repo = "wildmidi";
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "08fbbsvw6pkwwqarjwcvdp8mq4zn5sgahf025hynwc6rvf4sp167";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ alsa-lib stdenv.cc.libc/*couldn't find libm*/ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace /etc/wildmidi $out/etc
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/Mindwerks/wildmidi/issues/236
|
|
|
|
substituteInPlace src/wildmidi.pc.in \
|
|
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir "$out"/etc
|
|
|
|
echo "dir ${freepats}" > "$out"/etc/wildmidi.cfg
|
|
|
|
echo "source ${freepats}/freepats.cfg" >> "$out"/etc/wildmidi.cfg
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Software MIDI player and library";
|
|
|
|
longDescription = ''
|
|
|
|
WildMIDI is a simple software midi player which has a core softsynth
|
|
|
|
library that can be use with other applications.
|
|
|
|
'';
|
|
|
|
homepage = "http://wildmidi.sourceforge.net/";
|
|
|
|
# The library is LGPLv3, the wildmidi executable is GPLv3
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|