1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 18:03:22 +00:00
nixpkgs/pkgs/applications/audio/carla/default.nix

86 lines
2.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, jack2,
liblo, libpulseaudio, libsndfile, pkg-config, python3Packages,
2019-05-23 23:41:51 +01:00
which, withFrontend ? true,
withQt ? true, qtbase ? null, wrapQtAppsHook ? null,
2019-05-23 23:41:51 +01:00
withGtk2 ? true, gtk2 ? null,
withGtk3 ? true, gtk3 ? null }:
2021-01-15 13:21:58 +00:00
with lib;
2019-05-23 23:41:51 +01:00
assert withFrontend -> python3Packages ? pyqt5;
assert withQt -> qtbase != null;
assert withQt -> wrapQtAppsHook != null;
2019-05-23 23:41:51 +01:00
assert withGtk2 -> gtk2 != null;
assert withGtk3 -> gtk3 != null;
stdenv.mkDerivation rec {
pname = "carla";
2021-04-14 23:21:42 +01:00
version = "2.3.0";
2019-05-23 23:41:51 +01:00
src = fetchFromGitHub {
owner = "falkTX";
repo = pname;
rev = "v${version}";
2021-04-14 23:21:42 +01:00
sha256 = "sha256-724EFBpbmPMuU1m3T0XMaeohURJA5JcxHfUPYbZ/2LE=";
2019-05-23 23:41:51 +01:00
};
nativeBuildInputs = [
python3Packages.wrapPython pkg-config which wrapQtAppsHook
];
2019-05-23 23:41:51 +01:00
pythonPath = with python3Packages; [
rdflib pyliblo
] ++ optional withFrontend pyqt5;
buildInputs = [
file liblo alsaLib fluidsynth jack2 libpulseaudio libsndfile
] ++ optional withQt qtbase
2019-05-23 23:41:51 +01:00
++ optional withGtk2 gtk2
++ optional withGtk3 gtk3;
propagatedBuildInputs = pythonPath;
2019-09-14 15:13:41 +01:00
enableParallelBuilding = true;
2019-05-23 23:41:51 +01:00
installFlags = [ "PREFIX=$(out)" ];
dontWrapQtApps = true;
2019-05-23 23:41:51 +01:00
postFixup = ''
# Also sets program_PYTHONPATH and program_PATH variables
wrapPythonPrograms
wrapPythonProgramsIn "$out/share/carla/resources" "$out $pythonPath"
2019-05-23 23:41:51 +01: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"
patchPythonScript "$out/share/carla/carla_database.py"
2019-05-23 23:41:51 +01:00
for program in $out/bin/*; do
wrapQtApp "$program" \
2019-05-23 23:41:51 +01:00
--prefix PATH : "$program_PATH:${which}/bin" \
--set PYTHONNOUSERSITE true
2019-05-23 23:41:51 +01:00
done
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-23 23:41:51 +01:00
'';
meta = with lib; {
homepage = "http://kxstudio.sf.net/carla";
2019-05-23 23:41:51 +01: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;
};
}