[PATCH] gnu: Add slick-greeter.

  • Open
  • quality assurance status badge
Details
One participant
  • Feng Shu
Owner
unassigned
Submitted by
Feng Shu
Severity
normal
F
F
Feng Shu wrote 47 hours ago
(address . guix-patches@gnu.org)
87ldw6vj2v.fsf@163.com
From 227484a25bcfe0dbe4493377d92e9d697274be5a Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Mon, 23 Dec 2024 17:22:01 +0800
Subject: [PATCH] gnu: Add slick-greeter.

* gnu/packages/display-managers.scm (slick-greeter): New variable.

Change-Id: Ib0de31f5c7e2c8eb31f2d7e8aabfb841ccca08c0
---
gnu/packages/display-managers.scm | 102 ++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)

Toggle diff (117 lines)
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index b70f8101e6..d6b6433831 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -461,6 +461,108 @@ (define make-flags*
display manager which supports different greeters.")
(license license:gpl3+)))
+(define-public slick-greeter
+ (package
+ (name "slick-greeter")
+ (version "2.0.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxmint/slick-greeter")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pk8d8mpnrh70xdi9mfn1h5xkrf09v06vbi1p1wzqdskzfh3ci1n"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:glib-or-gtk? #t
+ #:configure-flags
+ #~(list
+ ;; 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"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-hardcoded-paths
+ (lambda _
+ (substitute* '("src/slick-greeter.vala"
+ "src/session-list.vala")
+ (("/usr/bin/slick-greeter-")
+ (string-append #$output "/bin/slick-greeter-"))
+ (("/usr/share/slick-greeter/badges/")
+ (string-append #$output "/share/slick-greeter/badges/"))
+ (("/usr/share/xsessions/")
+ "/run/current-system/profile/share/xsessions/")
+ (("/usr/share/wayland-sessions/")
+ "/run/current-system/profile/share/wayland-sessions/"))))
+ (add-after 'glib-or-gtk-wrap 'custom-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (wrap-script (search-input-file
+ outputs "bin/slick-greeter")
+ ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
+ ;; available at all times even outside of profiles, such as
+ ;; when used in the lightdm-service-type. Otherwise, it
+ ;; wouldn't be able to display its own icons.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(search-input-file
+ outputs
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
+ `("XDG_DATA_DIRS" ":" prefix
+ (,(string-append "/run/current-system/profile/share:"
+ (getenv "XDG_DATA_DIRS"))))
+ '("XCURSOR_PATH" ":" prefix
+ ("/run/current-system/profile/share/icons")))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each (lambda (prog)
+ (wrap-program (string-append #$output "/bin/" prog)
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))
+ '("slick-greeter-check-hidpi"
+ "slick-greeter-set-keyboard-layout"
+ "slick-greeter-enable-tap-to-click"))))
+ (add-after 'install 'fix-.desktop-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (search-input-file
+ outputs
+ "share/xgreeters/slick-greeter.desktop")
+ (("Exec=slick-greeter")
+ (string-append "Exec="
+ (search-input-file
+ outputs "bin/slick-greeter")))))))))
+ (native-inputs
+ (list gettext-minimal
+ gnome-common
+ (list glib "bin")
+ pkg-config
+ vala))
+ (inputs
+ (list at-spi2-core
+ bash-minimal ;for wrap-program
+ dbus
+ dbus-glib
+ gtk+
+ guile-3.0
+ libcanberra
+ libgnomekbd
+ libxapp
+ libxkbfile
+ lightdm
+ pixman
+ python-wrapper
+ python-pygobject
+ shared-mime-info
+ xvfb-run))
+ (synopsis "A slick-looking LightDM greeter")
+ (home-page "https://github.com/linuxmint/slick-greeter")
+ (description "Slick-Greeter is a fork of Unity Greeter 16.04.2, it is
+cross-distribution and work pretty much anywhere, it supports HiDPI, If a
+default/chosen session isn't present on the system, it will scans for known
+sessions dirs and replaces the invalid session choice with a valid session.")
+ (license license:gpl3)))
+
(define-public lightdm-gtk-greeter
(package
(name "lightdm-gtk-greeter")
--
2.45.2


--
F
F
Feng Shu wrote 44 hours ago
[PATCH v2] gnu: Add slick-greeter.
(address . 75043@debbugs.gnu.org)
87ttauzgib.fsf@163.com
From d93505693095321e596fd52882126c32d4cc2543 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Mon, 23 Dec 2024 20:39:05 +0800
Subject: [PATCH v2] gnu: Add slick-greeter.

* gnu/packages/display-managers.scm (slick-greeter): New variable.

Change-Id: I9f117bd91bfe9edbd0619f434ad46399e3c59b99
---
gnu/packages/display-managers.scm | 106 ++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)

Toggle diff (145 lines)
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index df5fc0a8572..4bb90a210b8 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -39,6 +39,7 @@ (define-module (gnu packages display-managers)
#:use-module (guix build-system qt)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -48,9 +49,11 @@ (define-module (gnu packages display-managers)
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages cinnamon)
#:use-module (gnu packages crypto)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -59,6 +62,7 @@ (define-module (gnu packages display-managers)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages libcanberra)
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -461,6 +465,108 @@ (define make-flags*
display manager which supports different greeters.")
(license license:gpl3+)))
+(define-public slick-greeter
+ (package
+ (name "slick-greeter")
+ (version "2.0.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxmint/slick-greeter")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pk8d8mpnrh70xdi9mfn1h5xkrf09v06vbi1p1wzqdskzfh3ci1n"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:glib-or-gtk? #t
+ #:configure-flags
+ #~(list
+ ;; 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"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-hardcoded-paths
+ (lambda _
+ (substitute* '("src/slick-greeter.vala"
+ "src/session-list.vala")
+ (("/usr/bin/slick-greeter-")
+ (string-append #$output "/bin/slick-greeter-"))
+ (("/usr/share/slick-greeter/badges/")
+ (string-append #$output "/share/slick-greeter/badges/"))
+ (("/usr/share/xsessions/")
+ "/run/current-system/profile/share/xsessions/")
+ (("/usr/share/wayland-sessions/")
+ "/run/current-system/profile/share/wayland-sessions/"))))
+ (add-after 'glib-or-gtk-wrap 'custom-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (wrap-script (search-input-file
+ outputs "bin/slick-greeter")
+ ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
+ ;; available at all times even outside of profiles, such as
+ ;; when used in the lightdm-service-type. Otherwise, it
+ ;; wouldn't be able to display its own icons.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(search-input-file
+ outputs
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
+ `("XDG_DATA_DIRS" ":" prefix
+ (,(string-append "/run/current-system/profile/share:"
+ (getenv "XDG_DATA_DIRS"))))
+ '("XCURSOR_PATH" ":" prefix
+ ("/run/current-system/profile/share/icons")))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each (lambda (prog)
+ (wrap-program (string-append #$output "/bin/" prog)
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))
+ '("slick-greeter-check-hidpi"
+ "slick-greeter-set-keyboard-layout"
+ "slick-greeter-enable-tap-to-click"))))
+ (add-after 'install 'fix-.desktop-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (search-input-file
+ outputs
+ "share/xgreeters/slick-greeter.desktop")
+ (("Exec=slick-greeter")
+ (string-append "Exec="
+ (search-input-file
+ outputs "bin/slick-greeter")))))))))
+ (native-inputs
+ (list gettext-minimal
+ gnome-common
+ (list glib "bin")
+ pkg-config
+ vala))
+ (inputs
+ (list at-spi2-core
+ bash-minimal ;for wrap-program
+ dbus
+ dbus-glib
+ gtk+
+ guile-3.0
+ libcanberra
+ libgnomekbd
+ libxapp
+ libxkbfile
+ lightdm
+ pixman
+ python-wrapper
+ python-pygobject
+ shared-mime-info
+ xvfb-run))
+ (synopsis "A slick-looking LightDM greeter")
+ (home-page "https://github.com/linuxmint/slick-greeter")
+ (description "Slick-Greeter is a fork of Unity Greeter 16.04.2, it is
+cross-distribution and work pretty much anywhere, it supports HiDPI, If a
+default/chosen session isn't present on the system, it will scans for known
+sessions dirs and replaces the invalid session choice with a valid session.")
+ (license license:gpl3)))
+
(define-public lightdm-gtk-greeter
(package
(name "lightdm-gtk-greeter")
--
2.46.0


--
T
T
tumashu wrote 6 hours ago
[PATCH v3] gnu: Add slick-greeter.
(address . 75043@debbugs.gnu.org)(name . Feng Shu)(address . tumashu@163.com)
20241225025814.13255-1-tumashu@163.com
From: Feng Shu <tumashu@163.com>

* gnu/packages/display-managers.scm (slick-greeter): New variable.

Change-Id: I9f117bd91bfe9edbd0619f434ad46399e3c59b99
---
gnu/packages/display-managers.scm | 106 ++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)

Toggle diff (143 lines)
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index df5fc0a857..4bb90a210b 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -39,6 +39,7 @@ (define-module (gnu packages display-managers)
#:use-module (guix build-system qt)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -48,9 +49,11 @@ (define-module (gnu packages display-managers)
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages cinnamon)
#:use-module (gnu packages crypto)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -59,6 +62,7 @@ (define-module (gnu packages display-managers)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages libcanberra)
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -461,6 +465,108 @@ (define make-flags*
display manager which supports different greeters.")
(license license:gpl3+)))
+(define-public slick-greeter
+ (package
+ (name "slick-greeter")
+ (version "2.0.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxmint/slick-greeter")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pk8d8mpnrh70xdi9mfn1h5xkrf09v06vbi1p1wzqdskzfh3ci1n"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:glib-or-gtk? #t
+ #:configure-flags
+ #~(list
+ ;; 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"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-hardcoded-paths
+ (lambda _
+ (substitute* '("src/slick-greeter.vala"
+ "src/session-list.vala")
+ (("/usr/bin/slick-greeter-")
+ (string-append #$output "/bin/slick-greeter-"))
+ (("/usr/share/slick-greeter/badges/")
+ (string-append #$output "/share/slick-greeter/badges/"))
+ (("/usr/share/xsessions/")
+ "/run/current-system/profile/share/xsessions/")
+ (("/usr/share/wayland-sessions/")
+ "/run/current-system/profile/share/wayland-sessions/"))))
+ (add-after 'glib-or-gtk-wrap 'custom-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (wrap-script (search-input-file
+ outputs "bin/slick-greeter")
+ ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
+ ;; available at all times even outside of profiles, such as
+ ;; when used in the lightdm-service-type. Otherwise, it
+ ;; wouldn't be able to display its own icons.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(search-input-file
+ outputs
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
+ `("XDG_DATA_DIRS" ":" prefix
+ (,(string-append "/run/current-system/profile/share:"
+ (getenv "XDG_DATA_DIRS"))))
+ '("XCURSOR_PATH" ":" prefix
+ ("/run/current-system/profile/share/icons")))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each (lambda (prog)
+ (wrap-program (string-append #$output "/bin/" prog)
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))
+ '("slick-greeter-check-hidpi"
+ "slick-greeter-set-keyboard-layout"
+ "slick-greeter-enable-tap-to-click"))))
+ (add-after 'install 'fix-.desktop-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* (search-input-file
+ outputs
+ "share/xgreeters/slick-greeter.desktop")
+ (("Exec=slick-greeter")
+ (string-append "Exec="
+ (search-input-file
+ outputs "bin/slick-greeter")))))))))
+ (native-inputs
+ (list gettext-minimal
+ gnome-common
+ (list glib "bin")
+ pkg-config
+ vala))
+ (inputs
+ (list at-spi2-core
+ bash-minimal ;for wrap-program
+ dbus
+ dbus-glib
+ gtk+
+ guile-3.0
+ libcanberra
+ libgnomekbd
+ libxapp
+ libxkbfile
+ lightdm
+ pixman
+ python-wrapper
+ python-pygobject
+ shared-mime-info
+ xvfb-run))
+ (synopsis "A slick-looking LightDM greeter")
+ (home-page "https://github.com/linuxmint/slick-greeter")
+ (description "Slick-Greeter is a fork of Unity Greeter 16.04.2, it is
+cross-distribution and work pretty much anywhere, it supports HiDPI, If a
+default/chosen session isn't present on the system, it will scans for known
+sessions dirs and replaces the invalid session choice with a valid session.")
+ (license license:gpl3)))
+
(define-public lightdm-gtk-greeter
(package
(name "lightdm-gtk-greeter")
--
2.45.2
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75043@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75043
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch