guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.


From: Leo Prikler
Subject: [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.
Date: Sun, 18 Apr 2021 16:47:44 +0200
User-agent: Evolution 3.34.2

Hi Brendan,

Am Sonntag, den 18.04.2021, 23:17 +1000 schrieb Brendan Tildesley:
> * gnu/packages/polkit.scm (polkit-gnome):
> [inputs]: Source a translated .desktop file from Arch Linux.
> [arguments]: Install the .desktop file into /etc/autostart and set
> OnlyShowIn to XFCE so it will be autostarted only by XFCE.
> [description]: Add a note clarifying that this package is currently
> only
> used for XFCE, not GNOME.
> ---
>  gnu/packages/polkit.scm | 39 +++++++++++++++++++++++++++++++++++----
>  1 file changed, 35 insertions(+), 4 deletions(-)
> 
> diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
> index d868aceec2..1c5173921c 100644
> --- a/gnu/packages/polkit.scm
> +++ b/gnu/packages/polkit.scm
> @@ -6,6 +6,7 @@
>  ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
>  ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -183,12 +184,42 @@ easily with PolicyKit.")
>                  "0sckmcbxyj6sbrnfc5p5lnw27ccghsid6v6wxq09mgxqcd4lk10
> p"))))
>      (build-system gnu-build-system)
>      (inputs `(("gtk+" ,gtk+)
> -              ("polkit" ,polkit)))
> +              ("polkit" ,polkit)
> +              ("desktop-file"
> +               ,(origin
> +                  (method url-fetch)
> +                  (uri
> +                   (string-append
> +                    "
> https://raw.githubusercontent.com/archlinux/svntogit-community/";
> +                    "8963650797cfe0383ef510e9c0492b2cb22a2593/repos/
> community-x86_64/"
> +                    "polkit-gnome-authentication-agent-1.desktop"))
> +                  (sha256
> +                   (base32
> +                    "1rqy8jf01idaqnyrzjaapr7pzx8zg2x9kmw70n1p9cpalhi
> wfx2h"))))))
Instead of sourcing the desktop file from a really obscure location,
would it be possible to express this in terms of `make-desktop-entry-
file'?  This also has the added advantage, that it could be inlined
into the phase.
>      (native-inputs `(("intltool"   ,intltool)
>                       ("pkg-config" ,pkg-config)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'install-autostart-file
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (autostart-dir (string-append out
> "/etc/xdg/autostart"))
> +                    (desktop (string-append
> +                              autostart-dir
> +                              "/polkit-gnome-authentication-agent-
> 1.desktop")))
> +               (mkdir-p autostart-dir)
> +               (copy-file (assoc-ref inputs "desktop-file") desktop)
> +               (substitute* desktop
> +                 (("^Exec=.*")
> +                  (string-append
> +                   "Exec=" out "/libexec/polkit-gnome-
> authentication-agent-1\n"))
> +                 ;; This will mean the agent will only be started in
> XFCE.
> +                 (("^OnlyShowIn=.*") "OnlyShowIn=XFCE;\n"))))))))
See above.
>      (synopsis "Legacy polkit authentication agent for GNOME")
> -    (description "PolicyKit-gnome provides a D-Bus session bus
> service
> -that is used to bring up authentication dialogs used for obtaining
> -privileges.")
> +    (description "PolicyKit-gnome provides a D-Bus session bus
> service that
> +is used to bring up authentication dialogs used for obtaining
> privileges.
> +PolicyKit-gnome is no longer used in GNOME but has become the
> default agent
> +for XFCE.")
Is that so?  Even if this holds for GNOME 40, it's not true for Guix'
GNOME until wip-gnome is merged, or does 3.34 already use something
else?
>      (home-page "https://www.freedesktop.org/wiki/Software/polkit/";)
>      (license lgpl2.0+)))

Regards,
Leo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]