2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, jack2,
|
|
|
|
liblo, libpulseaudio, libsndfile, pkgconfig, python3Packages,
|
2019-05-24 00:41:51 +02:00
|
|
|
which, withFrontend ? true,
|
2019-07-05 17:42:08 +02:00
|
|
|
withQt ? true, qtbase ? null, wrapQtAppsHook ? null,
|
2019-05-24 00:41:51 +02:00
|
|
|
withGtk2 ? true, gtk2 ? null,
|
|
|
|
withGtk3 ? true, gtk3 ? null }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
assert withFrontend -> python3Packages ? pyqt5;
|
|
|
|
assert withQt -> qtbase != null;
|
2019-07-05 17:42:08 +02:00
|
|
|
assert withQt -> wrapQtAppsHook != null;
|
2019-05-24 00:41:51 +02:00
|
|
|
assert withGtk2 -> gtk2 != null;
|
|
|
|
assert withGtk3 -> gtk3 != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "carla";
|
2020-06-11 13:24:53 +02:00
|
|
|
version = "2.1.1";
|
2019-05-24 00:41:51 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "falkTX";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-06-11 13:24:53 +02:00
|
|
|
sha256 = "0c3y4a6cgi4bv1mg57i3qn5ia6pqjqlaylvkapj6bmpsw71ig22g";
|
2019-05-24 00:41:51 +02:00
|
|
|
};
|
|
|
|
|
2019-07-05 17:42:08 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.wrapPython pkgconfig which wrapQtAppsHook
|
|
|
|
];
|
2019-05-24 00:41:51 +02:00
|
|
|
|
|
|
|
pythonPath = with python3Packages; [
|
|
|
|
rdflib pyliblo
|
|
|
|
] ++ optional withFrontend pyqt5;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
file liblo alsaLib fluidsynth ffmpeg jack2 libpulseaudio libsndfile
|
|
|
|
] ++ pythonPath
|
|
|
|
++ optional withQt qtbase
|
|
|
|
++ optional withGtk2 gtk2
|
|
|
|
++ optional withGtk3 gtk3;
|
|
|
|
|
2019-09-14 16:13:41 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-05-24 00:41:51 +02:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2019-07-05 17:42:08 +02:00
|
|
|
dontWrapQtApps = true;
|
2019-05-24 00:41:51 +02:00
|
|
|
postFixup = ''
|
|
|
|
# Also sets program_PYTHONPATH and program_PATH variables
|
|
|
|
wrapPythonPrograms
|
2019-09-14 16:14:02 +02:00
|
|
|
wrapPythonProgramsIn "$out/share/carla/resources" "$out $pythonPath"
|
2019-05-24 00:41:51 +02:00
|
|
|
|
|
|
|
find "$out/share/carla" -maxdepth 1 -type f -not -name "*.py" -print0 | while read -d "" f; do
|
|
|
|
patchPythonScript "$f"
|
|
|
|
done
|
|
|
|
patchPythonScript "$out/share/carla/carla_settings.py"
|
|
|
|
|
|
|
|
for program in $out/bin/*; do
|
2019-07-05 17:42:08 +02:00
|
|
|
wrapQtApp "$program" \
|
2019-05-24 00:41:51 +02:00
|
|
|
--prefix PATH : "$program_PATH:${which}/bin" \
|
2019-07-05 17:42:08 +02:00
|
|
|
--set PYTHONNOUSERSITE true
|
2019-05-24 00:41:51 +02:00
|
|
|
done
|
2019-09-14 16:14:02 +02:00
|
|
|
|
|
|
|
find "$out/share/carla/resources" -maxdepth 1 -type f -not -name "*.py" -print0 | while read -d "" f; do
|
|
|
|
wrapQtApp "$f" \
|
|
|
|
--prefix PATH : "$program_PATH:${which}/bin" \
|
|
|
|
--set PYTHONNOUSERSITE true
|
|
|
|
done
|
2019-05-24 00:41:51 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://kxstudio.sf.net/carla";
|
2019-05-24 00:41:51 +02:00
|
|
|
description = "An audio plugin host";
|
|
|
|
longDescription = ''
|
|
|
|
It currently supports LADSPA (including LRDF), DSSI, LV2, VST2/3
|
|
|
|
and AU plugin formats, plus GIG, SF2 and SFZ file support.
|
|
|
|
It uses JACK as the default and preferred audio driver but also
|
|
|
|
supports native drivers like ALSA, DirectSound or CoreAudio.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.minijackson ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|