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

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 28 Jan 2025 23:07:24 +0900

Hello,

muradm <[email-masked]> writes:

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

Please split packages submission in different commits (1 package = 1
commit).

> Change-Id: I9f84c1011e66ae7c87191488930465685ae44569
> ---
>  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 659f7bc3bec..be6f00ce86b 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-2025 Artyom V. Poptsov <[email-masked]>
> @@ -5939,6 +5939,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.")

I'd spell GTK-based, despite what upstream used.   What does 'to be run
under cage' means?  What is cage?  Shouldn't that run under greetd?  I'm
confused.  Please expand the description.

> +    (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"))))))))

Hm, that rebuilds gtkgreet just to change its theme?  Couldn't its
service be configurable and take care of that instead?

> +   (inputs (modify-inputs
> +            (package-inputs gtkgreet)
> +            (prepend gnome-themes-extra)))))
> +

Nitpic: that'd be more conventionally indented as:

--8<---------------cut here---------------start------------->8---
(inputs
 (modify-inputs (package-inputs gtkgreet)
  (prepend gnome-themes-extra)))
--8<---------------cut here---------------end--------------->8---

-- 
Thanks,
Maxim