Merge pull request #120627 from MetaDark/yabridge

yabridge, yabridgectl: hard code wine path

authored by

Sandro and committed by
GitHub
8efeed72 e9547b6a

+58 -3
+28
pkgs/tools/audio/yabridge/default.nix
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 , meson 5 , ninja 6 , pkg-config ··· 77 cp -R --no-preserve=mode,ownership ${vst3.src} vst3 78 )''; 79 80 postPatch = '' 81 patchShebangs . 82 ''; ··· 115 cp yabridge-host.exe{,.so} "$out/bin" 116 cp libyabridge-vst2.so "$out/lib" 117 cp libyabridge-vst3.so "$out/lib" 118 ''; 119 120 meta = with lib; {
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 + , fetchpatch 5 + , substituteAll 6 , meson 7 , ninja 8 , pkg-config ··· 79 cp -R --no-preserve=mode,ownership ${vst3.src} vst3 80 )''; 81 82 + patches = [ 83 + # Fix printing wine version when using absolute path (remove patches in next release): 84 + (fetchpatch { 85 + url = "https://github.com/robbert-vdh/yabridge/commit/2aadf5256b3eafeb86efa8626247972dd33baa13.patch"; 86 + sha256 = "sha256-Nq9TQJxa22vJLmf+USyPBkF8cKyEzb1Lp2Rx86pDxnY="; 87 + }) 88 + (fetchpatch { 89 + url = "https://github.com/robbert-vdh/yabridge/commit/93df3fa1da6ffcc69a5b384ba04e3da7c5ef23ef.patch"; 90 + sha256 = "sha256-//8Dxolqe6n+aFo4yVnnMR9kSq/iEFE0qZPvcIBehvI="; 91 + }) 92 + 93 + # Hard code wine path so wine version is correct in logs 94 + (substituteAll { 95 + src = ./hardcode-wine.patch; 96 + inherit wine; 97 + }) 98 + ]; 99 + 100 postPatch = '' 101 patchShebangs . 102 ''; ··· 135 cp yabridge-host.exe{,.so} "$out/bin" 136 cp libyabridge-vst2.so "$out/lib" 137 cp libyabridge-vst3.so "$out/lib" 138 + ''; 139 + 140 + # Hard code wine path in wrapper scripts generated by winegcc 141 + postFixup = '' 142 + for exe in "$out"/bin/*.exe; do 143 + substituteInPlace "$exe" \ 144 + --replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"' 145 + done 146 ''; 147 148 meta = with lib; {
+13
pkgs/tools/audio/yabridge/hardcode-wine.patch
···
··· 1 + diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp 2 + index 1ff05bc..0723456 100644 3 + --- a/src/plugin/utils.cpp 4 + +++ b/src/plugin/utils.cpp 5 + @@ -351,7 +351,7 @@ std::string get_wine_version() { 6 + access(wineloader_path.c_str(), X_OK) == 0) { 7 + wine_path = wineloader_path; 8 + } else { 9 + - wine_path = bp::search_path("wine").string(); 10 + + wine_path = "@wine@/bin/wine"; 11 + } 12 + 13 + bp::ipstream output;
+13 -1
pkgs/tools/audio/yabridgectl/default.nix
··· 1 - { lib, rustPlatform, yabridge }: 2 3 rustPlatform.buildRustPackage rec { 4 pname = "yabridgectl"; ··· 16 ]; 17 18 patchFlags = [ "-p3" ]; 19 20 meta = with lib; { 21 description = "A small, optional utility to help set up and update yabridge for several directories at once";
··· 1 + { lib 2 + , rustPlatform 3 + , yabridge 4 + , makeWrapper 5 + , wine 6 + }: 7 8 rustPlatform.buildRustPackage rec { 9 pname = "yabridgectl"; ··· 21 ]; 22 23 patchFlags = [ "-p3" ]; 24 + 25 + nativeBuildInputs = [ makeWrapper ]; 26 + 27 + postFixup = '' 28 + wrapProgram "$out/bin/yabridgectl" \ 29 + --prefix PATH : ${lib.makeBinPath [ wine ]} 30 + ''; 31 32 meta = with lib; { 33 description = "A small, optional utility to help set up and update yabridge for several directories at once";
+4 -2
pkgs/top-level/all-packages.nix
··· 807 xtrt = callPackage ../tools/archivers/xtrt { }; 808 809 yabridge = callPackage ../tools/audio/yabridge { 810 - wine = wineWowPackages.minimal; 811 }; 812 813 - yabridgectl = callPackage ../tools/audio/yabridgectl { }; 814 815 ### APPLICATIONS/TERMINAL-EMULATORS 816
··· 807 xtrt = callPackage ../tools/archivers/xtrt { }; 808 809 yabridge = callPackage ../tools/audio/yabridge { 810 + wine = wineWowPackages.staging; 811 }; 812 813 + yabridgectl = callPackage ../tools/audio/yabridgectl { 814 + wine = wineWowPackages.staging; 815 + }; 816 817 ### APPLICATIONS/TERMINAL-EMULATORS 818