gnu: lightdm-gtk-greeter: Use the glib-or-gtk-wrap phase as-is.

* gnu/packages/display-managers.scm (lightdm-gtk-greeter)
[configure-flags]: Install binaries to bin/, so the wrap phase of glib-or-gtk
handles them.
[phases]{wrap-program}: Delete.
{custom-wrap}: New phase, wrapping the wrapper with a few extra environment
variables.
This commit is contained in:
Maxim Cournoyer 2022-08-09 00:54:22 -04:00
parent 9376411fbe
commit 0d23e9cda2
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -54,6 +54,7 @@ (define-module (gnu packages display-managers)
#:use-module (gnu packages gnome) #:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg) #:use-module (gnu packages gnupg)
#:use-module (gnu packages gtk) #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image) #:use-module (gnu packages image)
#:use-module (gnu packages kde-frameworks) #:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
@ -353,6 +354,9 @@ (define-public lightdm-gtk-greeter
(list (list
#:configure-flags #:configure-flags
#~(list "--disable-indicator-services-command" ;requires upstart #~(list "--disable-indicator-services-command" ;requires upstart
;; Put the binary under /bin rather than /sbin, so that it gets
;; wrapped by the glib-or-gtk-wrap phase.
(string-append "--sbindir=" #$output "/bin")
(string-append "--enable-at-spi-command=" (string-append "--enable-at-spi-command="
(search-input-file (search-input-file
%build-inputs "libexec/at-spi-bus-launcher"))) %build-inputs "libexec/at-spi-bus-launcher")))
@ -367,35 +371,29 @@ (define-public lightdm-gtk-greeter
(("Exec=lightdm-gtk-greeter") (("Exec=lightdm-gtk-greeter")
(string-append "Exec=" (string-append "Exec="
(search-input-file (search-input-file
outputs "sbin/lightdm-gtk-greeter")))))) outputs "bin/lightdm-gtk-greeter"))))))
(add-after 'fix-.desktop-file 'wrap-program (add-after 'glib-or-gtk-wrap 'custom-wrap
;; Mimic glib-or-gtk build system which doesn't wrap files in (lambda* (#:key outputs #:allow-other-keys)
;; /sbin. (wrap-script (search-input-file
(lambda* (#:key outputs inputs #:allow-other-keys) outputs "bin/lightdm-gtk-greeter")
(let ((gtk #$(this-package-input "gtk+"))
(shared-mime-info #$(this-package-input "shared-mime-info"))
(glib #$(this-package-input "glib")))
(wrap-program (search-input-file
outputs "sbin/lightdm-gtk-greeter")
;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
;; available at all times even outside of profiles, such as ;; available at all times even outside of profiles, such as
;; when used in the lightdm-service-type. Otherwise, it ;; when used in the lightdm-service-type. Otherwise, it
;; wouldn't be able to display its own icons. ;; wouldn't be able to display its own icons.
`("GDK_PIXBUF_MODULE_FILE" = `("GDK_PIXBUF_MODULE_FILE" =
(,(search-input-file (,(search-input-file
inputs outputs
"lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
`("XDG_DATA_DIRS" ":" prefix `("XDG_DATA_DIRS" ":" prefix
,(cons "/run/current-system/profile/share" (,(string-append "/run/current-system/profile/share:"
(map (lambda (pkg) (getenv "XDG_DATA_DIRS"))))
(string-append pkg "/share"))
(list gtk shared-mime-info glib))))
`("GTK_PATH" ":" prefix (,gtk))
`("GIO_EXTRA_MODULES" ":" prefix (,gtk))
'("XCURSOR_PATH" ":" prefix '("XCURSOR_PATH" ":" prefix
("/run/current-system/profile/share/icons"))))))))) ("/run/current-system/profile/share/icons"))))))))
(native-inputs (native-inputs
(list exo intltool pkg-config xfce4-dev-tools)) (list exo
intltool
pkg-config
xfce4-dev-tools))
(inputs (inputs
(list at-spi2-core (list at-spi2-core
bash-minimal ;for wrap-program bash-minimal ;for wrap-program