2023-08-04 22:07:22 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, buildPackages, pkg-config, cmake
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib, glib, libjack2, libsndfile, libpulseaudio
|
2023-04-29 16:46:19 +00:00
|
|
|
, AppKit, AudioUnit, CoreAudio, CoreMIDI, CoreServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fluidsynth";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "2.3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FluidSynth";
|
|
|
|
repo = "fluidsynth";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-RqhlpvMbRSwdcY2uuFAdJnihN3aObcLVMuvCZ294dgo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes bad CMAKE_INSTALL_PREFIX + CMAKE_INSTALL_LIBDIR concatenation for Darwin install name dir
|
|
|
|
# Remove when PR merged & in release
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-Fix-incorrect-way-of-turning-CMAKE_INSTALL_LIBDIR-absolute.patch";
|
|
|
|
url = "https://github.com/FluidSynth/fluidsynth/pull/1261/commits/03cd38dd909fc24aa39553d869afbb4024416de8.patch";
|
|
|
|
hash = "sha256-nV+MbFttnbNBO4zWnPLpnnEuoiESkV9BGFlUS9tQQfk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ buildPackages.stdenv.cc pkg-config cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ glib libsndfile libjack2 ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ]
|
2023-04-29 16:46:19 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ AppKit AudioUnit CoreAudio CoreMIDI CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-Denable-framework=off"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://www.fluidsynth.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ goibhniu lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|