2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, 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-04-29 16:46:19 +00:00
|
|
|
version = "2.3.2";
|
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-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-BSJu3jB7b5G2ThXBUHUNnBGl55EXe3nIzdBdgfOWDSM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
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"
|
|
|
|
# set CMAKE_INSTALL_NAME_DIR to correct value on darwin
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
];
|
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;
|
|
|
|
};
|
|
|
|
}
|