summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@pm.me>2023-01-17 22:07:56 -0500
committerGitHub <noreply@github.com>2023-01-17 22:07:56 -0500
commit9428672eaaff08a4b289668bee4911da52dc0243 (patch)
treef0df6d72b33415ab0dc1b491654758ec3d36a9fb /pkgs
parentc8b20e1c4168642f9fc92fb8d7fa465eb7a18c5c (diff)
parent2132e1d35fbb96217174ef5de3a68de4e55c9b48 (diff)
Merge pull request #211265 from duxovni/yabridge-5.0.3
yabridge: 4.0.2 -> 5.0.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/audio/yabridge/default.nix25
-rw-r--r--pkgs/tools/audio/yabridge/hardcode-dependencies.patch13
-rw-r--r--pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch19
-rw-r--r--pkgs/tools/audio/yabridgectl/default.nix2
-rw-r--r--pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch9
5 files changed, 33 insertions, 35 deletions
diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix
index 8e68c6d1130aa..60af9b430a94b 100644
--- a/pkgs/tools/audio/yabridge/default.nix
+++ b/pkgs/tools/audio/yabridge/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , substituteAll
 , pkgsi686Linux
-, libnotify
+, dbus
 , meson
 , ninja
 , pkg-config
@@ -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";
@@ -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
@@ -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
@@ -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
@@ -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
     )
@@ -116,6 +126,7 @@ in multiStdenv.mkDerivation rec {
 
   buildInputs = [
     libxcb
+    dbus
   ];
 
   mesonFlags = [
@@ -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
   '';
 
diff --git a/pkgs/tools/audio/yabridge/hardcode-dependencies.patch b/pkgs/tools/audio/yabridge/hardcode-dependencies.patch
index e54ba1e9386d8..54c4460967d96 100644
--- a/pkgs/tools/audio/yabridge/hardcode-dependencies.patch
+++ b/pkgs/tools/audio/yabridge/hardcode-dependencies.patch
@@ -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
diff --git a/pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch b/pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch
index b687a6c01ae28..12db2ccc05ad6 100644
--- a/pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch
+++ b/pkgs/tools/audio/yabridgectl/chainloader-from-nix-profiles.patch
@@ -1,5 +1,5 @@
 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};
@@ -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 => {
@@ -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)
diff --git a/pkgs/tools/audio/yabridgectl/default.nix b/pkgs/tools/audio/yabridgectl/default.nix
index ebd5577e7d13d..5977274a4cdac 100644
--- a/pkgs/tools/audio/yabridgectl/default.nix
+++ b/pkgs/tools/audio/yabridgectl/default.nix
@@ -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
diff --git a/pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch b/pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch
index 2f860fb4f15e8..2fad3db87cdaa 100644
--- a/pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch
+++ b/pkgs/tools/audio/yabridgectl/remove-dependency-verification.patch
@@ -1,16 +1,17 @@
 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(())