summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-03 21:24:41 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-03 22:02:03 -0400
commit90b705ea447548c71950ba758bfe3453814a839e (patch)
treea2f02625b5a2803ddb2555bbfd4b928866bc6705 /gnu
parenta8f53d544b00ba80f98c1c65e3cb67ce9110ae93 (diff)
downloadguix-90b705ea447548c71950ba758bfe3453814a839e.tar.gz
gnu: lightdm-gtk-greeter: Use gexps and new style inputs.
* gnu/packages/display-managers.scm
(lightdm-gtk-greeter)[arguments]: Use gexps.
[configure-flags]: Use search-input-file.
[phases]{fix-.desktop-file}: Likewise.
{wrap-program}: Use search-input-file and this-package-input.
[inputs]: Use new style.  Add glib.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/display-managers.scm73
1 files changed, 39 insertions, 34 deletions
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 1ff2bf7ddd..b259bd508c 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -348,43 +348,48 @@ display manager which supports different greeters.")
                 "04q62mvr97l9gv8h37hfarygqc7p0498ig7xclcg4kxkqw0b7yxy"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       (list (string-append "--enable-at-spi-command="
-                            (assoc-ref %build-inputs "at-spi2-core")
-                            "/libexec/at-spi-bus-launcher"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'fix-.desktop-file
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (substitute* (string-append
-                             out "/share/xgreeters/lightdm-gtk-greeter.desktop")
-                 (("Exec=lightdm-gtk-greeter")
-                  (string-append "Exec=" out "/sbin/lightdm-gtk-greeter")))
-               #t)))
-         (add-after 'fix-.desktop-file 'wrap-program
-           ;; Mimic glib-or-gtk build system
-           ;; which doesn't wrap files in /sbin
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let ((gtk (assoc-ref inputs "gtk+")))
-               (wrap-program (string-append (assoc-ref outputs "out")
-                                            "/sbin/lightdm-gtk-greeter")
-                 `("XDG_DATA_DIRS" ":" prefix
-                   ,(cons "/run/current-system/profile/share"
-                          (map (lambda (pkg)
-                                 (string-append (assoc-ref inputs pkg) "/share"))
-                               '("gtk+" "shared-mime-info" "glib"))))
-                 `("GTK_PATH" ":" prefix (,gtk))
-                 `("GIO_EXTRA_MODULES" ":" prefix (,gtk))))
-             #t)))))
+     (list
+      #:configure-flags
+      #~(list (string-append "--enable-at-spi-command="
+                             (search-input-file
+                              %build-inputs "libexec/at-spi-bus-launcher")))
+
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'fix-.desktop-file
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* (search-input-file
+                            outputs
+                            "share/xgreeters/lightdm-gtk-greeter.desktop")
+                (("Exec=lightdm-gtk-greeter")
+                 (string-append "Exec="
+                                (search-input-file
+                                 outputs "sbin/lightdm-gtk-greeter"))))))
+          (add-after 'fix-.desktop-file 'wrap-program
+            ;; Mimic glib-or-gtk build system which doesn't wrap files in
+            ;; /sbin.
+            (lambda* (#:key outputs inputs #:allow-other-keys)
+              (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")
+                  `("XDG_DATA_DIRS" ":" prefix
+                    ,(cons "/run/current-system/profile/share"
+                           (map (lambda (pkg)
+                                  (string-append pkg "/share"))
+                                (list gtk shared-mime-info glib))))
+                  `("GTK_PATH" ":" prefix (,gtk))
+                  `("GIO_EXTRA_MODULES" ":" prefix (,gtk)))))))))
     (native-inputs
      (list exo intltool pkg-config xfce4-dev-tools))
     (inputs
-     `(("bash" ,bash-minimal) ; for wrap-program
-       ("lightdm" ,lightdm)
-       ("shared-mime-info" ,shared-mime-info)
-       ("at-spi2-core" ,at-spi2-core)
-       ("gtk+" ,gtk+)))
+     (list bash-minimal                 ;for wrap-program
+           lightdm
+           shared-mime-info
+           at-spi2-core
+           glib
+           gtk+))
     (synopsis "GTK+ greeter for LightDM")
     (home-page "https://github.com/xubuntu/lightdm-gtk-greeter")
     (description "This package provides a LightDM greeter implementation using