gnu: gdm: Use gexps and new style inputs.
* gnu/packages/gnome.scm (gdm)[phases]: Use gexps. {pre-configure}: Use search-input-file. {install-logo}: Likewise, and use #$output. {install-placeholder-desktop-entry}: use search-input-directory. {link-autostart-files}: Use this-package-input, $output. [native-inputs]: Remove labels and sort in lexicographical order.master
parent
97313b9b0c
commit
603a8e729e
|
@ -8400,9 +8400,10 @@ library.")
|
||||||
"gdm-pass-gdk-pixbuf-loader-env.patch"))))
|
"gdm-pass-gdk-pixbuf-loader-env.patch"))))
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:glib-or-gtk? #t
|
(list
|
||||||
|
#:glib-or-gtk? #t
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
,#~(list
|
#~(list
|
||||||
"-Dplymouth=disabled"
|
"-Dplymouth=disabled"
|
||||||
"-Dsystemd-journal=false"
|
"-Dsystemd-journal=false"
|
||||||
|
|
||||||
|
@ -8432,10 +8433,9 @@ library.")
|
||||||
;; XDG_DATA_DIRS so that it finds its schemas.
|
;; XDG_DATA_DIRS so that it finds its schemas.
|
||||||
"--sbindir" (string-append #$output "/bin"))
|
"--sbindir" (string-append #$output "/bin"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before
|
(add-before 'configure 'pre-configure
|
||||||
'configure 'pre-configure
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
;; We don't have <systemd/sd-daemon.h>.
|
;; We don't have <systemd/sd-daemon.h>.
|
||||||
(substitute* '("common/gdm-log.c"
|
(substitute* '("common/gdm-log.c"
|
||||||
"daemon/gdm-server.c"
|
"daemon/gdm-server.c"
|
||||||
|
@ -8499,27 +8499,23 @@ library.")
|
||||||
;; Use an absolute path for GNOME Session.
|
;; Use an absolute path for GNOME Session.
|
||||||
(substitute* "daemon/gdm-launch-environment.c"
|
(substitute* "daemon/gdm-launch-environment.c"
|
||||||
(("\"gnome-session\"")
|
(("\"gnome-session\"")
|
||||||
(string-append "\"" (assoc-ref inputs "gnome-session")
|
(format #f "~s"
|
||||||
"/bin/gnome-session\"")))
|
(search-input-file inputs "bin/gnome-session"))))
|
||||||
;; Do not automatically select the placeholder session.
|
;; Do not automatically select the placeholder session.
|
||||||
(substitute* "daemon/gdm-session.c"
|
(substitute* "daemon/gdm-session.c"
|
||||||
(("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
|
(("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
|
||||||
(string-append "!g_str_has_suffix (base_name, \".desktop\") || "
|
(string-append "!g_str_has_suffix (base_name, \".desktop\") || "
|
||||||
"(g_strcmp0(search_dirs[i], \""
|
"(g_strcmp0(search_dirs[i], \""
|
||||||
(assoc-ref outputs "out") "/share/gdm/BuiltInSessions/"
|
#$output "/share/gdm/BuiltInSessions/"
|
||||||
"\") == 0 && "
|
"\") == 0 && "
|
||||||
"g_strcmp0(base_name, \"fail.desktop\") == 0)"))
|
"g_strcmp0(base_name, \"fail.desktop\") == 0)"))
|
||||||
(("g_error [(]\"GdmSession: no session desktop files installed, aborting\\.\\.\\.\"[)];")
|
(("g_error [(]\"GdmSession: no session desktop files installed, aborting\\.\\.\\.\"[)];")
|
||||||
"{ self->fallback_session_name = g_strdup(\"fail\"); goto out; }"))))
|
"{ self->fallback_session_name = g_strdup(\"fail\"); goto out; }"))))
|
||||||
(add-before 'install 'install-logo
|
(add-before 'install 'install-logo
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((icon (search-input-file inputs "share/icons/hicolor/\
|
||||||
(guix-icons (assoc-ref inputs "guix-icons"))
|
|
||||||
(icon
|
|
||||||
(string-append guix-icons "/share/icons/hicolor/\
|
|
||||||
scalable/apps/guix-white-icon.svg"))
|
scalable/apps/guix-white-icon.svg"))
|
||||||
(schema
|
(schema (string-append #$output "/share/glib-2.0/schemas/\
|
||||||
(string-append out "/share/glib-2.0/schemas/\
|
|
||||||
org.gnome.login-screen.gschema.override")))
|
org.gnome.login-screen.gschema.override")))
|
||||||
(mkdir-p (dirname schema))
|
(mkdir-p (dirname schema))
|
||||||
(with-output-to-file schema
|
(with-output-to-file schema
|
||||||
|
@ -8533,9 +8529,9 @@ logo='~a'~%" icon))))))
|
||||||
;; '~/.xsession' script with no other desktop entry files.
|
;; '~/.xsession' script with no other desktop entry files.
|
||||||
;; See <https://bugs.gnu.org/35068>.
|
;; See <https://bugs.gnu.org/35068>.
|
||||||
(add-after 'install 'install-placeholder-desktop-entry
|
(add-after 'install 'install-placeholder-desktop-entry
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((sessions (string-append #$output
|
||||||
(sessions (string-append out "/share/gdm/BuiltInSessions"))
|
"/share/gdm/BuiltInSessions"))
|
||||||
(fail (string-append sessions "/fail.desktop")))
|
(fail (string-append sessions "/fail.desktop")))
|
||||||
(mkdir-p sessions)
|
(mkdir-p sessions)
|
||||||
(with-output-to-file fail
|
(with-output-to-file fail
|
||||||
|
@ -8556,11 +8552,10 @@ logo='~a'~%" icon))))))
|
||||||
;; XXX: GNOME Shell should be linked here too, but currently
|
;; XXX: GNOME Shell should be linked here too, but currently
|
||||||
;; GNOME Shell depends on GDM.
|
;; GNOME Shell depends on GDM.
|
||||||
(add-after 'install 'link-autostart-files
|
(add-after 'install 'link-autostart-files
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((autostart (string-append #$output "/share/gdm/"
|
||||||
(autostart (string-append out "/share/gdm/"
|
|
||||||
"greeter/autostart"))
|
"greeter/autostart"))
|
||||||
(settings (assoc-ref inputs "gnome-settings-daemon")))
|
(settings #$(this-package-input "gnome-settings-daemon")))
|
||||||
(mkdir-p autostart)
|
(mkdir-p autostart)
|
||||||
(with-directory-excursion autostart
|
(with-directory-excursion autostart
|
||||||
(for-each (lambda (desktop)
|
(for-each (lambda (desktop)
|
||||||
|
@ -8568,14 +8563,14 @@ logo='~a'~%" icon))))))
|
||||||
(find-files
|
(find-files
|
||||||
(string-append settings "/etc/xdg"))))))))))
|
(string-append settings "/etc/xdg"))))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("dconf" ,dconf)
|
(list `(,glib "bin") ;for glib-compile-schemas, etc.
|
||||||
("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
|
dconf
|
||||||
("gobject-introspection" ,gobject-introspection)
|
gobject-introspection
|
||||||
("guix-icons" ,guix-icons)
|
guix-icons
|
||||||
("intltool" ,intltool)
|
intltool
|
||||||
("itstool" ,itstool)
|
itstool
|
||||||
("pkg-config" ,pkg-config)
|
libxml2
|
||||||
("xmllint" ,libxml2)))
|
pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
(list accountsservice
|
(list accountsservice
|
||||||
check ;for testing
|
check ;for testing
|
||||||
|
|
Reference in New Issue