From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2J+NLIXHAWDpCgAA0tVLHw (envelope-from ) for ; Fri, 15 Jan 2021 16:49:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kOlxKIXHAWAPLAAAB5/wlQ (envelope-from ) for ; Fri, 15 Jan 2021 16:49:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C0DEA9403D5 for ; Fri, 15 Jan 2021 16:49:08 +0000 (UTC) Received: from localhost ([::1]:56978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0SHb-0004nJ-PY for larch@yhetil.org; Fri, 15 Jan 2021 11:49:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0SHW-0004nD-2A for guix-patches@gnu.org; Fri, 15 Jan 2021 11:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0SHV-0004bK-Qs for guix-patches@gnu.org; Fri, 15 Jan 2021 11:49:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0SHV-0006Ze-OY for guix-patches@gnu.org; Fri, 15 Jan 2021 11:49:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45707] [PATCH] gnu: Add obs-v4l2sink. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Jan 2021 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45707 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45707-submit@debbugs.gnu.org id=B45707.161072929025209 (code B ref 45707); Fri, 15 Jan 2021 16:49:01 +0000 Received: (at 45707) by debbugs.gnu.org; 15 Jan 2021 16:48:10 +0000 Received: from localhost ([127.0.0.1]:41583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0SGS-0006Y5-P8 for submit@debbugs.gnu.org; Fri, 15 Jan 2021 11:48:10 -0500 Received: from mx4.mail.mmer.org ([178.22.66.29]:47750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0SGQ-0006Xv-G3 for 45707@debbugs.gnu.org; Fri, 15 Jan 2021 11:47:55 -0500 Received: from delta.lan (unknown [10.147.19.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx4.mail.mmer.org (Postfix) with ESMTPSA id A4B6D9CC5D; Fri, 15 Jan 2021 16:17:08 +0000 (UTC) From: Alexey Abramov References: <87turt4ogl.fsf@gmail.com> <87turt2m7v.fsf@delta.lan> <87pn28aoqi.fsf_-_@gnu.org> Date: Fri, 15 Jan 2021 17:47:46 +0100 In-Reply-To: <87pn28aoqi.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 13 Jan 2021 15:35:49 +0100") Message-ID: <87k0setadp.fsf@delta.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Evan , 45707@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C0DEA9403D5 X-Spam-Score: -2.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: KG8CqHe0OqRR --=-=-= Content-Type: text/plain Hi, Thanks Ludo. With this patch, obs will check OBS_PLUGINS_PATH environment variable for a *default* location of modules. Plugins might also have some data. I am not sure if it is safe to use relative path thought. Would it be better to use OBS_PLUGINS_DATA_PATH var? -- Alexey --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-obs-Use-an-environment-variable-for-plugins-loca.patch >From 9ade5607aab510cc88561efb7c0b08567b5e19fe Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Fri, 15 Jan 2021 17:26:37 +0100 Subject: [PATCH] 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-override-default-modules-location.patch: Patch it. --- gnu/local.mk | 1 + ...bs-override-default-modules-location.patch | 32 +++++++++++++++++++ gnu/packages/video.scm | 9 +++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/obs-override-default-modules-location.patch diff --git a/gnu/local.mk b/gnu/local.mk index eb28104add..cd4085890b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1404,6 +1404,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ + %D%/packages/patches/obs-override-default-modules-location.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ 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 --- /dev/null +++ b/gnu/packages/patches/obs-override-default-modules-location.patch @@ -0,0 +1,32 @@ +From 96e3c05043eb6b682b105e9080b45efeee33dcd0 Mon Sep 17 00:00:00 2001 +From: Alexey Abramov +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 diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index b314e4903b..15bb2e4d40 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3087,7 +3087,9 @@ be used for realtime video capture via Linux-specific APIs.") (file-name (git-file-name name version)) (sha256 (base32 - "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")))) + "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")) + (patches + (search-patches "obs-override-default-modules-location.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -3102,6 +3104,11 @@ be used for realtime video capture via Linux-specific APIs.") (wrap-program (string-append out "/bin/obs") `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))) #t))))) + (native-search-paths + (list (search-path-specification + (variable "OBS_PLUGINS_PATH") + (separator #f) ;single entry + (files '("lib/obs-plugins"))))) (native-inputs `(("cmocka" ,cmocka) ("pkg-config" ,pkg-config))) -- 2.29.2 --=-=-=--