Merge pull request #120627 from MetaDark/yabridge
yabridge, yabridgectl: hard code wine path
This commit is contained in:
commit
8efeed72fb
|
@ -1,6 +1,8 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, substituteAll
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -77,6 +79,24 @@ in stdenv.mkDerivation rec {
|
||||||
cp -R --no-preserve=mode,ownership ${vst3.src} vst3
|
cp -R --no-preserve=mode,ownership ${vst3.src} vst3
|
||||||
)'';
|
)'';
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix printing wine version when using absolute path (remove patches in next release):
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/robbert-vdh/yabridge/commit/2aadf5256b3eafeb86efa8626247972dd33baa13.patch";
|
||||||
|
sha256 = "sha256-Nq9TQJxa22vJLmf+USyPBkF8cKyEzb1Lp2Rx86pDxnY=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/robbert-vdh/yabridge/commit/93df3fa1da6ffcc69a5b384ba04e3da7c5ef23ef.patch";
|
||||||
|
sha256 = "sha256-//8Dxolqe6n+aFo4yVnnMR9kSq/iEFE0qZPvcIBehvI=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Hard code wine path so wine version is correct in logs
|
||||||
|
(substituteAll {
|
||||||
|
src = ./hardcode-wine.patch;
|
||||||
|
inherit wine;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
'';
|
'';
|
||||||
|
@ -117,6 +137,14 @@ in stdenv.mkDerivation rec {
|
||||||
cp libyabridge-vst3.so "$out/lib"
|
cp libyabridge-vst3.so "$out/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# 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; {
|
meta = with lib; {
|
||||||
description = "Yet Another VST bridge, run Windows VST2 plugins under Linux";
|
description = "Yet Another VST bridge, run Windows VST2 plugins under Linux";
|
||||||
homepage = "https://github.com/robbert-vdh/yabridge";
|
homepage = "https://github.com/robbert-vdh/yabridge";
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp
|
||||||
|
index 1ff05bc..0723456 100644
|
||||||
|
--- a/src/plugin/utils.cpp
|
||||||
|
+++ b/src/plugin/utils.cpp
|
||||||
|
@@ -351,7 +351,7 @@ std::string get_wine_version() {
|
||||||
|
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;
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, rustPlatform, yabridge }:
|
{ lib
|
||||||
|
, rustPlatform
|
||||||
|
, yabridge
|
||||||
|
, makeWrapper
|
||||||
|
, wine
|
||||||
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "yabridgectl";
|
pname = "yabridgectl";
|
||||||
|
@ -17,6 +22,13 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
patchFlags = [ "-p3" ];
|
patchFlags = [ "-p3" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram "$out/bin/yabridgectl" \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ wine ]}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A small, optional utility to help set up and update yabridge for several directories at once";
|
description = "A small, optional utility to help set up and update yabridge for several directories at once";
|
||||||
homepage = "https://github.com/robbert-vdh/yabridge/tree/master/tools/yabridgectl";
|
homepage = "https://github.com/robbert-vdh/yabridge/tree/master/tools/yabridgectl";
|
||||||
|
|
|
@ -807,10 +807,12 @@ in
|
||||||
xtrt = callPackage ../tools/archivers/xtrt { };
|
xtrt = callPackage ../tools/archivers/xtrt { };
|
||||||
|
|
||||||
yabridge = callPackage ../tools/audio/yabridge {
|
yabridge = callPackage ../tools/audio/yabridge {
|
||||||
wine = wineWowPackages.minimal;
|
wine = wineWowPackages.staging;
|
||||||
};
|
};
|
||||||
|
|
||||||
yabridgectl = callPackage ../tools/audio/yabridgectl { };
|
yabridgectl = callPackage ../tools/audio/yabridgectl {
|
||||||
|
wine = wineWowPackages.staging;
|
||||||
|
};
|
||||||
|
|
||||||
### APPLICATIONS/TERMINAL-EMULATORS
|
### APPLICATIONS/TERMINAL-EMULATORS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue