Merge pull request #303485 from kira-bruneau/yabridge

yabridge: workaround for wine 9.5

authored by Kira Bruneau and committed by GitHub 0c97ced7 141867ab

+21 -4
+6 -4
pkgs/tools/audio/yabridge/default.nix
··· 98 98 # Hard code bitbridge & runtime dependencies 99 99 (substituteAll { 100 100 src = ./hardcode-dependencies.patch; 101 + libdbus = dbus.lib; 101 102 libxcb32 = pkgsi686Linux.xorg.libxcb; 102 103 inherit wine; 103 104 }) ··· 148 149 149 150 # Hard code wine path in wrapper scripts generated by winegcc 150 151 postFixup = '' 151 - for exe in "$out"/bin/*.exe; do 152 - substituteInPlace "$exe" \ 153 - --replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"' 154 - done 152 + substituteInPlace "$out/bin/yabridge-host-32.exe" \ 153 + --replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"' 154 + 155 + substituteInPlace "$out/bin/yabridge-host.exe" \ 156 + --replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine64"' 155 157 ''; 156 158 157 159 passthru.updateScript = nix-update-script { };
+15
pkgs/tools/audio/yabridge/hardcode-dependencies.patch
··· 11 11 endif 12 12 13 13 # These are all headers-only libraries, and thus won't require separate 32-bit 14 + diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp 15 + index 66e08527..685c54af 100644 16 + --- a/src/common/notifications.cpp 17 + +++ b/src/common/notifications.cpp 18 + @@ -29,8 +29,8 @@ 19 + #include "process.h" 20 + #include "utils.h" 21 + 22 + -constexpr char libdbus_library_name[] = "libdbus-1.so.3"; 23 + -constexpr char libdbus_library_fallback_name[] = "libdbus-1.so"; 24 + +constexpr char libdbus_library_name[] = "@libdbus@/lib/libdbus-1.so.3"; 25 + +constexpr char libdbus_library_fallback_name[] = "@libdbus@/lib/libdbus-1.so"; 26 + 27 + std::atomic<void*> libdbus_handle = nullptr; 28 + std::mutex libdbus_mutex; 14 29 diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp 15 30 index 82db99a5..491f005d 100644 16 31 --- a/src/plugin/utils.cpp