diff options
author | Kira Bruneau <kira.bruneau@pm.me> | 2021-07-24 09:31:34 -0400 |
---|---|---|
committer | Kira Bruneau <kira.bruneau@pm.me> | 2021-11-26 21:57:07 -0500 |
commit | 6a24520028e8a9009ef6cefa7d29677363a4fe61 (patch) | |
tree | d6faef9fcc6cb41ea19f88b9a602a4bfe0313a5e /pkgs/tools/audio | |
parent | 47b35f569e84eb6dbbcf0a9fc75d8729ab8837fd (diff) | |
download | nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar.gz nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar.bz2 nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar.lz nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar.xz nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.tar.zst nixpkgs-6a24520028e8a9009ef6cefa7d29677363a4fe61.zip |
yabridge, yabridgectl: 3.6.0 → 3.7.0
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/yabridge/default.nix | 98 | ||||
-rw-r--r-- | pkgs/tools/audio/yabridge/hardcode-dependencies.patch | 43 | ||||
-rw-r--r-- | pkgs/tools/audio/yabridge/hardcode-wine.patch | 13 | ||||
-rw-r--r-- | pkgs/tools/audio/yabridgectl/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch | 8 |
5 files changed, 89 insertions, 75 deletions
diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix index 15f89a32962..c468a845a1a 100644 --- a/pkgs/tools/audio/yabridge/default.nix +++ b/pkgs/tools/audio/yabridge/default.nix @@ -1,96 +1,81 @@ { lib , multiStdenv , fetchFromGitHub -, fetchpatch , substituteAll +, pkgsi686Linux +, libnotify , meson , ninja , pkg-config , wine , boost , libxcb -, pkgsi686Linux +, nix-update-script }: let # Derived from subprojects/bitsery.wrap - bitsery = rec { - version = "5.2.0"; - src = fetchFromGitHub { - owner = "fraillt"; - repo = "bitsery"; - rev = "v${version}"; - hash = "sha256-Bxdtjn2v2lP2lCnvjzmct6QHT7FpwmXoSZtd2oEFS4w="; - }; + bitsery = fetchFromGitHub { + owner = "fraillt"; + repo = "bitsery"; + rev = "c0fc083c9de805e5825d7553507569febf6a6f93"; + sha256 = "sha256-VwzVtxt+E/SVcxqIJw8BKPO2q7bu/hkhY+nB7FHrZpY="; }; # Derived from subprojects/function2.wrap - function2 = rec { - version = "4.1.0"; - src = fetchFromGitHub { - owner = "Naios"; - repo = "function2"; - rev = version; - hash = "sha256-JceZU8ZvtYhFheh8BjMvjjZty4hcYxHEK+IIo5X4eSk="; - }; + function2 = fetchFromGitHub { + owner = "Naios"; + repo = "function2"; + rev = "02ca99831de59c7c3a4b834789260253cace0ced"; + sha256 = "sha256-wrt+fCcM6YD4ZRZYvqqB+fNakCNmltdPZKlNkPLtgMs="; }; # Derived from subprojects/tomlplusplus.wrap - tomlplusplus = rec { - version = "2.1.0"; - src = fetchFromGitHub { - owner = "marzer"; - repo = "tomlplusplus"; - rev = "v${version}"; - hash = "sha256-i6yAEqwkinkPEzzb6ynXytS1SEOUDwi8SixMf62NVzs="; - }; + tomlplusplus = fetchFromGitHub { + owner = "marzer"; + repo = "tomlplusplus"; + rev = "47216c8a73d77e7431ec536fb3e251aed06cc420"; + sha256 = "sha256-cwAzWu5j3ch/56a6JmEoKCsxVNTk6tiZswNdNT6qzX0="; }; # Derived from vst3.wrap - vst3 = rec { - version = "3.7.3_build_20-patched"; - src = fetchFromGitHub { - owner = "robbert-vdh"; - repo = "vst3sdk"; - rev = "v${version}"; - fetchSubmodules = true; - sha256 = "sha256-m2y7No7BNbIjLNgdAqIAEr6UuAZZ/wwM2+iPWKK17gQ="; - }; + vst3 = fetchFromGitHub { + owner = "robbert-vdh"; + repo = "vst3sdk"; + rev = "v3.7.3_build_20-patched"; + fetchSubmodules = true; + sha256 = "sha256-m2y7No7BNbIjLNgdAqIAEr6UuAZZ/wwM2+iPWKK17gQ="; }; in multiStdenv.mkDerivation rec { pname = "yabridge"; - version = "3.6.0"; + version = "3.7.0"; # NOTE: Also update yabridgectl's cargoHash when this is updated src = fetchFromGitHub { owner = "robbert-vdh"; repo = pname; rev = version; - hash = "sha256-lgSkZ0i2DojP6HXJP3cC5FUtfv7R/nsSiHT60bPSyLc="; + sha256 = "sha256-dz7kScNrVUsjokJntzUCJzDIboqi3vQI+RpXl0UFmUQ="; }; # 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 - cp -R --no-preserve=mode,ownership ${vst3.src} vst3 + cp -R --no-preserve=mode,ownership ${bitsery} bitsery + cp packagefiles/bitsery/* bitsery + cp -R --no-preserve=mode,ownership ${function2} function2 + cp packagefiles/function2/* function2 + cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus + cp -R --no-preserve=mode,ownership ${vst3} vst3 )''; patches = [ - # Hard code wine path so wine version is correct in logs + # Hard code bitbridge & runtime dependencies (substituteAll { - src = ./hardcode-wine.patch; - inherit wine; - }) - # Remove with next yabridge update - (fetchpatch { - name = "fix-for-wine-6.20.patch"; - url = "https://github.com/robbert-vdh/yabridge/commit/5be149cb525a638f7fc3adf84918c8239ee50ecf.patch"; - sha256 = "sha256-x/gfn4mKZIGQ4M0o/0LlZF8i8wZDx/bkwf8wp0BGDBo="; + src = ./hardcode-dependencies.patch; + boost32 = pkgsi686Linux.boost; + libxcb32 = pkgsi686Linux.xorg.libxcb; + inherit libnotify wine; }) ]; @@ -127,11 +112,6 @@ in multiStdenv.mkDerivation rec { "-Dtomlplusplus:BUILD_TESTS=disabled" ]; - preConfigure = '' - sed -i "221s|xcb.*|xcb_32bit_dep = winegcc.find_library('xcb', dirs: [ '${lib.getLib pkgsi686Linux.xorg.libxcb}/lib', ])|" meson.build - sed -i "199 i '${lib.getLib pkgsi686Linux.boost}/lib'," meson.build - ''; - installPhase = '' runHook preInstall mkdir -p "$out/bin" "$out/lib" @@ -150,6 +130,10 @@ in multiStdenv.mkDerivation rec { done ''; + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + meta = with lib; { description = "Yet Another VST bridge, run Windows VST2 plugins under Linux"; homepage = "https://github.com/robbert-vdh/yabridge"; diff --git a/pkgs/tools/audio/yabridge/hardcode-dependencies.patch b/pkgs/tools/audio/yabridge/hardcode-dependencies.patch new file mode 100644 index 00000000000..255b0eb88cb --- /dev/null +++ b/pkgs/tools/audio/yabridge/hardcode-dependencies.patch @@ -0,0 +1,43 @@ +diff --git a/meson.build b/meson.build +index 8eae0442..ec0649da 100644 +--- a/meson.build ++++ b/meson.build +@@ -196,6 +196,7 @@ if with_32bit_libraries or with_bitbridge + 'boost_filesystem', + static : with_static_boost, + dirs : [ ++ '@boost32@/lib', + # Used by Arch based distros + '/usr/local/lib32', + '/usr/lib32', +@@ -219,7 +220,7 @@ if is_64bit_system + xcb_64bit_dep = dependency('xcb') + endif + if with_32bit_libraries or with_bitbridge +- xcb_32bit_dep = winegcc.find_library('xcb') ++ xcb_32bit_dep = winegcc.find_library('xcb', dirs: ['@libxcb32@/lib']) + endif + + # These are all headers-only libraries, and thus won't require separate 32-bit +diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp +index 6e32b4c9..f6eb09eb 100644 +--- a/src/plugin/utils.cpp ++++ b/src/plugin/utils.cpp +@@ -107,7 +107,7 @@ std::string PluginInfo::wine_version() const { + 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; +@@ -436,7 +436,7 @@ Configuration load_config_for(const fs::path& yabridge_path) { + bool send_notification(const std::string& title, + const std::string body, + bool append_origin) { +- const fs::path notify_send_path = bp::search_path("notify-send"); ++ const fs::path notify_send_path = "@libnotify@/bin/notify-send"; + if (notify_send_path.empty()) { + return false; + } diff --git a/pkgs/tools/audio/yabridge/hardcode-wine.patch b/pkgs/tools/audio/yabridge/hardcode-wine.patch deleted file mode 100644 index d58aedeb27f..00000000000 --- a/pkgs/tools/audio/yabridge/hardcode-wine.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp -index 7fb7d1b3..eb227101 100644 ---- a/src/plugin/utils.cpp -+++ b/src/plugin/utils.cpp -@@ -105,5 +105,5 @@ std::string PluginInfo::wine_version() const { - 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; diff --git a/pkgs/tools/audio/yabridgectl/default.nix b/pkgs/tools/audio/yabridgectl/default.nix index 9e185b3ce72..902734de0bd 100644 --- a/pkgs/tools/audio/yabridgectl/default.nix +++ b/pkgs/tools/audio/yabridgectl/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { src = yabridge.src; sourceRoot = "source/tools/yabridgectl"; - cargoHash = "sha256-20sh9yovZHqoUk+3aVs/D8SWY29FdPjX+NeJt35KfWM="; + cargoSha256 = "sha256-/VREh/f4bAt2DXCqK0noEjn+4hcK5VZUn+gdbYbeAmk="; patches = [ # By default, yabridgectl locates libyabridge.so by using diff --git a/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch b/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch index ec42f98a2e8..7b8e10b2ba8 100644 --- a/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch +++ b/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch @@ -1,5 +1,5 @@ diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs -index 6e05e34..656eef3 100644 +index bc5ccfc4..c6d119bc 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs @@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet, HashSet}; @@ -10,7 +10,7 @@ index 6e05e34..656eef3 100644 use std::path::{Path, PathBuf}; use which::which; use xdg::BaseDirectories; -@@ -222,34 +223,24 @@ impl Config { +@@ -233,34 +234,24 @@ impl Config { } } None => { @@ -56,10 +56,10 @@ index 6e05e34..656eef3 100644 )); } diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs -index ce701b8..b6b9633 100644 +index 8c273f92..432619ec 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs -@@ -150,7 +150,7 @@ fn main() -> Result<()> { +@@ -148,7 +148,7 @@ fn main() -> Result<()> { .about("Path to the directory containing 'libyabridge-{vst2,vst3}.so'") .long_about( "Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \ |