{ pkgs, lib, ... }: let # Carla links against jack2's libjack; on PipeWire it must load pipewire-jack's # drop-in instead (what `pw-jack` does via LD_LIBRARY_PATH). Wrap so it just works. # JACK clients (Carla, Guitarix) are linked against jack2; on PipeWire they # must load pipewire-jack's drop-in libjack (what `pw-jack` does). Without it # they report "jack server not running". Wrap every bin to inject the lib. withPwJack = pkg: pkgs.symlinkJoin { name = "${pkg.pname or pkg.name}-pw"; paths = [pkg]; nativeBuildInputs = [pkgs.makeWrapper]; postBuild = '' for b in $out/bin/*; do wrapProgram "$b" \ --prefix LD_LIBRARY_PATH : ${pkgs.pipewire.jack}/lib \ --set-default PIPEWIRE_LATENCY "256/48000" done ''; }; carla-pw = withPwJack pkgs.carla; guitarix-pw = withPwJack pkgs.guitarix; # mikeoliphant's NAM-LV2 is headless by design. Ratatouille is brummer10's # GUI neural loader: loads .nam (and RTNeural) models plus a built-in dual IR # cab loader, with an X11/cairo UI. Not yet in nixpkgs. ratatouille = pkgs.stdenv.mkDerivation (finalAttrs: { pname = "ratatouille-lv2"; version = "0.9.11"; src = pkgs.fetchFromGitHub { owner = "brummer10"; repo = "Ratatouille.lv2"; tag = "v${finalAttrs.version}"; fetchSubmodules = true; hash = "sha256-mig3yUGSNz1xuyz6ljKqJUjNqmEcsbXSH1vTxTGdOFk="; }; nativeBuildInputs = [pkgs.pkg-config]; buildInputs = [pkgs.libsndfile pkgs.cairo pkgs.libx11 pkgs.lv2]; # Build uses -flto -fno-fat-lto-objects, so archives hold LTO bytecode; # plain `ar` can't index them. gcc-ar loads the LTO plugin. buildPhase = '' runHook preBuild make lv2 AR=gcc-ar runHook postBuild ''; installPhase = '' runHook preInstall make install INSTALL_DIR="$out/lib/lv2" runHook postInstall ''; meta = { description = "Neural amp modeler + IR loader LV2 with GUI (NAM/RTNeural)"; homepage = "https://github.com/brummer10/Ratatouille.lv2"; license = lib.licenses.bsd0; platforms = lib.platforms.linux; }; }); in { environment.systemPackages = [ pkgs.neural-amp-modeler-lv2 pkgs.ir.lv2 guitarix-pw ratatouille carla-pw ]; }