20 airwave-src = fetchFromGitHub {
21 owner = "phantom-code";
24 sha256 = "1ban59skw422mak3cp57lj27hgq5d3a4f6y79ysjnamf8rpz9x4s";
27 vst-sdk = stdenv.mkDerivation rec {
28 name = "vstsdk369_01_03_2018_build_132";
31 url = "http://www.steinberg.net/en/company/developers.html";
32 sha256 = "0r29fv6yhm2m5yznn8m4my7fq01w1lpphax4sshagy6b1dgjlv3w";
34 nativeBuildInputs = [ unzip ];
35 installPhase = "cp -r . $out";
36 meta.license = lib.licenses.unfree;
39 wine-wow64 = wine.override {
40 wineRelease = "stable";
41 wineBuild = "wineWow";
44 wine-xembed = wine-wow64.overrideDerivation (oldAttrs: {
45 patchFlags = [ "-p2" ];
46 patches = [ "${airwave-src}/fix-xembed-wine-windows.patch" ];
51 multiStdenv.mkDerivation {
71 # Binaries not used directly should land in libexec/.
72 substituteInPlace src/common/storage.cpp --replace '"/bin"' '"/libexec"'
74 # For airwave-host-32.exe.so, point wineg++ to 32-bit versions of
75 # these libraries, as $NIX_LDFLAGS contains only 64-bit ones.
76 substituteInPlace src/host/CMakeLists.txt --replace '-m32' \
77 '-m32 -L${wine-xembed}/lib -L${wine-xembed}/lib/wine -L${multiStdenv.cc.libc.out}/lib/32'
80 # libstdc++.so link gets lost in 64-bit executables during
84 # Cf. https://github.com/phantom-code/airwave/issues/57
85 hardeningDisable = [ "format" ];
87 cmakeFlags = [ "-DVSTSDK_PATH=${vst-sdk}/VST2_SDK" ];
90 mv $out/bin $out/libexec
92 mv $out/libexec/airwave-manager $out/bin
93 wrapProgram $out/libexec/airwave-host-32.exe --set WINELOADER ${wine-xembed}/bin/wine
94 wrapProgram $out/libexec/airwave-host-64.exe --set WINELOADER ${wine-xembed}/bin/wine64
98 description = "WINE-based VST bridge for Linux VST hosts";
100 Airwave is a wine based VST bridge, that allows for the use of
101 Windows 32- and 64-bit VST 2.4 audio plugins with Linux VST
102 hosts. Due to the use of shared memory, only one extra copying
103 is made for each data transfer. Airwave also uses the XEMBED
104 protocol to correctly embed the plugin editor into the host
107 homepage = "https://github.com/phantom-code/airwave";
108 license = licenses.mit;
109 platforms = [ "x86_64-linux" ];
110 maintainers = with maintainers; [ michalrus ];
111 hydraPlatforms = [ ];