Change:
Project description Yet Another way to use Windows VST plugins on Linux. Yabridge seamlessly supports using both 32-bit and 64-bit Windows VST2 and VST3 plugins in a 64-bit Linux VST host as if they were native VST2 and VST3 plugins, with optional support for plugin groups to enable inter-plugin communication for VST2 plugins and quick startup times. Its modern concurrent architecture and focus on transparency allows yabridge to be both fast and highly compatible, while also staying easy to debug and maintain. If I understand correctly, this provides similar functionality to the airwave package. I think the big plus to this package though is that it emulates as if they were native which means the build process doesn't need to require the user to go to the steinberg site and download the VST SDK (as airwave currently does). I used this on Arch with Reaper and it was extremely easy to get going. I had a much easier time using yabridge than trying to get carla set up and running. There are multiple AUR packages for installing from source or just pulling in the binaries. I've tried to package this myself but it's just a bit beyond my means. I think that if someone is more familiar with packaging wine related binaries or compiling with meson from source this would be a quick win. homepage URL: source URL: license: GPL 3.0 platforms: linux
I probably won't have time today, but I can take a look at this later. I'm pretty familiar with the nixpkgs wine build, and I've worked with the ZynAddSubFx build to add support for the Zyn-Fusion ui.
Amazing. I was able to take your PR and get Upright Piano working with Reaper as well. Thank you so much for the quick turn around, I really appreciate it.
Hi! I don't use NixOS myself, but if it helps, there's one person in the yabridge Discord currently using yabridge's master branch with NixOS. And I've also ran into another Nix build definition on GitHub in the past (but that one's pretty outdated by now).
I've just released with a lot of important new features, fixes and improvements including the first ever Linux <-Windows VST3 plugin bridge. I saw that the package created by for yabridge 2.2.1 has not been merged yet, but please let me know if you want to update the yabridge and yabridgectl packages for yabridge 3.0.0 and need any help! One additional dependency is now a patched version of the VST3 SDK which is patched to compile under winegcc and with support for Meson. I'm not quite sure how Nix packaging handles those things.
Thanks, I have it building right now. I'm just testing out vst3 plugins right now :smile:
:cry: For some reason neither the vst2 or vst3 plugins are working, even though they get synced. I think it might be an issue with my system installed wine. I'll submit my changes anyway so other people can test it out.
So they are found but yabridge fails to load them? Which Wine are your derivations using?
You can try running manually to see if that is the issue. A plain call should print: And should print:
I'm able to sync them with yabridgectl, but they fail to load in Reaper. I'm using (currently version 6.0) to build yabridge, but I have a custom build of wine staging 6.0 currently installed. seems to be working fine:
That indeed seems to work as expected, that's great news! If you start REAPER with and then take a look at after trying to scan/load a plugin then you'll probably be able to figure out what's wrong very quickly.
Hmm, apparently the path to the VST host is too long :stuckouttongue:
Huh I can't think of from the top of my head what would be throwing such an exception. That message printed after comes from a try-catch around the entire plugin startup that catches and prints any . Windows (and thus Wine, because it has to be compatible haha) has a path name limit of 255 characters, but none of those paths sound like they should come close to that.
Yeah, sorry. It was just a problem with my home environment. I was trying to test it without installing because I lost the nixpkgs commit I used to generate my home-manager environment. REAPER was just loading the old 2.2.1 yabridge- :woman_facepalming: I just finished rebuilding my home environment with a new nixpkgs commit, and it's working now :smile: .

Discussion:
<ins> { lib , stdenv , fetchFromGitHub , meson , ninja , pkg-config , wine , boost , libxcb }: let # Derived from subprojects/bitsery.wrap bitsery = rec { version = "5.2.0"; src = fetchFromGitHub { owner = "fraillt"; repo = "bitsery"; rev = "v${version}"; sha256 = "132b0n0xlpcv97l6bhk9n57hg95pkhwqzvr9jkv57nmggn76s5q7"; }; }; # Derived from subprojects/function2.wrap function2 = rec { version = "4.1.0"; src = fetchFromGitHub { owner = "Naios"; repo = "function2"; rev = version; sha256 = "0abrz2as62725g212qswi35nsdlf5wrhcz78hm2qidbgqr9rkir5"; }; }; # Derived from subprojects/tomlplusplus.wrap tomlplusplus = rec { version = "2.1.0"; src = fetchFromGitHub { owner = "marzer"; repo = "tomlplusplus"; rev = "v${version}"; sha256 = "0fspinnpyk1c9ay0h3wl8d4bbm6aswlypnrw2c7pk2i4mh981b4b"; }; }; # Derived from vst3.wrap vst3 = rec { version = "e2fbb41f28a4b311f2fc7d28e9b4330eec1802b6"; src = fetchFromGitHub { owner = "robbert-vdh"; repo = "vst3sdk"; rev = version; fetchSubmodules = true; sha256 = "1fqpylkbljifwdw2z75agc0yxnhmv4b09fxs3rvlw1qmm5mwx0p2"; }; }; in stdenv.mkDerivation rec { pname = "yabridge"; version = "3.0.0"; # NOTE: Also update yabridgectl's cargoSha256 when this is updated src = fetchFromGitHub { owner = "robbert-vdh"; repo = pname; rev = version; sha256 = "0ha7jhnkd2i49q5rz2hp7sq6hv19bir99x51hs6nvvcf16hlf2bp"; }; # Unpack subproject sources postUnpack = ''( cd "$sourceRoot/subprojects" cp -R --no-preserve=mode,ownership ${bitsery.src} bitsery-${bitsery.version} tar -xf bitsery-patch-${bitsery.version}.tar.xz cp -R --no-preserve=mode,ownership ${function2.src} function2-${function2.version} tar -xf function2-patch-${function2.version}.tar.xz cp -R --no-preserve=mode,ownership ${tomlplusplus.src} tomlplusplus cp -R --no-preserve=mode,ownership ${vst3.src} vst3 )''; postPatch = '' patchShebangs . ''; nativeBuildInputs = [ meson ninja pkg-config wine ]; buildInputs = [ boost libxcb ]; # Meson is no longer able to pick up Boost automatically. # https://github.com/NixOS/nixpkgs/issues/86131 BOOST_INCLUDEDIR = "${lib.getDev boost}/include"; BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; mesonFlags = [ "--cross-file" "cross-wine.conf" # Requires CMake and is unnecessary "-Dtomlplusplus:GENERATE_CMAKE_CONFIG=disabled" # tomlplusplus examples and tests don't build with winegcc "-Dtomlplusplus:BUILD_EXAMPLES=disabled" "-Dtomlplusplus:BUILD_TESTS=disabled" ]; installPhase = '' mkdir -p "$out/bin" "$out/lib" cp yabridge-group.exe{,.so} "$out/bin" cp yabridge-host.exe{,.so} "$out/bin" cp libyabridge-vst2.so "$out/lib" cp libyabridge-vst3.so "$out/lib" ''; meta = with lib; { description = "Yet Another VST bridge, run Windows VST2 plugins under Linux"; homepage = "https://github.com/robbert-vdh/yabridge"; license = licenses.gpl3Plus; maintainers = with maintainers; [ metadark ]; platforms = [ "x86_64-linux" ]; }; } </ins>

<ins> { lib, rustPlatform, yabridge }: rustPlatform.buildRustPackage rec { pname = "yabridgectl"; version = yabridge.version; src = yabridge.src; sourceRoot = "source/tools/yabridgectl"; cargoSha256 = "1sjhani8h7ap42yqlnj05sx59jyz2h12qlm1ibv8ldxcpwps0bwy"; patches = [ ./libyabridge-from-nix-profiles.patch ]; patchFlags = [ "-p3" ]; meta = with lib; { description = "A small, optional utility to help set up and update yabridge for several directories at once"; homepage = "https://github.com/robbert-vdh/yabridge/tree/master/tools/yabridgectl"; license = licenses.gpl3Plus; maintainers = with maintainers; [ metadark ]; }; } </ins>

<ins> diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs index c1c89cf..d7bd822 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs @@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet}; use std::env; use std::fmt::Display; use std::fs; +use std::iter; use std::path::{Path, PathBuf}; use which::which; use xdg::BaseDirectories; @@ -216,34 +217,24 @@ impl Config { } } None => { -                // Search in the system library locations and in `~/.local/share/yabridge` if no -                // path was set explicitely. We'll also search through `/usr/local/lib` just in case -                // but since we advocate against installing yabridge there we won't list this path -                // in the error message when `libyabridge-vst2.so` can't be found. -                let system_path = Path::new("/usr/lib"); +                // Search through NIX_PROFILES & data home directory if no path was set explicitly. +                let nix_profiles = env::var("NIX_PROFILES"); let user_path = xdg_dirs.get_data_home(); -                let lib_directories = [ -                    system_path, -                    // Used on Debian based distros -                    Path::new("/usr/lib/x86_64-linux-gnu"), -                    // Used on Fedora -                    Path::new("/usr/lib64"), -                    Path::new("/usr/local/lib"), -                    Path::new("/usr/local/lib/x86_64-linux-gnu"), -                    Path::new("/usr/local/lib64"), -                    &user_path, -                ]; +                let lib_directories = nix_profiles.iter() +                    .flat_map(|profiles| profiles.split(' ') +                              .map(|profile| Path::new(profile).join("lib"))) +                    .chain(iter::once(user_path.clone())); + let mut candidates = lib_directories -                    .iter() .map(|directory| directory.join(LIBYABRIDGE_VST2_NAME)); + match candidates.find(|directory| directory.exists()) { Some(candidate) => candidate, _ => { return Err(anyhow!( -                            "Could not find '{}' in either '{}' or '{}'. You can override the  -                            default search path using 'yabridgectl set --path=<path>'.", +                            "Could not find '{}' through 'NIX_PROFILES' or '{}'. You can override the  +                             default search path using 'yabridgectl set --path=<path>'.", LIBYABRIDGE_VST2_NAME, -                            system_path.display(), user_path.display() )); } diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs index 0db1bd4..221cdd0 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs @@ -102,7 +102,7 @@ fn main() -> Result<()> { .about("Path to the directory containing 'libyabridge-{vst2,vst3}.so'") .long_about( "Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this  -                             is not set, then yabridgectl will look in both '/usr/lib' and  +                             is not set, then yabridgectl will look through 'NIX_PROFILES' and  '~/.local/share/yabridge' by default.", ) .validator(validate_path) </ins>

metapixel = callPackage ../tools/graphics/metapixel { }; <ins> yabridge = callPackage ../tools/audio/yabridge { wine = wineWowPackages.minimal; }; yabridgectl = callPackage ../tools/audio/yabridgectl { }; </ins> ### APPLICATIONS/TERMINAL-EMULATORS alacritty = callPackage ../applications/terminal-emulators/alacritty {