Loading pkgs/tools/audio/yabridge/default.nix +18 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ , fetchFromGitHub , substituteAll , pkgsi686Linux , libnotify , dbus , meson , ninja , pkg-config Loading @@ -29,6 +29,14 @@ let sha256 = "sha256-VwzVtxt+E/SVcxqIJw8BKPO2q7bu/hkhY+nB7FHrZpY="; }; # Derived from subprojects/clap.wrap clap = fetchFromGitHub { owner = "free-audio"; repo = "clap"; rev = "1.1.4"; sha256 = "sha256-3zDvzC3Hs4OmT2qvaDa69rmBkHoQ8qY9TZlsPxsJA40="; }; # Derived from subprojects/function2.wrap function2 = fetchFromGitHub { owner = "Naios"; Loading Loading @@ -57,20 +65,20 @@ let vst3 = fetchFromGitHub { owner = "robbert-vdh"; repo = "vst3sdk"; rev = "v3.7.5_build_44-patched"; rev = "v3.7.7_build_19-patched"; fetchSubmodules = true; sha256 = "sha256-6cuEUa+BXa6MnAYIBq873n0NRLadcPfMX+kpf4ysE6M="; sha256 = "sha256-LsPHPoAL21XOKmF1Wl/tvLJGzjaCLjaDAcUtDvXdXSU="; }; in multiStdenv.mkDerivation rec { pname = "yabridge"; version = "4.0.2"; version = "5.0.3"; # NOTE: Also update yabridgectl's cargoHash when this is updated src = fetchFromGitHub { owner = "robbert-vdh"; repo = pname; rev = version; sha256 = "sha256-rce6gxnB+RpG84Xakw0h4vZ8lyEQ41swWQGuwpomV2I="; sha256 = "sha256-T3BU77BbVr6vlVoijUQy86eF0lCgM4S4d5VSnLE4pas="; }; # Unpack subproject sources Loading @@ -78,6 +86,7 @@ in multiStdenv.mkDerivation rec { cd "$sourceRoot/subprojects" cp -R --no-preserve=mode,ownership ${asio} asio cp -R --no-preserve=mode,ownership ${bitsery} bitsery cp -R --no-preserve=mode,ownership ${clap} clap cp -R --no-preserve=mode,ownership ${function2} function2 cp -R --no-preserve=mode,ownership ${ghc_filesystem} ghc_filesystem cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus Loading @@ -89,7 +98,7 @@ in multiStdenv.mkDerivation rec { (substituteAll { src = ./hardcode-dependencies.patch; libxcb32 = pkgsi686Linux.xorg.libxcb; inherit libnotify wine; inherit wine; }) # Patch the chainloader to search for libyabridge through NIX_PROFILES Loading @@ -102,6 +111,7 @@ in multiStdenv.mkDerivation rec { cd subprojects cp packagefiles/asio/* asio cp packagefiles/bitsery/* bitsery cp packagefiles/clap/* clap cp packagefiles/function2/* function2 cp packagefiles/ghc_filesystem/* ghc_filesystem ) Loading @@ -116,6 +126,7 @@ in multiStdenv.mkDerivation rec { buildInputs = [ libxcb dbus ]; mesonFlags = [ Loading @@ -130,7 +141,7 @@ in multiStdenv.mkDerivation rec { runHook preInstall mkdir -p "$out/bin" "$out/lib" cp yabridge-host{,-32}.exe{,.so} "$out/bin" cp libyabridge{,-chainloader}-{vst2,vst3}.so "$out/lib" cp libyabridge{,-chainloader}-{vst2,vst3,clap}.so "$out/lib" runHook postInstall ''; Loading pkgs/tools/audio/yabridge/hardcode-dependencies.patch +0 −13 Original line number Diff line number Diff line Loading @@ -11,19 +11,6 @@ index bfab6361..9085db0f 100644 endif # These are all headers-only libraries, and thus won't require separate 32-bit diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp index da27a1bf..18482e06 100644 --- a/src/common/notifications.cpp +++ b/src/common/notifications.cpp @@ -49,7 +49,7 @@ bool send_notification(const std::string& title, } } - Process process("notify-send"); + Process process("@libnotify@/bin/notify-send"); process.arg("--urgency=normal"); process.arg("--app-name=yabridge"); process.arg(title); diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp index acd431bc..8566281c 100644 --- a/src/plugin/utils.cpp Loading pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch +9 −10 Original line number Diff line number Diff line diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs index 523a083b..399302e0 100644 index 76075938..4f69642f 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs @@ -22,6 +22,7 @@ use serde_derive::{Deserialize, Serialize}; Loading @@ -10,7 +10,7 @@ index 523a083b..399302e0 100644 use std::path::{Path, PathBuf}; use which::which; use xdg::BaseDirectories; @@ -213,34 +214,27 @@ impl Config { @@ -225,34 +226,27 @@ impl Config { } } None => { Loading Loading @@ -50,24 +50,23 @@ index 523a083b..399302e0 100644 _ => { 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>'.", default search path using 'yabridgectl set --path=<path>'.", VST2_CHAINLOADER_NAME, - system_path.display(), user_path.display() )); } diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs index 302ff8ae..9d9bbeac 100644 index e5618575..72b730f1 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs @@ -130,7 +130,7 @@ fn main() -> Result<()> { .help("Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'") @@ -135,7 +135,7 @@ fn main() -> Result<()> { .long_help( "Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'. \ - If this is not set, then yabridgectl will look in both '/usr/lib' and \ + If this is not set, then yabridgectl will look through 'NIX_PROFILES' and \ "Path to the directory containing \ 'libyabridge-chainloader-{clap,vst2,vst3}.so'. If this is not set, \ - then yabridgectl will look in both '/usr/lib' and \ + then yabridgectl will look through 'NIX_PROFILES' and \ '~/.local/share/yabridge' by default.", ) .validator(validate_path) pkgs/tools/audio/yabridgectl/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { src = yabridge.src; sourceRoot = "source/tools/yabridgectl"; cargoSha256 = "sha256-09GsrQAI08Qih/TpbEAh4hn7IfvwyFdEoyzsSjcjGXY="; cargoSha256 = "sha256-X7YcIjKLzuts7d9VD6hLFCiEBrY4opi8nInjPs9jAh0="; patches = [ # Patch yabridgectl to search for the chainloader through NIX_PROFILES Loading pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch +5 −4 Original line number Diff line number Diff line diff --git a/tools/yabridgectl/src/actions.rs b/tools/yabridgectl/src/actions.rs index 9ecdb140..061a8ff3 100644 index 03617c4d..19ade93e 100644 --- a/tools/yabridgectl/src/actions.rs +++ b/tools/yabridgectl/src/actions.rs @@ -712,13 +712,6 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> { @@ -835,14 +835,6 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> { // be the case if we get to this point though. verify_path_setup(config)?; - // This check is only performed once per combination of Wine and yabridge versions - verify_wine_setup(config)?; - - // Yabridge uses notify-send to relay important information when something's very wrong, so - // we'll check whether this is installed - // Yabridge uses D-Bus notifications to relay important information when something's very wrong, - // so we'll check whether `libdbus-1.so` is available (even though it would be very odd if it - // isn't) - verify_external_dependencies()?; - Ok(()) Loading Loading
pkgs/tools/audio/yabridge/default.nix +18 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ , fetchFromGitHub , substituteAll , pkgsi686Linux , libnotify , dbus , meson , ninja , pkg-config Loading @@ -29,6 +29,14 @@ let sha256 = "sha256-VwzVtxt+E/SVcxqIJw8BKPO2q7bu/hkhY+nB7FHrZpY="; }; # Derived from subprojects/clap.wrap clap = fetchFromGitHub { owner = "free-audio"; repo = "clap"; rev = "1.1.4"; sha256 = "sha256-3zDvzC3Hs4OmT2qvaDa69rmBkHoQ8qY9TZlsPxsJA40="; }; # Derived from subprojects/function2.wrap function2 = fetchFromGitHub { owner = "Naios"; Loading Loading @@ -57,20 +65,20 @@ let vst3 = fetchFromGitHub { owner = "robbert-vdh"; repo = "vst3sdk"; rev = "v3.7.5_build_44-patched"; rev = "v3.7.7_build_19-patched"; fetchSubmodules = true; sha256 = "sha256-6cuEUa+BXa6MnAYIBq873n0NRLadcPfMX+kpf4ysE6M="; sha256 = "sha256-LsPHPoAL21XOKmF1Wl/tvLJGzjaCLjaDAcUtDvXdXSU="; }; in multiStdenv.mkDerivation rec { pname = "yabridge"; version = "4.0.2"; version = "5.0.3"; # NOTE: Also update yabridgectl's cargoHash when this is updated src = fetchFromGitHub { owner = "robbert-vdh"; repo = pname; rev = version; sha256 = "sha256-rce6gxnB+RpG84Xakw0h4vZ8lyEQ41swWQGuwpomV2I="; sha256 = "sha256-T3BU77BbVr6vlVoijUQy86eF0lCgM4S4d5VSnLE4pas="; }; # Unpack subproject sources Loading @@ -78,6 +86,7 @@ in multiStdenv.mkDerivation rec { cd "$sourceRoot/subprojects" cp -R --no-preserve=mode,ownership ${asio} asio cp -R --no-preserve=mode,ownership ${bitsery} bitsery cp -R --no-preserve=mode,ownership ${clap} clap cp -R --no-preserve=mode,ownership ${function2} function2 cp -R --no-preserve=mode,ownership ${ghc_filesystem} ghc_filesystem cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus Loading @@ -89,7 +98,7 @@ in multiStdenv.mkDerivation rec { (substituteAll { src = ./hardcode-dependencies.patch; libxcb32 = pkgsi686Linux.xorg.libxcb; inherit libnotify wine; inherit wine; }) # Patch the chainloader to search for libyabridge through NIX_PROFILES Loading @@ -102,6 +111,7 @@ in multiStdenv.mkDerivation rec { cd subprojects cp packagefiles/asio/* asio cp packagefiles/bitsery/* bitsery cp packagefiles/clap/* clap cp packagefiles/function2/* function2 cp packagefiles/ghc_filesystem/* ghc_filesystem ) Loading @@ -116,6 +126,7 @@ in multiStdenv.mkDerivation rec { buildInputs = [ libxcb dbus ]; mesonFlags = [ Loading @@ -130,7 +141,7 @@ in multiStdenv.mkDerivation rec { runHook preInstall mkdir -p "$out/bin" "$out/lib" cp yabridge-host{,-32}.exe{,.so} "$out/bin" cp libyabridge{,-chainloader}-{vst2,vst3}.so "$out/lib" cp libyabridge{,-chainloader}-{vst2,vst3,clap}.so "$out/lib" runHook postInstall ''; Loading
pkgs/tools/audio/yabridge/hardcode-dependencies.patch +0 −13 Original line number Diff line number Diff line Loading @@ -11,19 +11,6 @@ index bfab6361..9085db0f 100644 endif # These are all headers-only libraries, and thus won't require separate 32-bit diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp index da27a1bf..18482e06 100644 --- a/src/common/notifications.cpp +++ b/src/common/notifications.cpp @@ -49,7 +49,7 @@ bool send_notification(const std::string& title, } } - Process process("notify-send"); + Process process("@libnotify@/bin/notify-send"); process.arg("--urgency=normal"); process.arg("--app-name=yabridge"); process.arg(title); diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp index acd431bc..8566281c 100644 --- a/src/plugin/utils.cpp Loading
pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch +9 −10 Original line number Diff line number Diff line diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs index 523a083b..399302e0 100644 index 76075938..4f69642f 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs @@ -22,6 +22,7 @@ use serde_derive::{Deserialize, Serialize}; Loading @@ -10,7 +10,7 @@ index 523a083b..399302e0 100644 use std::path::{Path, PathBuf}; use which::which; use xdg::BaseDirectories; @@ -213,34 +214,27 @@ impl Config { @@ -225,34 +226,27 @@ impl Config { } } None => { Loading Loading @@ -50,24 +50,23 @@ index 523a083b..399302e0 100644 _ => { 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>'.", default search path using 'yabridgectl set --path=<path>'.", VST2_CHAINLOADER_NAME, - system_path.display(), user_path.display() )); } diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs index 302ff8ae..9d9bbeac 100644 index e5618575..72b730f1 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs @@ -130,7 +130,7 @@ fn main() -> Result<()> { .help("Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'") @@ -135,7 +135,7 @@ fn main() -> Result<()> { .long_help( "Path to the directory containing 'libyabridge-chainloader-{vst2,vst3}.so'. \ - If this is not set, then yabridgectl will look in both '/usr/lib' and \ + If this is not set, then yabridgectl will look through 'NIX_PROFILES' and \ "Path to the directory containing \ 'libyabridge-chainloader-{clap,vst2,vst3}.so'. If this is not set, \ - then yabridgectl will look in both '/usr/lib' and \ + then yabridgectl will look through 'NIX_PROFILES' and \ '~/.local/share/yabridge' by default.", ) .validator(validate_path)
pkgs/tools/audio/yabridgectl/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { src = yabridge.src; sourceRoot = "source/tools/yabridgectl"; cargoSha256 = "sha256-09GsrQAI08Qih/TpbEAh4hn7IfvwyFdEoyzsSjcjGXY="; cargoSha256 = "sha256-X7YcIjKLzuts7d9VD6hLFCiEBrY4opi8nInjPs9jAh0="; patches = [ # Patch yabridgectl to search for the chainloader through NIX_PROFILES Loading
pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch +5 −4 Original line number Diff line number Diff line diff --git a/tools/yabridgectl/src/actions.rs b/tools/yabridgectl/src/actions.rs index 9ecdb140..061a8ff3 100644 index 03617c4d..19ade93e 100644 --- a/tools/yabridgectl/src/actions.rs +++ b/tools/yabridgectl/src/actions.rs @@ -712,13 +712,6 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> { @@ -835,14 +835,6 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> { // be the case if we get to this point though. verify_path_setup(config)?; - // This check is only performed once per combination of Wine and yabridge versions - verify_wine_setup(config)?; - - // Yabridge uses notify-send to relay important information when something's very wrong, so - // we'll check whether this is installed - // Yabridge uses D-Bus notifications to relay important information when something's very wrong, - // so we'll check whether `libdbus-1.so` is available (even though it would be very odd if it - // isn't) - verify_external_dependencies()?; - Ok(()) Loading