[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: gnu: gdm: Add missing pre-configuration.
From: |
guix-commits |
Subject: |
01/08: gnu: gdm: Add missing pre-configuration. |
Date: |
Sun, 6 Sep 2020 07:50:35 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit 005fb4acb12190dd1000a34253d6446ff71619ab
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Sat Sep 5 23:47:09 2020 -0400
gnu: gdm: Add missing pre-configuration.
* gnu/packages/gnome.scm (gdm) [arguments]<#:phases>['pre-configure]:
Modify phase.
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
gnu/packages/gnome.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 314d228..058d245 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9432,12 +9432,14 @@ libxml2.")
(modify-phases %standard-phases
(add-before 'configure 'pre-configure
(lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Replace systemd with elogind.
(substitute* '("common/gdm-log.c"
"daemon/gdm-server.c"
"daemon/gdm-session-worker.c"
"daemon/gdm-session-worker-job.c")
(("#include <systemd/sd-daemon\\.h>")
"#include <elogind/sd-daemon.h>"))
+ ;; Replace systemd with elogind.
(substitute* '("common/gdm-common.c"
"daemon/gdm-local-display-factory.c"
"daemon/gdm-manager.c"
@@ -9447,6 +9449,67 @@ libxml2.")
(substitute* '("configure")
(("libsystemd")
"libelogind"))
+ ;; Patch system-installed sessions.
+ (substitute* '("libgdm/gdm-sessions.c"
+ "daemon/gdm-session.c"
+ "daemon/gdm-display.c"
+ "daemon/gdm-launch-environment.c")
+ (("DATADIR \"/xsessions")
+ "\"/run/current-system/profile/share/xsessions")
+ (("DATADIR \"/wayland-sessions")
+ "\"/run/current-system/profile/share/wayland-sessions")
+ (("DATADIR \"/gnome-session/sessions")
+ "\"/run/current-system/profile/share/gnome-session/sessions"))
+ ;; Patch session environment.
+ (let* ((propagate '("GDM_CUSTOM_CONF"
+ "GDM_DBUS_DAEMON"
+ "GDM_X_SERVER"
+ "GDM_X_SESSION"
+ "XDG_DATA_DIRS")))
+ (substitute* "daemon/gdm-session.c"
+ (("set_up_session_environment \\(self\\);")
+ (apply string-append
+ "set_up_session_environment (self);\n"
+ (map (lambda (name)
+ (string-append
+ "gdm_session_set_environment_variable "
+ "(self, \"" name "\","
+ "g_getenv (\"" name "\"));\n"))
+ propagate)))))
+ ;; Find the configuration file using an environment variable.
+ (substitute* '("common/gdm-settings.c")
+ (("GDM_CUSTOM_CONF")
+ (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
+ " ? g_getenv(\"GDM_CUSTOM_CONF\")"
+ " : GDM_CUSTOM_CONF)")))
+ ;; Use service-supplied path to X.
+ (substitute* '("daemon/gdm-server.c")
+ (("\\(X_SERVER X_SERVER_ARG_FORMAT")
+ "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
+ ;; Use server-supplied paths.
+ (substitute* '("daemon/gdm-wayland-session.c"
+ "daemon/gdm-x-session.c")
+ (("\"dbus-daemon\"")
+ "g_getenv (\"GDM_DBUS_DAEMON\")")
+ (("X_SERVER")
+ "g_getenv (\"GDM_X_SERVER\")")
+ (("GDMCONFDIR \"/Xsession\"")
+ "g_getenv (\"GDM_X_SESSION\")"))
+ ;; Use an absolute path for GNOME Session.
+ (substitute* "daemon/gdm-launch-environment.c"
+ (("\"gnome-session\"")
+ (string-append "\"" (assoc-ref inputs "gnome-session")
+ "/bin/gnome-session\"")))
+ ;; Do not automatically select the placeholder session.
+ (substitute* "daemon/gdm-session.c"
+ (("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
+ (string-append "!g_str_has_suffix (base_name, \".desktop\") || "
+ "(g_strcmp0(search_dirs[i], \""
+ (assoc-ref outputs "out")
"/share/gdm/BuiltInSessions/"
+ "\") == 0 && "
+ "g_strcmp0(base_name, \"fail.desktop\") == 0)"))
+ (("g_error [(]\"GdmSession: no session desktop files installed,
aborting\\.\\.\\.\"[)];")
+ "{ self->fallback_session_name = g_strdup(\"fail\"); goto out;
}"))
#t)))))
(native-inputs
`(("check" ,check)
- branch wip-desktop updated (25ac44b -> c7e3c0d), guix-commits, 2020/09/06
- 02/08: services: desktop: Export missing variables., guix-commits, 2020/09/06
- 03/08: services: desktop: Disable failing service types in %generic-desktop-services., guix-commits, 2020/09/06
- 04/08: services: desktop: Add some missing services to generic-desktop-services., guix-commits, 2020/09/06
- 01/08: gnu: gdm: Add missing pre-configuration.,
guix-commits <=
- 05/08: Revert "gnu: udisks-service-type: Add default-value.", guix-commits, 2020/09/06
- 07/08: Revert "gnu: geoclue-service-type: Add default-value.", guix-commits, 2020/09/06
- 08/08: services: desktop: Replace some service-types with service-procedures., guix-commits, 2020/09/06
- 06/08: Revert "gnu: lirc-service-type: Add default-value.", guix-commits, 2020/09/06