From patchwork Thu Jan 23 06:28:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yelninei--- via Guix-patches via X-Patchwork-Id: 37613 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5D97B27BBE9; Thu, 23 Jan 2025 06:26:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 856C027BBE2 for ; Thu, 23 Jan 2025 06:26:50 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taqfG-00079l-Hu; Thu, 23 Jan 2025 01:26:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1taqfD-00079O-VL for guix-patches@gnu.org; Thu, 23 Jan 2025 01:26:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taqfD-0002d9-Md for guix-patches@gnu.org; Thu, 23 Jan 2025 01:26:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=QFNSsGI4Gyi8bL0h5r+aVnoD9AEJ9qZBOp2tTDFpHk4=; b=rQdU2Stpp2Hlj9Ovc18hRSP2uW1s7lOtWczktMfKxLKBMhLzH8FhsJH7rW5+1pSGT+dt14dRzcgg2g+4qyaYItAoLwlnc4F/a0W11bFkX4vJtKcPhefdPUC387ua8+zGturZVqe5B5MhX+njzS8G5pXrQEzX1PjLR4bAXMKZ6t9Jh/BHO3MWqh93RjgaZHQOyHEgoa0C0fRiFQNcDjYblbTrgp9zIwJk7X6ECVXy2sA+8BdLHggtZ5xNG6AFkP/3fPIZUGFS9HdsjAyxfX18eCOdLMnoMruFZyoWUTbJja9bLyMcuN/sJgOuFcIVZruvXRHymlzTYBLdZgThpsd/JQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1taqfB-0007TH-M0; Thu, 23 Jan 2025 01:26:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 1/4] gnu: glib: Support load search paths from etc/search-paths.d files. References: In-Reply-To: Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761355828708 (code B ref 75688); Thu, 23 Jan 2025 06:26:01 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:25:58 +0000 Received: from localhost ([127.0.0.1]:38730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqf7-0007Sx-QA for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:58 -0500 Received: from mail.envs.net ([5.199.136.28]:58298) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf4-0007Sa-5C for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:55 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id D3AD038A3E4C; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613551; bh=QFNSsGI4Gyi8bL0h5r+aVnoD9AEJ9qZBOp2tTDFpHk4=; h=From:To:Cc:Subject:Date:From; b=TKnGVNB3tuVHUhhHR3sXl1oQVW/g1aR8A3krFaqQv5S89Nczhx33YWRujupBghumm oj45xkX2IUKh+AI2YoZpDppHQV+DXDrKHzrCNHD/zN62Q17JitIV6Q+LjyiUF+ohnN 3P22cFlbD5uHcIfjHjYyjIsBnPKAU/4XYXNyOzeqei/JIchpCW+jezFTvaxy4qClVu E3hXvEf1AZBUMoY6R34a4wi7DTT19ZR+BzV/JBOWVxzYJIFLxy+9iNIGg+448fcmHb Lo02AVekcdqzB5zRVyElPR5K1Q2WmsE+X97u6dl4KtFZ/AdiqT32qc2944RKFpA2wr r7sYvRyQy4r3rjtbZab20LNBBTqD7755PJJZEIRno8BdzJhKMD1cPpXht3U2SCVRPV 4unkGJQW1cJGqjabjd/PiWVI7uQ8NQLccsUZDMljxAHiROLBjAYOPcT3JHxzmnWQC9 hlcXiXk+R7SDNrlxMi5cHa0UT6GHZpVvWgPH4eKPoWJnmIDK6lEVnQVxqCQnhO/tr4 w1jTN6B8mtPgmTfdPVrCm/fumKqXrD3JaKu172+O/eJ6rFQdHzafnCDSjEjUhS23aM cdCgOw15OxynEbNgD00/YbzcYUfDrlWSta98Mx4yzN8JBFF8olGVRByYXZrHL9Hd9e ay38bDw2pelbvyDWm66FfLvA= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6QagBnzDIC0r; Thu, 23 Jan 2025 06:25:48 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id e7e2719b; Thu, 23 Jan 2025 06:29:10 +0000 (UTC) Date: Thu, 23 Jan 2025 14:28:55 +0800 Message-ID: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: yelninei--- via Guix-patches via Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: 宋文武 Add a new function "g_build_guix_search_path_dirs" to GLIB, which in addition to environment variable, read search path values from etc/search-paths.d directory of the current executable. This can be used to replace wrapper scripts. Use it for GUIX_GSETTINGS_SCHEMA_DIR, GUIX_GIO_EXTRA_MODULES, GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS. * gnu/packages/patches/glib-guix-search-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/glib.scm (glib)[source]: Add patch. [native-search-paths]: Add GUIX_GSETTINGS_SCHEMA_DIR, Replace GIO_EXTRA_MODULES with GUIX_GIO_EXTRA_MODULES. Change-Id: I1d6d113fc38b20ebd4dce195f6d9c58ce85967e4 --- gnu/local.mk | 1 + gnu/packages/glib.scm | 9 +- .../patches/glib-guix-search-paths.patch | 158 ++++++++++++++++++ 3 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glib-guix-search-paths.patch base-commit: 7080aaf08102ec4c9c976582d6adfa0c14e6c640 diff --git a/gnu/local.mk b/gnu/local.mk index 5091f93eb8..6bb3a35770 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1436,6 +1436,7 @@ dist_patch_DATA = \ %D%/packages/patches/git-filter-repo-generate-doc.patch \ %D%/packages/patches/gklib-suitesparse.patch \ %D%/packages/patches/glib-appinfo-watch.patch \ + %D%/packages/patches/glib-guix-search-paths.patch \ %D%/packages/patches/glib-skip-failing-test.patch \ %D%/packages/patches/glibc-2.33-riscv64-miscompilation.patch \ %D%/packages/patches/glibc-2.39-git-updates.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e04eedb7ba..0704ba2c53 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -258,7 +258,8 @@ (define glib (base32 "0c3vagxl77wma85qinbj974jvw96n5bvch2m7hqcwxq8fa5spsj4")) (patches (search-patches "glib-appinfo-watch.patch" - "glib-skip-failing-test.patch")) + "glib-skip-failing-test.patch" + "glib-guix-search-paths.patch")) (modules '((guix build utils))) (snippet '(begin @@ -516,9 +517,13 @@ (define glib (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))) + ;; To load gsettings schemas from GTK, etc. + (search-path-specification + (variable "GUIX_GSETTINGS_SCHEMA_DIR") + (files '("share/glib-2.0/schemas"))) ;; To load extra gio modules from glib-networking, etc. (search-path-specification - (variable "GIO_EXTRA_MODULES") + (variable "GUIX_GIO_EXTRA_MODULES") (files '("lib/gio/modules"))))) (search-paths native-search-paths) (synopsis "Low-level core library for GNOME projects") diff --git a/gnu/packages/patches/glib-guix-search-paths.patch b/gnu/packages/patches/glib-guix-search-paths.patch new file mode 100644 index 0000000000..ebd57024dd --- /dev/null +++ b/gnu/packages/patches/glib-guix-search-paths.patch @@ -0,0 +1,158 @@ +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 76c2028..49b02bb 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -1330,6 +1330,13 @@ _g_io_modules_ensure_loaded (void) + g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); + g_free (module_dir); + ++ /* GUIX: Load gio modules from GUIX_GIO_EXTRA_MODULES */ ++ gchar **guix_giomodule_dirs = g_build_guix_search_path_dirs ("GUIX_GIO_EXTRA_MODULES"); ++ for (int i = 0; guix_giomodule_dirs[i] != NULL; i++) { ++ g_io_modules_scan_all_in_directory_with_scope (guix_giomodule_dirs[i], scope); ++ } ++ g_strfreev (guix_giomodule_dirs); ++ + g_io_module_scope_free (scope); + + /* Initialize types from built-in "modules" */ +diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c +index e8ccc8c..b8bae14 100644 +--- a/gio/gsettingsschema.c ++++ b/gio/gsettingsschema.c +@@ -354,6 +354,13 @@ initialise_schema_sources (void) + while (i--) + try_prepend_data_dir (dirs[i]); + ++ /* GUIX: Load schemas from GUIX_GSETTINGS_SCHEMA_DIR. */ ++ char **guix_schema_dirs = g_build_guix_search_path_dirs ("GUIX_GSETTINGS_SCHEMA_DIR"); ++ i = g_strv_length(guix_schema_dirs); ++ while (i--) ++ try_prepend_dir (guix_schema_dirs[i]); ++ g_strfreev (guix_schema_dirs); ++ + try_prepend_data_dir (g_get_user_data_dir ()); + + /* Disallow loading extra schemas if running as setuid, as that could +diff --git a/glib/gutils.c b/glib/gutils.c +index 8628a56..bc21efc 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -2708,6 +2708,16 @@ g_build_system_data_dirs (void) + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* GUIX: Use data files from GUIX_XDG_DATA_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_DATA_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&data_dir_vector); + } + +@@ -2800,6 +2810,16 @@ g_build_system_config_dirs (void) + conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* GUIX: Use config files from GUIX_XDG_CONFIG_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_CONFIG_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&conf_dir_vector); + } + +@@ -2849,6 +2869,69 @@ g_get_system_config_dirs (void) + return system_config_dirs; + } + ++gchar ** ++g_build_guix_search_path_dirs (const gchar *variable) ++{ ++ gchar **dirs = NULL; ++ char *value = NULL; ++ GStrvBuilder *builder = g_strv_builder_new (); ++ ++#if defined(__linux__) || defined(__gnu_hurd__) ++ /* First add paths from the etc/search-paths.d, which can be used to replace wrapper script. */ ++ gchar *exe_path = g_file_read_link ("/proc/self/exe", NULL); ++ gchar *out_path = NULL; ++ gchar *search_paths_d = NULL; ++ ++ /* We install executables under "bin" or "libexec", can also be a subdirectory of "libexec". */ ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || ++ g_str_match_string("/libexec/", exe_path, FALSE))) { ++ /* Find output directory, which is the parent directory of "bin" or "libexec". */ ++ out_path = g_path_get_dirname (exe_path); ++ while (g_str_match_string("/bin/", out_path, FALSE) || ++ g_str_match_string("/libexec/", out_path, FALSE)) { ++ gchar *dir_path = out_path; ++ out_path = g_path_get_dirname (dir_path); ++ g_free (dir_path); ++ } ++ ++ /* Now add paths from etc/search-paths.d/VARIABLE file. */ ++ search_paths_d = g_build_filename (out_path, "etc", "search-paths.d", NULL); ++ if (g_file_test (search_paths_d, G_FILE_TEST_EXISTS)) { ++ gchar *var_path = g_build_filename (search_paths_d, variable, NULL); ++ if (g_file_get_contents (var_path, &value, NULL, NULL)) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ g_free (value); ++ } ++ g_free (var_path); ++ } ++ } ++ ++ g_free (exe_path); ++ g_free (out_path); ++ g_free (search_paths_d); ++#endif ++ ++ /* Then add paths from the environment variable. */ ++ gboolean is_setuid = GLIB_PRIVATE_CALL (g_check_setuid) (); ++ if (is_setuid) /* we don't want to access arbitrary files when running as setuid. */ ++ value = NULL; ++ else ++ value = g_strdup (g_getenv (variable)); ++ ++ if (value && value[0]) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ } ++ g_free (value); ++ ++ dirs = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ return dirs; ++} ++ + /** + * g_nullify_pointer: + * @nullify_location: (not nullable): the memory address of the pointer. +diff --git a/glib/gutils.h b/glib/gutils.h +index efc6914..710cf27 100644 +--- a/glib/gutils.h ++++ b/glib/gutils.h +@@ -36,6 +36,9 @@ + + G_BEGIN_DECLS + ++GLIB_AVAILABLE_IN_ALL ++gchar **g_build_guix_search_path_dirs (const gchar *variable); ++ + GLIB_AVAILABLE_IN_ALL + const gchar * g_get_user_name (void); + GLIB_AVAILABLE_IN_ALL From patchwork Thu Jan 23 06:28:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yelninei--- via Guix-patches via X-Patchwork-Id: 37614 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5B29E27BBEA; Thu, 23 Jan 2025 06:27:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C4F1B27BBE2 for ; Thu, 23 Jan 2025 06:27:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taqgC-0007Gv-J9; Thu, 23 Jan 2025 01:27:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1taqgA-0007GX-MW for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taqgA-0002hP-DW for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=iW6DWUNIyYz7AiD8GJkZPx1WZkQvMslIC/UCNYZE1Ng=; b=EX87ZaGo63hZvi/R83F7UCNUglc+D1vJ0m8OleCeuilgO0NoOYHESRblSQ+im/gZ62VbGdl19AhfWDdicRrv5cyhPPRS8RsPjSfpcTbtSj+XhPvm5syecYw2VCHSM5VccEeoWE24NpWlkIB5RaUfFdv5WhNhA1zhvM9rOo5bEWJpGJvScBu793QoYcDi1xmIj9wSWj2+hDCcq78PQ9uhqWJWsbCvCboAINgxmf7MnLyM/QN+YJdS+RS0RfURNq39rXWMpSlMmy5eFjo7esBtqHb9YwvlpRl5eQC2vAa55Wo+4I/flcQ82Z6+8fnaLb7SwbejsZ8ACMFSyUUnwQYKXQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1taqgA-0007Vw-74; Thu, 23 Jan 2025 01:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 2/4] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761356428759 (code B ref 75688); Thu, 23 Jan 2025 06:27:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:04 +0000 Received: from localhost ([127.0.0.1]:38739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfD-0007Tm-SY for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:04 -0500 Received: from mail.envs.net ([5.199.136.28]:52144) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf5-0007Si-I0 for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:57 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id A687E38A3E50; Thu, 23 Jan 2025 06:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613554; bh=iW6DWUNIyYz7AiD8GJkZPx1WZkQvMslIC/UCNYZE1Ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdzJcvTNsYcU+vNQWblC8o9II4EAkgdy7hIEtKO62tDn0lsJQY9V8oyH/yEy08jz3 qFak4vzU6Os+gA48kiFqBGYPGpihZz/zBJ0h2Jw3/5ZXfojuQOkeEasszWv2suxjQK 9AmAm5+1+dYEidn8ZQr5ftQJI5yx5UP0T98HiXYRqihkV+SX/HQ3glcmvQxfuAmZZG rxO4ZWvq05aHEvYqpEygN2rSTfA+mXlVPObuoRWOZ2rvcbJkgt3YF8tXPs2bEt2LsX fr1rpnnVOpFLK3mBe2QBcY7ySzdzfhFwVRJVVkULUyDfbbyzLzYfIefSZBbjEj9ikK uenKqkMdZBbx1bbP67RSbhXmLo9CsTYjcNF0CkPRIKFDKUrfZQgkW/VGVex1OHSW2F s/UTSvAW/LUhjhe9LXLPfhLvo+lnCJxE5ESy32h6qL3NKEMH3TbY3AreunH/KCv3Ji m7qZrqTZO7TdR84FQ3zPtmCgzGGVe/IaYw6mEnQ8y9U0gqP8K1ya4ZiWBFIozwgJYm Zy2LXc+JIQ8TWmPbUIzbKhCY60IRFWmCxgXMi4y2cGYVNEDZwUbWDR/DdBKY4YogdM JNrh2xXtXIK1G2HepQyU2GoUo/WU+hEn97iNvd1UhVsxYVr8oq0BDn2BfpOJIC76Yc iv4IlnMcw2lEvgVzUN7X7SkQ= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KolnuEgFa8nR; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 8b562cf9; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) Date: Thu, 23 Jan 2025 14:28:56 +0800 Message-ID: <96be080084ef425fb5d5a8ab920d30667dc68c99.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: yelninei--- via Guix-patches via Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: 宋文武 This fixes . * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch. [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES. Change-Id: I63ce8fa14799e04551522e6d27e89bf47b08043e Reviewed-by: Maxim Cournoyer --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 8 +++++--- ...-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6bb3a35770..4249476dfa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1400,6 +1400,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdb-hurd64.patch \ + %D%/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/gdm-elogind-support.patch \ %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 7ed7d7b7df..392734a33c 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -726,7 +726,10 @@ (define-public gdk-pixbuf name "-" version ".tar.xz")) (sha256 (base32 - "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")))) + "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")) + (patches + (search-patches + "gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch")))) (build-system meson-build-system) (outputs '("out" "debug")) (arguments @@ -777,9 +780,8 @@ (define-public gdk-pixbuf ;; This file is produced by the gdk-pixbuf-loaders-cache-file ;; profile hook. (list (search-path-specification - (variable "GDK_PIXBUF_MODULE_FILE") + (variable "GUIX_GDK_PIXBUF_MODULE_FILES") (files (list %gdk-pixbuf-loaders-cache-file)) - (separator #f) ;single valued (file-type 'regular)))) (synopsis "Image loading library") (description "GdkPixbuf is a library that loads image data in various diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch new file mode 100644 index 0000000000..eb22761403 --- /dev/null +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch @@ -0,0 +1,18 @@ +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c +index e1df590..ba24cf6 100644 +--- a/gdk-pixbuf/gdk-pixbuf-io.c ++++ b/gdk-pixbuf/gdk-pixbuf-io.c +@@ -670,6 +670,13 @@ gdk_pixbuf_io_init (void) + gboolean ret; + + gdk_pixbuf_io_init_builtin (); ++ ++ /* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */ ++ gchar **guix_module_files = g_build_guix_search_path_dirs ("GUIX_GDK_PIXBUF_MODULE_FILES"); ++ for (int i = 0; guix_module_files[i] != NULL; i++) ++ gdk_pixbuf_io_init_modules (guix_module_files[i], NULL); ++ g_strfreev (guix_module_files); ++ + #ifdef USE_GMODULE + module_file = gdk_pixbuf_get_module_file (); + #endif From patchwork Thu Jan 23 06:28:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yelninei--- via Guix-patches via X-Patchwork-Id: 37616 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 873D827BBE2; Thu, 23 Jan 2025 06:27:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DCD6327BBE9 for ; Thu, 23 Jan 2025 06:27:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taqgD-0007HM-PL; Thu, 23 Jan 2025 01:27:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1taqgB-0007Gh-ND for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taqgA-0002hW-VU for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=zWu41/CBIoo2ICxmGaAKoDqJ5EwUYXH6Z0OSbiCeVzY=; b=MKdw0uTZ5uRuD1EBIVnAKw1zwkmXFSCkeHqt4ROAXZY78bPKH+DN8CW/Ux6H8KFaQ5v/oOXsY++3atKtEdYqrbmNNQLSJK2VExxpoRoj1/wSsWBW80yn0eXy909CPy1qjePXmNGG3N7bGsx+BrbeBhycFWAUZ9UzcnwAGptTdJ14+SjSrbQKWNLxxOTgK7teGKAnjUXL8dbB2W8IJGNrgC3oJbnJD3OYiXvgarJBCDejyseNdONGtHrU34RQ4JjbAIsUQwGca25LUv1G/IVDS30ftfSVc6HeDPSnJfBcN0fk0UtO7YiFrURj5aUYYgSfWAkD7LMZb4E5SzNpIxYr6Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1taqgA-0007W6-Qd for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 3/4] gnu: gtk: Add search-paths.d support for GUIX_GTK{2, 3, 4}_PATH. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761356928780 (code B ref 75688); Thu, 23 Jan 2025 06:27:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:09 +0000 Received: from localhost ([127.0.0.1]:38741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfI-0007U6-EK for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:09 -0500 Received: from mail.envs.net ([5.199.136.28]:52152) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf7-0007Sq-KK for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:02 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id B792338A3E52; Thu, 23 Jan 2025 06:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613556; bh=zWu41/CBIoo2ICxmGaAKoDqJ5EwUYXH6Z0OSbiCeVzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QkRg2WXTCtRQ3jqLorYxZ3Yms/bCeCkLL2bzTVHuzWMg54JSdF+ykkMzB0Zos2xBP FIB4LrKs+S3PGdDovvGErJDkY0UZiOu586zdPtgZ0Kw45SSRz1kEjMkKwx+hz3WxKm JntaYxs0a6xdkQ+gPljmNg71xyEdGs3G6tWIe/LStLXO08cHvqfSbl9D8KNtdOJKu+ apCSWIB5BR1/ZTOY8f4/lsZiKWyIBM+1me235vnYCRaCxB8RwmdAkMwh9WII/Js1Rn cWEo6hMz20cfMDyOEU+zz7aMM/6cenkej5IBnFcFopkJhwrFllKcOHG4z0GGkw8pR6 soA+liZK/PZYxord0zfMYM9o/Ve+KVGnztHgwWpNTB1RcLu6oTi+0MV6GcdXVaGw2T QmY1lLPSzMPkAuVtSPPFCgyUaf019mLTL5+UwVa965U74mMW7fW8/dUq2gEtJcy5e0 C5O6wGh62sVf9++zHNK8UKsF4C/pKp3ssdsE5iY/YQXaG0gLiLWitosToBVZB/nhjV ENNwEjpr5N9eAvptBrscY82O7cfDIOMY5Ftfcz6gioRQARmDrGWc/itbrx0meV8pgS 17wFPb4H5y6EOuN/S11VmlUy0fmzb4LADoUrQiAaPOZTT3JtoQblGdJm8KxNCoE0Xq 6+93skZgMQgUeuofIKIDXXE4= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bMHQe3MqYrj5; Thu, 23 Jan 2025 06:25:53 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 19ba942d; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) Date: Thu, 23 Jan 2025 14:28:57 +0800 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: yelninei--- via Guix-patches via Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: 宋文武 * gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch, gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch, gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: Rewrite in terms of 'g_build_guix_search_path_dirs'. Change-Id: Ib0748c39e56fd598f30f40b9ac3bb0f012f14c31 --- .../patches/gtk2-respect-GUIX_GTK2_PATH.patch | 64 ++++++------------- .../patches/gtk3-respect-GUIX_GTK3_PATH.patch | 55 ++++++---------- .../patches/gtk4-respect-GUIX_GTK4_PATH.patch | 62 +++++------------- 3 files changed, 54 insertions(+), 127 deletions(-) diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch index 93a8ddc242..fb6c7809f9 100644 --- a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch @@ -1,46 +1,20 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK2_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index 50729b61a5..2d4c2c2a85 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -96,5 +96,15 @@ get_module_path (void) + result = pango_split_file_list (module_path); + g_free (module_path); ---- a/gtk/gtkmodules.c 2014-09-29 22:02:17.000000000 +0200 -+++ b/gtk/gtkmodules.c 2015-12-02 18:41:53.306396938 +0100 -@@ -55,6 +55,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk2_path_env; - const gchar *exe_prefix; - const gchar *home_dir; - gchar *home_gtk_dir = NULL; -@@ -70,6 +71,7 @@ - home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL); - - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk2_path_env = g_getenv ("GUIX_GTK2_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); - - if (exe_prefix) -@@ -77,9 +79,21 @@ - else - default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL); - -- if (module_path_env && home_gtk_dir) -+ if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, default_dir, NULL); -+ else if (module_path_env && home_gtk_dir) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, default_dir, NULL); - else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); ++ /* GUIX: Load additional modules from GUIX_GTK2_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK2_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch index 66fd2fd1c4..28e232a812 100644 --- a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch @@ -1,38 +1,21 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK3_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. - ---- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200 -+++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200 -@@ -52,6 +52,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk3_path_env; - const gchar *exe_prefix; - gchar *module_path; - gchar *default_dir; -@@ -61,6 +62,7 @@ - return result; +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index f93101c272..b57e1da802 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -81,6 +81,16 @@ get_module_path (void) + result = gtk_split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK3_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK3_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -68,7 +70,13 @@ - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk3_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk3_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch index 4a60023bf7..56c202ecf4 100644 --- a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch +++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch @@ -1,51 +1,21 @@ -From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001 -From: Raghav Gururajan -Date: Tue, 18 May 2021 19:57:00 -0400 -Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH. - -This patch makes GTK look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK4_PATH". This can be used -instead of "GTK_PATH" to make GTK find modules that are incompatible with -other major versions of GTK. ---- - gtk/gtkmodules.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c -index aace5dcbc9..193b6a02e9 100644 +index 51b0916624..0cd6ee7e30 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c -@@ -105,6 +105,7 @@ static char ** - get_module_path (void) - { - const char *module_path_env; -+ const gchar *module_guix_gtk4_path_env; - const char *exe_prefix; - char *module_path; - char *default_dir; -@@ -114,6 +115,7 @@ get_module_path (void) - return result; +@@ -132,6 +132,16 @@ get_module_path (void) + result = split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK4_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK4_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -121,7 +123,13 @@ get_module_path (void) - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk4_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk4_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else --- -2.31.1 - From patchwork Thu Jan 23 06:28:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yelninei--- via Guix-patches via X-Patchwork-Id: 37615 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 564D727BBEB; Thu, 23 Jan 2025 06:27:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1EDDB27BBE2 for ; Thu, 23 Jan 2025 06:27:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taqgE-0007HN-5X; Thu, 23 Jan 2025 01:27:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1taqgC-0007Gp-D6 for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taqgB-0002hd-Uy for guix-patches@gnu.org; Thu, 23 Jan 2025 01:27:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=G7erAM1Py70vcrHfbE6aWiu2zVmRxzrQ+W5yk2hhb3A=; b=ShE5nCW0hXT+YBVN4GBaBXPZr50zcYSYR/lPcStMNzKIcff3BlDFqRO8HqBIJUpBFGqoLofTZFI8P0C7FnsbdaH8+tEAkn1qtfW3T8kvW7rXEEf5jFsUM7e/anlPRAyEAyRlAsvTYOuGMWREZmpOF2A4dCmtEnmwHzlLQqeAqlp+1V6qLgVIemNKLcuZgpky92ozvC477S2qf5T9H+d+UmeSijkZvEUI4rzB0oLrLvPTd9YOuWHSjq2hCTPXm5IES1YJzR1U4EN50nMvnWjf4n+uQEOd0CodqgoHjXwVsuuOw2DwX9LITQfLXdI9oJA4dTRQatKAOxJCB5CwCKsbhg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1taqgB-0007WE-AP; Thu, 23 Jan 2025 01:27:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 4/4] build: glib-or-gtk-build-system: Replace wrapper scripts with 'search-paths.d'. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761357028789 (code B ref 75688); Thu, 23 Jan 2025 06:27:03 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:10 +0000 Received: from localhost ([127.0.0.1]:38743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfJ-0007U9-4m for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:10 -0500 Received: from mail.envs.net ([5.199.136.28]:52166) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqfA-0007T8-Qi for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:02 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id E7F5B38A3E53; Thu, 23 Jan 2025 06:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613559; bh=G7erAM1Py70vcrHfbE6aWiu2zVmRxzrQ+W5yk2hhb3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQULegF7dfeM9S21gazYBo5JPZoO+ODJg2IrdyMTQF9LB0sTScuIo3a168XlDe74V SOpmxlgiQ/79nLndmVd4tpZngRtCypCczPHLr8X5Tn0WxYDB+BSkyrKxpW4NiWAA4T IP51cnM2NtupktYdtMvGg7T5jvBqnJrCIXAC5JmIDSFcMMITkpvIADl4sGHjPjvDbK uTfuVabAN0fgWAW/SRbEoHsAKfYO4O1aB0Rh57XazZYp3O2Dsrm6Ub2qS3ic1ls9BI +l0n7di0DtWCHEVV7aX6ZXEo6w5itKQZ3MVniF9mPp4NwmTbUAnV4tYZYfUDoinhYe ut+b9xYIbCSh72JD2bEvw9McfnSRU++VT1ousFtWSPhmV8Q7LPdnDcsctpZ9pwOabM Mc4J+UUKmHATii0bFA/HY7AhVpQInI9/ZyfsQhVFJ+VOTEbE73TcsfNNRLJTyA+p9a 6wgcgOdjJbDtBGoMbAnRsO2QKZuSmItzK3Frz5KbsqFUy+ZaHPy9qXMLETe8d/l9uy dEWPm3umB70L3XNObPZQxUFdKj3xh7f7hIINEDhS/pXpl3Y9CGldqJpVUa5PjR9ixB O0Fm/siqf4WnIM136WMsq4uRJu5DMH0OZtI4CDEsIIhm61sH2wa4wa4X9qlzugTv79 g4tVKjtbr3RPLGDI/iqwHTsA= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UESCZvR8rFHt; Thu, 23 Jan 2025 06:25:56 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:55 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 55cbef31; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) Date: Thu, 23 Jan 2025 14:28:58 +0800 Message-ID: <96b1c701576df682137650386544821196e2152d.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: yelninei--- via Guix-patches via Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: 宋文武 * guix/build/glib-or-gtk-build-system.scm (write-search-path-file): New procedure. (gtk-module-directories): Add version to arguments. (gsettings-schema-directories): New procedure. (data-directories): Don't check for "/glib-2.0/schemas". (conf-directories): New procedure. (wrap-all-programs): Rewrite in terms of 'write-search-path-file'. Change-Id: I1c9e8d491b96e298d1568a5e29b04c762c26e4d1 --- guix/build/glib-or-gtk-build-system.scm | 165 ++++++++++++++---------- 1 file changed, 94 insertions(+), 71 deletions(-) diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index 67a52ddad3..a04c1b0616 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2025 宋文武 ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,13 @@ (define-module (guix build glib-or-gtk-build-system) ;; ;; Code: +(define* (write-search-path-file output variable value) + "Write VALUE to @file{etc/search-paths.d/VARIABLE} under OUTPUT." + (let ((search-paths.d (string-append output "/etc/search-paths.d"))) + (mkdir-p search-paths.d) + (with-output-to-file (string-append search-paths.d "/" variable) + (lambda () (display variable))))) + (define (subdirectory-exists? parent sub-directory) (directory-exists? (string-append parent sub-directory))) @@ -47,32 +55,12 @@ (define (directory-included? directory directories-list) (fold (lambda (s p) (or (string-ci=? s directory) p)) #f directories-list)) -;; We do not include $HOME/.guix-profile/gtk-v.0 (v=2 or 3) because we do not -;; want to mix gtk+-2 and gtk+-3 modules. See -;; https://developer.gnome.org/gtk3/stable/gtk-running.html -(define (gtk-module-directories inputs) - "Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list +;; We load GTK modules via the GUIX_GTK2_PATH, GUIX_GTK3_PATH and GUIX_GTK4_PATH +;; search paths. +(define (gtk-module-directories inputs version) + "Check for the existence of \"libdir/gtk-VERSION\" in INPUTS. Return a list with all found directories." - (let* ((version - (cond - ((string-match "gtk-4" - (or (assoc-ref inputs "gtk") - (assoc-ref inputs "source") - "")) - "4.0") - ((string-match "gtk\\+-3" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "3.0") - ((string-match "gtk\\+-2" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "2.0") - (else - "4.0"))) ; We default to version 4.0. - (gtk-module + (let ((gtk-module (lambda (input prev) (let* ((in (match input ((_ . dir) dir) @@ -85,27 +73,22 @@ (define (gtk-module-directories inputs) prev))))) (fold gtk-module '() inputs))) -;; See +;; XDG data files include themes, sounds, icons, etc. See: ;; http://www.freedesktop.org/wiki/DesktopThemeSpec ;; http://freedesktop.org/wiki/Specifications/sound-theme-spec ;; http://freedesktop.org/wiki/Specifications/icon-theme-spec ;; -;; Currently desktop themes are not well supported and do not honor -;; XDG_DATA_DIRS. One example is evince which only looks for desktop themes -;; in $HOME/.themes (for backward compatibility) and in XDG_DATA_HOME (which -;; defaults to $HOME/.local/share). One way to handle these applications -;; appears to be by making $HOME/.themes a symlink to -;; $HOME/.guix-profile/share/themes. +;; We load them via XDG_DATA_DIRS (from profile, has higher priority) and +;; GUIX_XDG_DATA_DIRS (application specified) search paths. (define (data-directories inputs) - "Check for the existence of \"$datadir/glib-2.0/schemas\" or XDG themes data -in INPUTS. Return a list with all found directories." + "Check for the existence of XDG data files in INPUTS. Return a list with all found +directories." (define (data-directory input previous) (let* ((in (match input ((_ . dir) dir) (_ ""))) (datadir (string-append in "/share"))) - (if (and (or (subdirectory-exists? datadir "/glib-2.0/schemas") - (subdirectory-exists? datadir "/sounds") + (if (and (or (subdirectory-exists? datadir "/sounds") (subdirectory-exists? datadir "/themes") (subdirectory-exists? datadir "/cursors") (subdirectory-exists? datadir "/wallpapers") @@ -117,15 +100,45 @@ (define (data-directories inputs) (fold data-directory '() inputs)) +;;; XDG configuration files are expected to be installed in etc/xdg directory. +;;; We load them via XDG_CONFIG_DIRS (from profile, has higher priority) and +;;; GUIX_XDG_CONFIG_DIRS (application specified) search paths. +(define (conf-directories inputs) + "Check for the existence of XDG configuration files in INPUTS. Return a list with +all found directories." + (define (conf-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (conf-dir (string-append in "etc/xdg"))) + (if (and (directory-exists? conf-dir) + (not (directory-included? conf-dir previous))) + (cons conf-dir previous) + previous))) + + (fold conf-directory '() inputs)) + +;;; GIO GSettings schemas are expected to be installed in $datadir/glib-2.0/schemas +;;; directory. We load them via the GUIX_GSETTINGS_SCHEMA_DIR search path. +(define (gsettings-schema-directories inputs) + "Check for the existence of \"$datadir/glib-2.0/schemas\" in INPUTS. +Return a list with all found directories." + (define (gsettings-schema-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (schema-dir (string-append in "/share/glib-2.0/schemas"))) + (if (and (directory-exists? schema-dir) + (not (directory-included? schema-dir previous))) + (cons schema-dir previous) + previous))) + + (fold gsettings-schema-directory '() inputs)) + ;; All GIO modules are expected to be installed in GLib's $libdir/gio/modules ;; directory. That directory has to include a file called giomodule.cache -;; listing all available modules. GIO can be made aware of modules in other -;; directories with the help of the environment variable GIO_EXTRA_MODULES. -;; The official GIO documentation states that this environment variable should -;; only be used for testing and not in a production environment. However, it -;; appears that there is no other way of specifying multiple modules -;; directories (NIXOS also does use this variable). See -;; https://developer.gnome.org/gio/stable/running-gio-apps.html +;; listing all available modules. We load them via the GUIX_GIO_EXTRA_MODULES +;; search path. (define (gio-module-directories inputs) "Check for the existence of \"$libdir/gio/modules\" in the INPUTS and returns a list with all found directories." @@ -141,50 +154,60 @@ (define (gio-module-directories inputs) (fold gio-module-directory '() inputs)) + (define* (wrap-all-programs #:key inputs outputs (glib-or-gtk-wrap-excluded-outputs '()) #:allow-other-keys) "Implement phase \"glib-or-gtk-wrap\": look for GSettings schemas and -gtk+-v.0 libraries and create wrappers with suitably set environment variables +GTK libraries and create etc/search-paths.d with suitably set of files if found. Wrapping is not applied to outputs whose name is listed in GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not to contain any GLib or GTK+ binaries, and where wrapping would gratuitously -add a dependency of that output on GLib and GTK+." - ;; Do not require bash to be present in the package inputs - ;; even when there is nothing to wrap. - ;; Also, calculate (sh) only once to prevent some I/O. - (define %sh (delay (search-input-file inputs "bin/bash"))) - (define (sh) (force %sh)) +add a dependency of that output on GLib and GTK." (define handle-output (match-lambda ((output . directory) (unless (member output glib-or-gtk-wrap-excluded-outputs) - (let* ((bindir (string-append directory "/bin")) - (libexecdir (string-append directory "/libexec")) - (bin-list (filter (negate wrapped-program?) - (append (find-files bindir ".*") - (find-files libexecdir ".*")))) - (datadirs (data-directories + (let* ((datadirs (data-directories (alist-cons output directory inputs))) - (gtk-mod-dirs (gtk-module-directories + (confdirs (conf-directories (alist-cons output directory inputs))) - (gio-mod-dirs (gio-module-directories + (schemadirs (gsettings-schema-directories (alist-cons output directory inputs))) - (env-vars `(,@(if (not (null? datadirs)) - (list `("XDG_DATA_DIRS" ":" prefix ,datadirs)) - '()) - ,@(if (not (null? gtk-mod-dirs)) - (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs)) - '()) - ,@(if (not (null? gio-mod-dirs)) - (list `("GIO_EXTRA_MODULES" ":" - prefix ,gio-mod-dirs)) - '())))) - (for-each (lambda (program) - (apply wrap-program program #:sh (sh) env-vars)) - bin-list)))))) + (gtk2-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "2.0")) + (gtk3-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "3.0")) + (gtk4-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "4.0")) + (gio-mod-dirs (gio-module-directories + (alist-cons output directory inputs)))) + (when (not (null? datadirs)) + (write-search-path-file output "GUIX_XDG_DATA_DIRS" + (string-join datadirs ":"))) + (when (not (null? confdirs)) + (write-search-path-file output "GUIX_XDG_CONFIG_DIRS" + (string-join confdirs ":"))) + (when (not (null? schemadirs)) + (write-search-path-file output "GUIX_GSETTINGS_SCHEMA_DIR" + (string-join schemadirs ":"))) + (when (not (null? gtk2-mod-dirs)) + (write-search-path-file output "GUIX_GTK2_PATH" + (string-join gtk2-mod-dirs ":"))) + (when (not (null? gtk3-mod-dirs)) + (write-search-path-file output "GUIX_GTK3_PATH" + (string-join gtk3-mod-dirs ":"))) + (when (not (null? gtk4-mod-dirs)) + (write-search-path-file output "GUIX_GTK4_PATH" + (string-join gtk4-mod-dirs ":"))) + (when (not (null? gio-mod-dirs)) + (write-search-path-file output "GUIX_GIO_EXTRA_MODULES" + (string-join gio-mod-dirs ":")))))))) (for-each handle-output outputs))