mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: obs: Use an environment variable for plugins location.
* gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/video.scm (obs): Use it. * gnu/packages/patches/obs-modules-location.patch: Patch it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
65454c1caa
commit
5be01dcdc1
3 changed files with 47 additions and 1 deletions
|
@ -1411,6 +1411,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
|
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
|
||||||
%D%/packages/patches/nvi-db4.patch \
|
%D%/packages/patches/nvi-db4.patch \
|
||||||
%D%/packages/patches/nyacc-binary-literals.patch \
|
%D%/packages/patches/nyacc-binary-literals.patch \
|
||||||
|
%D%/packages/patches/obs-modules-location.patch \
|
||||||
%D%/packages/patches/ocaml-bitstring-fix-configure.patch \
|
%D%/packages/patches/ocaml-bitstring-fix-configure.patch \
|
||||||
%D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \
|
%D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \
|
||||||
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
|
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
|
||||||
|
|
33
gnu/packages/patches/obs-modules-location.patch
Normal file
33
gnu/packages/patches/obs-modules-location.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
From d250434e6c8eb4f8c8cb47ef3cc6e6de8fa8f828 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 environment variable for a default module location
|
||||||
|
|
||||||
|
diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c
|
||||||
|
index 382fa0546..481ea0f14 100644
|
||||||
|
*** a/libobs/obs-nix.c
|
||||||
|
--- b/libobs/obs-nix.c
|
||||||
|
@@ -66,8 +66,19 @@
|
||||||
|
|
||||||
|
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 *bin_directory = getenv("OBS_PLUGINS_DIRECTORY");
|
||||||
|
+ char *data_directory = getenv("OBS_PLUGINS_DATA_DIRECTORY");
|
||||||
|
+ if (bin_directory && data_directory) {
|
||||||
|
+ struct dstr dstr_data_directory;
|
||||||
|
+ dstr_init_copy(&dstr_data_directory, data_directory);
|
||||||
|
+ dstr_cat(&dstr_data_directory, "/%module%");
|
||||||
|
+ obs_add_module_path(bin_directory, dstr_data_directory.array);
|
||||||
|
+ dstr_free(&dstr_data_directory);
|
||||||
|
+
|
||||||
|
+ } else {
|
||||||
|
+ for (int i = 0; i < module_patterns_size; i++)
|
||||||
|
+ obs_add_module_path(module_bin[i], module_data[i]);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
--
|
||||||
|
2.29.2
|
|
@ -47,6 +47,7 @@
|
||||||
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
|
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
|
||||||
;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
|
;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
|
||||||
;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
|
;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
|
||||||
|
;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -3083,7 +3084,9 @@ be used for realtime video capture via Linux-specific APIs.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))))
|
"1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))
|
||||||
|
(patches
|
||||||
|
(search-patches "obs-modules-location.patch"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
|
@ -3098,6 +3101,15 @@ be used for realtime video capture via Linux-specific APIs.")
|
||||||
(wrap-program (string-append out "/bin/obs")
|
(wrap-program (string-append out "/bin/obs")
|
||||||
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
|
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
|
||||||
#t)))))
|
#t)))))
|
||||||
|
(native-search-paths
|
||||||
|
(list (search-path-specification
|
||||||
|
(variable "OBS_PLUGINS_DIRECTORY")
|
||||||
|
(separator #f) ;single entry
|
||||||
|
(files '("lib/obs-plugins")))
|
||||||
|
(search-path-specification
|
||||||
|
(variable "OBS_PLUGINS_DATA_DIRECTORY")
|
||||||
|
(separator #f) ;single entry
|
||||||
|
(files '("share/obs/obs-plugins")))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("cmocka" ,cmocka)
|
`(("cmocka" ,cmocka)
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)))
|
||||||
|
|
Loading…
Reference in a new issue