summary refs log tree commit diff
path: root/pkgs/applications/audio/carla
diff options
context:
space:
mode:
authorRĂ©mi NICOLE <minijackson@users.noreply.github.com>2019-05-24 00:41:51 +0200
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-05-23 18:41:51 -0400
commitd8d85a2cd274aa464ab2c3236ef94deea96e931f (patch)
treea89a23c36d91285bf2104362d978729eccf8ee3c /pkgs/applications/audio/carla
parent308169a518b395f782ab6ce34f7928fcd379d282 (diff)
downloadnixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar.gz
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar.bz2
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar.lz
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar.xz
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.tar.zst
nixpkgs-d8d85a2cd274aa464ab2c3236ef94deea96e931f.zip
carla: init at 2.0.0 (#60346)
Diffstat (limited to 'pkgs/applications/audio/carla')
-rw-r--r--pkgs/applications/audio/carla/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/applications/audio/carla/default.nix b/pkgs/applications/audio/carla/default.nix
new file mode 100644
index 00000000000..af29c3dc9e0
--- /dev/null
+++ b/pkgs/applications/audio/carla/default.nix
@@ -0,0 +1,71 @@
+{ 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 }:
+
+with stdenv.lib;
+
+assert withFrontend -> python3Packages ? pyqt5;
+assert withQt -> qtbase != null;
+assert withGtk2 -> gtk2 != null;
+assert withGtk3 -> gtk3 != null;
+
+stdenv.mkDerivation rec {
+  pname = "carla";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "falkTX";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0fqgncqlr86n38yy7pa118mswfacmfczj7w9xx6c6k0jav3wk29k";
+  };
+
+  nativeBuildInputs = [ python3Packages.wrapPython pkgconfig which ];
+
+  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;
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  postFixup = ''
+    # Also sets program_PYTHONPATH and program_PATH variables
+    wrapPythonPrograms
+
+    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 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 = [ maintainers.minijackson ];
+    platforms = platforms.linux;
+  };
+}