nixos/kubernetes/kubelet: Fix sandbox image load on containerd 2.x (#364558)
[NixPkgs.git] / pkgs / applications / audio / ardour / default-plugin-search-paths.patch
blob68d67ce8b9bcbe429462526e22f51b0b868a034b
1 From 1217722e4bf6c65b5c24da17a7de4bf712ca6775 Mon Sep 17 00:00:00 2001
2 From: Tamara Schmitz <tamara.zoe.schmitz@posteo.de>
3 Date: Sat, 17 Jun 2023 14:05:53 +0200
4 Subject: [PATCH] add NixOS plugin paths as default search paths
6 Since NixOS uses unusual paths, we should tell Ardour about this. During
7 first launch, Ardour does indeed check for environmentals but not when
8 you press the "Reset to Defaults" button in the Settings menu. This
9 path fixes this by including NixOS paths in the defaults.
10 ---
11 libs/ardour/plugin_manager.cc | 5 +++--
12 libs/ardour/search_paths.cc | 4 ++++
13 2 files changed, 7 insertions(+), 2 deletions(-)
15 diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc
16 index a572ed55dd..3dd6c2fda6 100644
17 --- a/libs/ardour/plugin_manager.cc
18 +++ b/libs/ardour/plugin_manager.cc
19 @@ -305,7 +305,8 @@ PluginManager::PluginManager ()
20 if (lxvst_path.length() == 0) {
21 lxvst_path = "/usr/local/lib64/lxvst:/usr/local/lib/lxvst:/usr/lib64/lxvst:/usr/lib/lxvst:"
22 "/usr/local/lib64/linux_vst:/usr/local/lib/linux_vst:/usr/lib64/linux_vst:/usr/lib/linux_vst:"
23 - "/usr/lib/vst:/usr/local/lib/vst";
24 + "/usr/lib/vst:/usr/local/lib/vst:$HOME/.nix-profile/lib/vst:"
25 + "$HOME/.lxvst:$HOME/.nix-profile/lib/lxvst:/run/current-system/sw/lib/lxvst:/etc/profiles/per-user/$USER/lib/lxvst";
28 /* first time setup, use 'default' path */
29 @@ -2040,7 +2041,7 @@ PluginManager::vst3_refresh (bool cache_only)
30 std::string prog = PBD::get_win_special_folder_path (CSIDL_PROGRAM_FILES);
31 vst3_discover_from_path (Glib::build_filename (prog, "Common Files", "VST3"), cache_only);
32 #else
33 - vst3_discover_from_path ("~/.vst3:/usr/local/lib/vst3:/usr/lib/vst3", cache_only);
34 + vst3_discover_from_path ("~/.vst3:/usr/local/lib/vst3:/usr/lib/vst3:~/.nix-profile/lib/vst3:/run/current-system/sw/lib/vst3:/etc/profiles/per-user/$USER/lib/vst3", cache_only);
35 #endif
38 diff --git a/libs/ardour/search_paths.cc b/libs/ardour/search_paths.cc
39 index e6d8744369..b9774cb006 100644
40 --- a/libs/ardour/search_paths.cc
41 +++ b/libs/ardour/search_paths.cc
42 @@ -112,6 +112,10 @@ ladspa_search_path ()
43 spath.push_back ("/usr/local/lib/ladspa");
44 spath.push_back ("/usr/lib64/ladspa");
45 spath.push_back ("/usr/lib/ladspa");
46 + spath.push_back ("/run/current-system/sw/lib/ladspa");
47 + spath.push_back (path_expand ("$HOME/.ladspa"));
48 + spath.push_back (path_expand ("$HOME/.nix-profile/lib/ladspa"));
49 + spath.push_back (path_expand ("/etc/profiles/per-user/$USER/lib/ladspa"));
50 #endif
52 #ifdef __APPLE__
53 --
54 2.40.1