milahu / nixpkgs

Nix Packages collection
MIT License
0 stars 0 forks source link

audio tools should load plugins with pkg-config #41

Open milahu opened 3 months ago

milahu commented 3 months ago

this does not work

nix-shell -p ardour lsp-plugins --run ardour

problem: ardour does not find the plugins from lsp-plugins ardour > window > plugin manager

possible solution: load plugins with pkg-config

$ pkg-config --list-all | cut -d' ' -f1 | xargs pkg-config --libs-only-L
-L/nix/store/l37r2iz78gagcvvc4g5j7argqi81kchi-lsp-plugins-1.2.14/lib

$ ls /nix/store/l37r2iz78gagcvvc4g5j7argqi81kchi-lsp-plugins-1.2.14/lib/vst/lsp-plugins/*.so | wc -l
177

this can be implemented in nix only by wrapping the audio tools and setting these environment variables

LV2_PATH
VST_PATH
VST3_PATH
LXVST_PATH
DSSI_PATH
LADSPA_PATH

for example, append or prepend this to LV2_PATH

/nix/store/l37r2iz78gagcvvc4g5j7argqi81kchi-lsp-plugins-1.2.14/lib/vst

why not? loading all plugins may be too much and the user may want to load only some plugins via

$HOME/.vst
$HOME/.ladspa
$HOME/.lxvst
$HOME/.vst3

related issue: ardour has the literal string $HOME/.lxvst in its default LV2_PATH but $HOME should be expanded on runtime


related issue: some plugins in lsp-plugins are broken at least they dont work on my machine

$ LV2_PATH=/nix/store/l37r2iz78gagcvvc4g5j7argqi81kchi-lsp-plugins-1.2.14/lib/vst ardour8
start clocking
Floating point exception (core dumped)

the ardour gui crashes at "indexing plugins"


related