From 4a7ce94753e0d8180d5581387cc18a585a28eadc 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 5/9] gnu: lightdm-gtk-greeter: Wrap binary. * gnu/package/display-managers.scm (lightdm-gtk-greeter): Wrap binary. [inputs]: Add shared-mime-info. [arguments]: Add wrap-program phase. --- gnu/packages/display-managers.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 18ec0f10d6..be17f055d1 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -210,6 +210,7 @@ display manager which supports different greeters.") ("pkg-config" ,pkg-config))) (inputs `(("lightdm" ,lightdm) + ("shared-mime-info" ,shared-mime-info) ("at-spi2-core" ,at-spi2-core) ("gtk+" ,gtk+))) (arguments @@ -226,8 +227,21 @@ display manager which supports different greeters.") 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-path 'wrap-program + ;; try to mimic glib-or-gtk build system + ;; which doesn't wrap files in /sbin + (lambda* (#:key outputs inputs #:allow-other-keys) + (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 (,(assoc-ref inputs "gtk+"))) + `("GIO_EXTRA_MODULES" ":" prefix (,(assoc-ref inputs "gtk+")))) + #t))))) (synopsis "GTK+ greeter for LightDM") (home-page "https://launchpad.net/lightdm-gtk-greeter") (description "This package provides a LightDM greeter implementation using -- 2.26.1