Subject: [bug#75270] [PATCH v3 2/3] gnu: Add gtkgreet.

From: muradm <[email-masked]>
Date: Wed, 8 Jan 2025 20:47:42 +0300

* gnu/packages/admin.scm (gtkgreet): New variable.
(gtkgreet-adwaita-dark): New variable.

Change-Id: Ib0159b4a993113560f641b4877b826ff337e5c93
---
 gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 466df65dd9..42efdb1562 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <[email-masked]>
 ;;; Copyright © 2021 Brice Waegeneire <[email-masked]>
 ;;; Copyright © 2021 Maxime Devos <[email-masked]>
-;;; Copyright © 2021 muradm <[email-masked]>
+;;; Copyright © 2021, 2025 muradm <[email-masked]>
 ;;; Copyright © 2021 pineapples <[email-masked]>
 ;;; Copyright © 2021 Petr Hodina <[email-masked]>
 ;;; Copyright © 2021-2024 Artyom V. Poptsov <[email-masked]>
@@ -5831,6 +5831,47 @@ (define-public wlgreet
 on a GUI toolkit.")
       (license license:gpl3))))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
+(define-public gtkgreet-adwaita-dark
+  (package
+   (inherit gtkgreet)
+   (name "gtkgreet-adwaita-dark")
+   (arguments
+    (list
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after 'install 'wrap-gtkgreet-for-theme
+                   (lambda _
+                     (wrap-program
+                      (string-append #$output "/bin/gtkgreet")
+                      '("GTK_THEME" "" = ("Adwaita:dark"))))))))
+   (inputs (modify-inputs
+            (package-inputs gtkgreet)
+            (prepend gnome-themes-extra)))))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1