diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/carla/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/carla/default.nix | 104 |
1 files changed, 54 insertions, 50 deletions
diff --git a/nixpkgs/pkgs/applications/audio/carla/default.nix b/nixpkgs/pkgs/applications/audio/carla/default.nix index 8a1fef2d9c3d..af29c3dc9e0e 100644 --- a/nixpkgs/pkgs/applications/audio/carla/default.nix +++ b/nixpkgs/pkgs/applications/audio/carla/default.nix @@ -1,67 +1,71 @@ -{ stdenv, lib, fetchFromGitHub, pkgconfig, which +{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, fftw, jack2, + liblo, libpulseaudio, libsndfile, makeWrapper, pkgconfig, python3Packages, + which, withFrontend ? true, + withQt ? true, qtbase ? null, + withGtk2 ? true, gtk2 ? null, + withGtk3 ? true, gtk3 ? null }: -, frontEndSupport ? true, python3Packages -, OSCSupport ? true, liblo -, binaryDetectSupport ? true, file +with stdenv.lib; -, alsaSupport ? frontEndSupport, alsaLib -, pulseaudioSupport ? false, pulseaudio +assert withFrontend -> python3Packages ? pyqt5; +assert withQt -> qtbase != null; +assert withGtk2 -> gtk2 != null; +assert withGtk3 -> gtk3 != null; -, gtk2Support ? false, gtk2 -, gtk3Support ? false, gtk3 -, qt4Support ? false, qt4 -, qt5Support ? frontEndSupport, qt5 - -, basicFileFormatsSupport ? true, libsndfile -, extraFileFormatsSupport ? true, ffmpeg -, SF23Support ? true, fluidsynth - -}: - -assert basicFileFormatsSupport -> binaryDetectSupport; -assert frontEndSupport -> alsaSupport; -assert frontEndSupport -> qt5Support; - -stdenv.mkDerivation { - pname = "Carla"; - version = "2.0-RC3"; +stdenv.mkDerivation rec { + pname = "carla"; + version = "2.0.0"; src = fetchFromGitHub { owner = "falkTX"; - repo = "Carla"; - rev = "v1.9.13"; # Yes, tags are numbered differently than versions. - sha256 = "1n4xaibyq5k898rz3swl1l3dc7fjklihrzfp3jn6bf7cczf0kz45"; + repo = pname; + rev = "v${version}"; + sha256 = "0fqgncqlr86n38yy7pa118mswfacmfczj7w9xx6c6k0jav3wk29k"; }; - nativeBuildInputs = [ pkgconfig which ] - ++ lib.optional frontEndSupport python3Packages.pyqt5 - ; + nativeBuildInputs = [ python3Packages.wrapPython pkgconfig which ]; - buildInputs = [ ] - ++ lib.optional frontEndSupport python3Packages.pyqt5 - ++ lib.optional OSCSupport liblo - ++ lib.optional binaryDetectSupport file + pythonPath = with python3Packages; [ + rdflib pyliblo + ] ++ optional withFrontend pyqt5; - ++ lib.optional alsaSupport alsaLib - ++ lib.optional pulseaudioSupport pulseaudio + buildInputs = [ + file liblo alsaLib fluidsynth ffmpeg jack2 libpulseaudio libsndfile + ] ++ pythonPath + ++ optional withQt qtbase + ++ optional withGtk2 gtk2 + ++ optional withGtk3 gtk3; - ++ lib.optional gtk2Support gtk2 - ++ lib.optional gtk3Support gtk3 - ++ lib.optional qt4Support qt4 - ++ lib.optional qt5Support qt5.qtbase + installFlags = [ "PREFIX=$(out)" ]; - ++ lib.optional basicFileFormatsSupport libsndfile - ++ lib.optional extraFileFormatsSupport ffmpeg - ++ lib.optional SF23Support fluidsynth - ; + postFixup = '' + # Also sets program_PYTHONPATH and program_PATH variables + wrapPythonPrograms - installFlags = [ "PREFIX=$(out)" ]; + 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 + wrapProgram "$program" \ + --prefix PATH : "$program_PATH:${which}/bin" \ + --set PYTHONNOUSERSITE true \ + --prefix QT_PLUGIN_PATH : "${qtbase.bin}/${qtbase.qtPluginPrefix}" + done + ''; - meta = with lib; { - description = "Audio plugin host"; - homepage = https://kxstudio.linuxaudio.org/Applications:Carla; + meta = with stdenv.lib; { + homepage = http://kxstudio.sf.net/carla; + 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 = with maintainers; [ qyliss ]; - platforms = platforms.all; + maintainers = [ maintainers.minijackson ]; + platforms = platforms.linux; }; } |