diff options
author | Kira Bruneau <kira.bruneau@gmail.com> | 2021-01-09 02:15:41 -0500 |
---|---|---|
committer | Kira Bruneau <kira.bruneau@gmail.com> | 2021-02-14 19:43:49 -0500 |
commit | 9fce96e160094a1418ed8276d19df3f4df978de2 (patch) | |
tree | f52776beb21d2f658c610e055936fafdbc3e84ba /pkgs/tools/audio | |
parent | ff96a0fa5635770390b184ae74debea75c3fd534 (diff) | |
download | nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar.gz nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar.bz2 nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar.lz nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar.xz nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.tar.zst nixpkgs-9fce96e160094a1418ed8276d19df3f4df978de2.zip |
yabridge: init at 2.2.1
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/yabridge/default.nix | 112 | ||||
-rw-r--r-- | pkgs/tools/audio/yabridge/include-mutex.patch | 12 |
2 files changed, 124 insertions, 0 deletions
diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix new file mode 100644 index 00000000000..0cea57aeb49 --- /dev/null +++ b/pkgs/tools/audio/yabridge/default.nix @@ -0,0 +1,112 @@ +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +, pkg-config +, wine +, boost +, libxcb +}: + +let + # Derived from subprojects/bitsery.wrap + bitsery = rec { + version = "5.2.0"; + src = fetchFromGitHub { + owner = "fraillt"; + repo = "bitsery"; + rev = "v${version}"; + sha256 = "132b0n0xlpcv97l6bhk9n57hg95pkhwqzvr9jkv57nmggn76s5q7"; + }; + }; + + # Derived from subprojects/function2.wrap + function2 = rec { + version = "4.1.0"; + src = fetchFromGitHub { + owner = "Naios"; + repo = "function2"; + rev = version; + sha256 = "0abrz2as62725g212qswi35nsdlf5wrhcz78hm2qidbgqr9rkir5"; + }; + }; + + # Derived from subprojects/tomlplusplus.wrap + tomlplusplus = rec { + version = "2.1.0"; + src = fetchFromGitHub { + owner = "marzer"; + repo = "tomlplusplus"; + rev = "v${version}"; + sha256 = "0fspinnpyk1c9ay0h3wl8d4bbm6aswlypnrw2c7pk2i4mh981b4b"; + }; + }; +in stdenv.mkDerivation rec { + pname = "yabridge"; + version = "2.2.1"; + + src = fetchFromGitHub { + owner = "robbert-vdh"; + repo = pname; + rev = version; + sha256 = "0fg3r12hk8xm4698pbw9rjzcgrmibc2l3651pj96w0dzn6kyxi2g"; + }; + + # Unpack subproject sources + postUnpack = ''( + cd "$sourceRoot/subprojects" + cp -R --no-preserve=mode,ownership ${bitsery.src} bitsery-${bitsery.version} + tar -xf bitsery-patch-${bitsery.version}.tar.xz + cp -R --no-preserve=mode,ownership ${function2.src} function2-${function2.version} + tar -xf function2-patch-${function2.version}.tar.xz + cp -R --no-preserve=mode,ownership ${tomlplusplus.src} tomlplusplus + )''; + + patches = [ + ./include-mutex.patch + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wine + ]; + + buildInputs = [ + boost + libxcb + ]; + + # Meson is no longer able to pick up Boost automatically. + # https://github.com/NixOS/nixpkgs/issues/86131 + BOOST_INCLUDEDIR = "${lib.getDev boost}/include"; + BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; + + mesonFlags = [ + "--cross-file" "cross-wine.conf" + + # Requires CMake and is unnecessary + "-Dtomlplusplus:GENERATE_CMAKE_CONFIG=disabled" + + # tomlplusplus examples and tests don't build with winegcc + "-Dtomlplusplus:BUILD_EXAMPLES=disabled" + "-Dtomlplusplus:BUILD_TESTS=disabled" + ]; + + installPhase = '' + mkdir -p "$out/bin" "$out/lib" + cp yabridge-group.exe{,.so} "$out/bin" + cp yabridge-host.exe{,.so} "$out/bin" + cp libyabridge.so "$out/lib" + ''; + + 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 ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/tools/audio/yabridge/include-mutex.patch b/pkgs/tools/audio/yabridge/include-mutex.patch new file mode 100644 index 00000000000..300e949b20d --- /dev/null +++ b/pkgs/tools/audio/yabridge/include-mutex.patch @@ -0,0 +1,12 @@ +diff --git a/src/common/communication.h b/src/common/communication.h +index 968ac1e..f3a8453 100644 +--- a/src/common/communication.h ++++ b/src/common/communication.h +@@ -17,6 +17,7 @@ + #pragma once + + #include <atomic> ++#include <mutex> + + #include <bitsery/adapter/buffer.h> + #include <bitsery/bitsery.h> |