all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 88adb4a8c1f4948debeb4ebacd9bc39c450e868e 1040 bytes (raw)
name: gnu/packages/patches/obs-override-default-modules-location.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
From 96e3c05043eb6b682b105e9080b45efeee33dcd0 Mon Sep 17 00:00:00 2001
From: Alexey Abramov <levenson@mmer.org>
Date: Fri, 15 Jan 2021 17:07:17 +0100
Subject: [PATCH] Use an environment variable for a default modules location

---
 libobs/obs-nix.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c
index 382fa0546..d58a0b48a 100644
--- a/libobs/obs-nix.c
+++ b/libobs/obs-nix.c
@@ -66,8 +66,14 @@ static const int module_patterns_size =
 
 void add_default_module_paths(void)
 {
-	for (int i = 0; i < module_patterns_size; i++)
-		obs_add_module_path(module_bin[i], module_data[i]);
+	char *obs_plugins_path = getenv("OBS_PLUGINS_PATH");
+	if (obs_plugins_path) {
+		struct dstr obs_plugins_data_path;
+		dstr_init_copy(&obs_plugins_data_path, obs_plugins_path);
+		dstr_cat(&obs_plugins_data_path, "/../../share/obs/obs-plugins/%module%");
+		obs_add_module_path(obs_plugins_path, obs_plugins_data_path.array);
+		dstr_free(&obs_plugins_data_path);
+	}
 }
 
 /*
-- 
2.29.2

debug log:

solving 88adb4a8c1 ...
found 88adb4a8c1 in https://yhetil.org/guix/87k0setadp.fsf@delta.lan/

applying [1/1] https://yhetil.org/guix/87k0setadp.fsf@delta.lan/
diff --git a/gnu/packages/patches/obs-override-default-modules-location.patch b/gnu/packages/patches/obs-override-default-modules-location.patch
new file mode 100644
index 0000000000..88adb4a8c1

1:21: trailing whitespace.
 
1:35: trailing whitespace.
 
1:37: trailing whitespace.
-- 
Checking patch gnu/packages/patches/obs-override-default-modules-location.patch...
Applied patch gnu/packages/patches/obs-override-default-modules-location.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 88adb4a8c1f4948debeb4ebacd9bc39c450e868e	gnu/packages/patches/obs-override-default-modules-location.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.