NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.63k stars 13.78k forks source link

VST2 plugins from nixpkgs can’t be opened in Ardour #310307

Closed thom-cameron closed 1 month ago

thom-cameron commented 4 months ago

Describe the bug

The patched version of Ardour in nixpkgs is not able to open VST2 audio plugins also installed from nixpkgs.

All VST2 plugins are detected, but say they can’t be opened by Ardour. For example, having installed the ardour and lsp-plugins nixpkgs packages, the Ardour plugin manager shows the status “Error”:

image

The error given for one of the VST2 plugins is:

[Info]: Scanning: /nix/store/zr21f4ff9f16rd0if4pwqdg2hycldxxr-lsp-plugins-1.2.13/lib/lv2/lsp-plugins.lv2/lsp-plugins-lv2.so
[ERROR]: Missing entry method in VST2 plugin '/nix/store/zr21f4ff9f16rd0if4pwqdg2hycldxxr-lsp-plugins-1.2.13/lib/lv2/lsp-plugins.lv2/lsp-plugins-lv2.so'
[WARNING]: Cannot open VST2 module '/nix/store/zr21f4ff9f16rd0if4pwqdg2hycldxxr-lsp-plugins-1.2.13/lib/lv2/lsp-plugins.lv2/lsp-plugins-lv2.so'
Scan Failed.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Ardour and some VST2 plugins from nixpkgs (e.g. "ardour" and "lsp-plugins" packages)
  2. Open Ardour and scan for plugins

Expected behavior

The plugins are detected and can be used.

Additional context

I'm running NixOS 23.11 and installing these things declaratively with home-manager. i.e.:

  home.packages = with pkgs; [
    <other stuff>
    ardour
    lsp-plugins
  ];

Notify maintainers

@cillianderoiste @magnetophon @mitchmindtree @PowerUser64

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

thom@nix-lat:~
> nix-shell -p nix-info --run "nix-info -m"         
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.90, NixOS, 23.11 (Tapir), 23.11.20240506.27c1399`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(thom): `""`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

alex-fu27 commented 4 months ago

I suspect lsp-plugins-vst2-1.2.14.so is not actually a plugin, but a shared library used by the plugins in the same directory like art-delay-stereo.so which loads fine for me:

[Info]: Scanning: /nix/store/58lj12n2j39ahdr3n7sswlxmcvca2gz1-lsp-plugins-1.2.14/lib/vst/lsp-plugins/art-delay-stereo.so
[Info]: Found Plugin: 'rbbk' Artistic Delay Stereo
[Info]: Saved VST2 plugin cache to /home/alex/.cache/ardour8/vst/b76d29277e0879774f1436e3c55f0fccdd08cb04-x64.v2i

Are you sure the actual plugins are affected? screenshot of the plugin browser showing lots of VST2 plugins

PowerUser64 commented 4 months ago

I tested with rnnoise-plugin and helm and I was able to see both of those, but I'm able to reproduce other vst2 plugins (like LSP) not showing. Could it be that they're not in ardour's vst2 scan path?

image

alex-fu27 commented 4 months ago

nixpkgs patches Ardour to find other plugin types, but I think i've added ~/.nix-profile/lib/vst to the plugin search path manually.

thom-cameron commented 4 months ago

Hi guys, thanks for taking the time to look into this issue.

You're right about the shared library not being a plugin - this was a red herring that was stopping me from understanding the problem.

I just added ~/.nix-profile/lib/vst to my plugin search path and everything I was missing has now loaded in successfully. Thank you!

To prevent other users from experiencing this problem (and possibly me if I change systems and forget this fix), can this path be added to the list that the nixpkgs patch adds to ardour?