about summary refs log tree commit diff
path: root/pkgs/tools/audio
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-08-21 12:09:59 +0200
committerGitHub <noreply@github.com>2021-08-21 12:09:59 +0200
commitc5915ce0a50e4a49ab7821d8eb22f8bf8d9597a3 (patch)
treef1feec8bafc02c359942c55ab4626272f15e1ca1 /pkgs/tools/audio
parentf580d0124414a6d7270bd1cc7268ebfeb86cb026 (diff)
parent26e0f8961cdaea4aaa5f4555e60b8d8be544c069 (diff)
Merge pull request #133575 from critbase/fix/yabridge-bitbridge
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r--pkgs/tools/audio/yabridge/default.nix19
-rw-r--r--pkgs/tools/audio/yabridge/hardcode-wine.patch6
-rw-r--r--pkgs/tools/audio/yabridgectl/default.nix2
3 files changed, 17 insertions, 10 deletions
diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix
index cbe35765cb4fc..ac5767b24219a 100644
--- a/pkgs/tools/audio/yabridge/default.nix
+++ b/pkgs/tools/audio/yabridge/default.nix
@@ -1,5 +1,5 @@
 { lib
-, stdenv
+, multiStdenv
 , fetchFromGitHub
 , substituteAll
 , meson
@@ -8,6 +8,7 @@
 , wine
 , boost
 , libxcb
+, pkgsi686Linux
 }:
 
 let
@@ -55,16 +56,16 @@ let
       sha256 = "sha256-39pvfcg4fvf7DAbAPzEHA1ja1LFL6r88nEwNYwaDC8w=";
     };
   };
-in stdenv.mkDerivation rec {
+in multiStdenv.mkDerivation rec {
   pname = "yabridge";
-  version = "3.3.1";
+  version = "3.5.2";
 
   # NOTE: Also update yabridgectl's cargoHash when this is updated
   src = fetchFromGitHub {
     owner = "robbert-vdh";
     repo = pname;
     rev = version;
-    hash = "sha256-3B+6YuCWVJljqdyGpePjPf5JDwLSWFNgOCeLt8e4mO8=";
+    hash = "sha256-SLiksc8lQo2A5sefKbcaJyhi8vPdp2p2Jbc7bvM0sDw=";
   };
 
   # Unpack subproject sources
@@ -109,6 +110,7 @@ in stdenv.mkDerivation rec {
 
   mesonFlags = [
     "--cross-file" "cross-wine.conf"
+    "-Dwith-bitbridge=true"
 
     # Requires CMake and is unnecessary
     "-Dtomlplusplus:GENERATE_CMAKE_CONFIG=disabled"
@@ -118,11 +120,16 @@ in stdenv.mkDerivation rec {
     "-Dtomlplusplus:BUILD_TESTS=disabled"
   ];
 
+  preConfigure = ''
+    sed -i "214s|xcb.*|xcb_32bit_dep = winegcc.find_library('xcb', dirs: [ '${lib.getLib pkgsi686Linux.xorg.libxcb}/lib', ])|" meson.build
+    sed -i "192 i '${lib.getLib pkgsi686Linux.boost}/lib'," meson.build
+  '';
+
   installPhase = ''
     runHook preInstall
     mkdir -p "$out/bin" "$out/lib"
-    cp yabridge-group.exe{,.so} "$out/bin"
-    cp yabridge-host.exe{,.so} "$out/bin"
+    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"
     runHook postInstall
diff --git a/pkgs/tools/audio/yabridge/hardcode-wine.patch b/pkgs/tools/audio/yabridge/hardcode-wine.patch
index 2b6ce1f448fae..d58aedeb27ffc 100644
--- a/pkgs/tools/audio/yabridge/hardcode-wine.patch
+++ b/pkgs/tools/audio/yabridge/hardcode-wine.patch
@@ -1,13 +1,13 @@
 diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp
-index 1ff05bc..0723456 100644
+index 7fb7d1b3..eb227101 100644
 --- a/src/plugin/utils.cpp
 +++ b/src/plugin/utils.cpp
-@@ -351,7 +351,7 @@ std::string get_wine_version() {
+@@ -105,5 +105,5 @@ std::string PluginInfo::wine_version() const {
          access(wineloader_path.c_str(), X_OK) == 0) {
          wine_path = wineloader_path;
      } else {
 -        wine_path = bp::search_path("wine").string();
 +        wine_path = "@wine@/bin/wine";
      }
- 
+
      bp::ipstream output;
diff --git a/pkgs/tools/audio/yabridgectl/default.nix b/pkgs/tools/audio/yabridgectl/default.nix
index bf0913372beb5..35c8b0c5aeff9 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";
-  cargoHash = "sha256-f5k5OF+bEzH0b6M14Mdp8t4Qd5dP5Qj2fDsdiG1MkYk=";
+  cargoHash = "sha256-2x3qB0LbCBUZ4zqKIXPtYdWis+4QANTaJdFvoFbccGE=";
 
   patches = [
     # By default, yabridgectl locates libyabridge.so by using