From bed695aa94cd85800ec2c6296fb2d13e7ac29133 Mon Sep 17 00:00:00 2001 From: L p R n d n Date: Tue, 16 Apr 2019 14:17:18 +0200 Subject: [PATCH] gnu: lightdm-gtk-greeter: Wrap binary. * gnu/package/display-managers.scm (lightdm-gtk-greeter)[inputs]: Add shared-mime-info. [arguments]: Add "wrap-program" phase. Signed-off-by: Ricardo Wurmus --- gnu/packages/display-managers.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index cda7598066..23a9aabe64 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -219,13 +219,29 @@ (define-public lightdm-gtk-greeter out "/share/xgreeters/lightdm-gtk-greeter.desktop") (("Exec=lightdm-gtk-greeter") (string-append "Exec=" out "/sbin/lightdm-gtk-greeter"))) - #t)))))) + #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))))) (native-inputs `(("exo" ,exo) ("intltool" ,intltool) ("pkg-config" ,pkg-config))) (inputs `(("lightdm" ,lightdm) + ("shared-mime-info" ,shared-mime-info) ("at-spi2-core" ,at-spi2-core) ("gtk+" ,gtk+))) (synopsis "GTK+ greeter for LightDM")