about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio/yabridge/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/audio/yabridge/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/audio/yabridge/default.nix33
1 files changed, 30 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/tools/audio/yabridge/default.nix b/nixpkgs/pkgs/tools/audio/yabridge/default.nix
index c09045bdb6e4..0013fac23a04 100644
--- a/nixpkgs/pkgs/tools/audio/yabridge/default.nix
+++ b/nixpkgs/pkgs/tools/audio/yabridge/default.nix
@@ -1,6 +1,8 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
+, substituteAll
 , meson
 , ninja
 , pkg-config
@@ -56,14 +58,14 @@ let
   };
 in stdenv.mkDerivation rec {
   pname = "yabridge";
-  version = "3.1.0";
+  version = "3.2.0";
 
   # NOTE: Also update yabridgectl's cargoHash when this is updated
   src = fetchFromGitHub {
     owner = "robbert-vdh";
     repo = pname;
     rev = version;
-    hash = "sha256-xvKjb+ql3WxnGHqcn3WnxunY5+s9f8Gt/n6EFSBrNdI=";
+    hash = "sha256-UT6st0Rc6HOaObE3N+qlPZZ8U1gl/MFLU0mjFuScdes=";
   };
 
   # Unpack subproject sources
@@ -77,6 +79,21 @@ in stdenv.mkDerivation rec {
     cp -R --no-preserve=mode,ownership ${vst3.src} vst3
   )'';
 
+  patches = [
+    # Fix for wine 6.8+ (remove patch in next release):
+    (fetchpatch {
+      url = "https://github.com/robbert-vdh/yabridge/commit/5577c4bfd842c60a8ae8ce2889bbfeb53a51c62b.patch";
+      sha256 = "sha256-bTT08iWwDBVqi2PZPa7oal7/MqVu8t2Bh1gpjFMqLvQ=";
+      excludes = [ "CHANGELOG.md" ];
+    })
+
+    # Hard code wine path so wine version is correct in logs
+    (substituteAll {
+      src = ./hardcode-wine.patch;
+      inherit wine;
+    })
+  ];
+
   postPatch = ''
     patchShebangs .
   '';
@@ -110,18 +127,28 @@ in stdenv.mkDerivation rec {
   ];
 
   installPhase = ''
+    runHook preInstall
     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"
+    runHook postInstall
+  '';
+
+  # Hard code wine path in wrapper scripts generated by winegcc
+  postFixup = ''
+    for exe in "$out"/bin/*.exe; do
+      substituteInPlace "$exe" \
+        --replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"'
+    done
   '';
 
   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 ];
+    maintainers = with maintainers; [ kira-bruneau ];
     platforms = [ "x86_64-linux" ];
   };
 }