Merge pull request #156261 from kira-bruneau/yabridge

yabridge, yabridgectl: 3.7.0 → 3.8.0

authored by Kira Bruneau and committed by GitHub 927839fd 33f6c9d9

+20 -17
+6 -6
pkgs/tools/audio/yabridge/default.nix
··· 34 tomlplusplus = fetchFromGitHub { 35 owner = "marzer"; 36 repo = "tomlplusplus"; 37 - rev = "47216c8a73d77e7431ec536fb3e251aed06cc420"; 38 - sha256 = "sha256-cwAzWu5j3ch/56a6JmEoKCsxVNTk6tiZswNdNT6qzX0="; 39 }; 40 41 # Derived from vst3.wrap 42 vst3 = fetchFromGitHub { 43 owner = "robbert-vdh"; 44 repo = "vst3sdk"; 45 - rev = "v3.7.3_build_20-patched"; 46 fetchSubmodules = true; 47 - sha256 = "sha256-m2y7No7BNbIjLNgdAqIAEr6UuAZZ/wwM2+iPWKK17gQ="; 48 }; 49 in multiStdenv.mkDerivation rec { 50 pname = "yabridge"; 51 - version = "3.7.0"; 52 53 # NOTE: Also update yabridgectl's cargoHash when this is updated 54 src = fetchFromGitHub { 55 owner = "robbert-vdh"; 56 repo = pname; 57 rev = version; 58 - sha256 = "sha256-dz7kScNrVUsjokJntzUCJzDIboqi3vQI+RpXl0UFmUQ="; 59 }; 60 61 # Unpack subproject sources
··· 34 tomlplusplus = fetchFromGitHub { 35 owner = "marzer"; 36 repo = "tomlplusplus"; 37 + rev = "8e669aa6990e0ed219c169d491472d749f54c393"; 38 + sha256 = "sha256-l8ckbCqjz3GUfwStcl3H2C+un5dZfT2uLtayvdu93D4="; 39 }; 40 41 # Derived from vst3.wrap 42 vst3 = fetchFromGitHub { 43 owner = "robbert-vdh"; 44 repo = "vst3sdk"; 45 + rev = "v3.7.4_build_25-patched"; 46 fetchSubmodules = true; 47 + sha256 = "sha256-oHRJZItw+he5M+beVZkUrhJir6rgFZ80ORzA73mJT2A="; 48 }; 49 in multiStdenv.mkDerivation rec { 50 pname = "yabridge"; 51 + version = "3.8.0"; 52 53 # NOTE: Also update yabridgectl's cargoHash when this is updated 54 src = fetchFromGitHub { 55 owner = "robbert-vdh"; 56 repo = pname; 57 rev = version; 58 + sha256 = "sha256-XacJjHxsp60/l36pFPGonUyOsyFF2lmqplAaisHXZDY="; 59 }; 60 61 # Unpack subproject sources
+4 -4
pkgs/tools/audio/yabridge/hardcode-dependencies.patch
··· 1 diff --git a/meson.build b/meson.build 2 - index 8eae0442..ec0649da 100644 3 --- a/meson.build 4 +++ b/meson.build 5 - @@ -196,6 +196,7 @@ if with_32bit_libraries or with_bitbridge 6 'boost_filesystem', 7 static : with_static_boost, 8 dirs : [ ··· 10 # Used by Arch based distros 11 '/usr/local/lib32', 12 '/usr/lib32', 13 - @@ -219,7 +220,7 @@ if is_64bit_system 14 xcb_64bit_dep = dependency('xcb') 15 endif 16 if with_32bit_libraries or with_bitbridge ··· 20 21 # These are all headers-only libraries, and thus won't require separate 32-bit 22 diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp 23 - index 6e32b4c9..f6eb09eb 100644 24 --- a/src/plugin/utils.cpp 25 +++ b/src/plugin/utils.cpp 26 @@ -107,7 +107,7 @@ std::string PluginInfo::wine_version() const {
··· 1 diff --git a/meson.build b/meson.build 2 + index 95ecb728..cb30f3af 100644 3 --- a/meson.build 4 +++ b/meson.build 5 + @@ -201,6 +201,7 @@ if with_32bit_libraries or with_bitbridge 6 'boost_filesystem', 7 static : with_static_boost, 8 dirs : [ ··· 10 # Used by Arch based distros 11 '/usr/local/lib32', 12 '/usr/lib32', 13 + @@ -224,7 +225,7 @@ if is_64bit_system 14 xcb_64bit_dep = dependency('xcb') 15 endif 16 if with_32bit_libraries or with_bitbridge ··· 20 21 # These are all headers-only libraries, and thus won't require separate 32-bit 22 diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp 23 + index 1a457f03..20ca1e63 100644 24 --- a/src/plugin/utils.cpp 25 +++ b/src/plugin/utils.cpp 26 @@ -107,7 +107,7 @@ std::string PluginInfo::wine_version() const {
+1 -1
pkgs/tools/audio/yabridgectl/default.nix
··· 11 12 src = yabridge.src; 13 sourceRoot = "source/tools/yabridgectl"; 14 - cargoSha256 = "sha256-/VREh/f4bAt2DXCqK0noEjn+4hcK5VZUn+gdbYbeAmk="; 15 16 patches = [ 17 # By default, yabridgectl locates libyabridge.so by using
··· 11 12 src = yabridge.src; 13 sourceRoot = "source/tools/yabridgectl"; 14 + cargoSha256 = "sha256-pwy2Q2HUCihr7W81hGvDm9EiZHk9G8knSy0yxPy6hl8="; 15 16 patches = [ 17 # By default, yabridgectl locates libyabridge.so by using
+9 -6
pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch
··· 1 diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs 2 - index bc5ccfc4..c6d119bc 100644 3 --- a/tools/yabridgectl/src/config.rs 4 +++ b/tools/yabridgectl/src/config.rs 5 @@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet, HashSet}; ··· 10 use std::path::{Path, PathBuf}; 11 use which::which; 12 use xdg::BaseDirectories; 13 - @@ -233,34 +234,24 @@ impl Config { 14 } 15 } 16 None => { ··· 20 - // in the error message when `libyabridge-vst2.so` can't be found. 21 - let system_path = Path::new("/usr/lib"); 22 + // Search through NIX_PROFILES & data home directory if no path was set explicitly. 23 + let nix_profiles = env::var("NIX_PROFILES"); 24 let user_path = xdg_dirs.get_data_home(); 25 - let lib_directories = [ ··· 35 - ]; 36 + let lib_directories = nix_profiles.iter() 37 + .flat_map(|profiles| profiles.split(' ') 38 + .map(|profile| Path::new(profile).join("lib"))) 39 + .chain(iter::once(user_path.clone())); 40 + ··· 56 )); 57 } 58 diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs 59 - index 8c273f92..432619ec 100644 60 --- a/tools/yabridgectl/src/main.rs 61 +++ b/tools/yabridgectl/src/main.rs 62 - @@ -148,7 +148,7 @@ fn main() -> Result<()> { 63 - .about("Path to the directory containing 'libyabridge-{vst2,vst3}.so'") 64 - .long_about( 65 "Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \ 66 - is not set, then yabridgectl will look in both '/usr/lib' and \ 67 + is not set, then yabridgectl will look through 'NIX_PROFILES' and \
··· 1 diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs 2 + index bc5f6a81..0fcd38d3 100644 3 --- a/tools/yabridgectl/src/config.rs 4 +++ b/tools/yabridgectl/src/config.rs 5 @@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet, HashSet}; ··· 10 use std::path::{Path, PathBuf}; 11 use which::which; 12 use xdg::BaseDirectories; 13 + @@ -235,34 +236,27 @@ impl Config { 14 } 15 } 16 None => { ··· 20 - // in the error message when `libyabridge-vst2.so` can't be found. 21 - let system_path = Path::new("/usr/lib"); 22 + // Search through NIX_PROFILES & data home directory if no path was set explicitly. 23 + + // NIX_PROFILES is iterated in reverse from the most specific (the user profile) to 24 + + // the least specific (the system profile). 25 + let nix_profiles = env::var("NIX_PROFILES"); 26 let user_path = xdg_dirs.get_data_home(); 27 - let lib_directories = [ ··· 37 - ]; 38 + let lib_directories = nix_profiles.iter() 39 + .flat_map(|profiles| profiles.split(' ') 40 + + .rev() 41 + .map(|profile| Path::new(profile).join("lib"))) 42 + .chain(iter::once(user_path.clone())); 43 + ··· 59 )); 60 } 61 diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs 62 + index 48cce4fa..209e40e4 100644 63 --- a/tools/yabridgectl/src/main.rs 64 +++ b/tools/yabridgectl/src/main.rs 65 + @@ -151,7 +151,7 @@ fn main() -> Result<()> { 66 + .help("Path to the directory containing 'libyabridge-{vst2,vst3}.so'") 67 + .long_help( 68 "Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \ 69 - is not set, then yabridgectl will look in both '/usr/lib' and \ 70 + is not set, then yabridgectl will look through 'NIX_PROFILES' and \