Modularize gnome-desktop-service

  • Done
  • quality assurance status badge
Details
3 participants
  • Liliana Marie Prikler
  • Maxim Cournoyer
  • Vivien Kraus
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 25 Jan 17:12 +0100
[PATCH gnome-team RFC 0/3] *** SUBJECT HERE ***
(address . guix-patches@gnu.org)
cover.1706199146.git.liliana.prikler@gmail.com
*** BLURB HERE ***

Liliana Marie Prikler (3):
services: Modularise gnome-desktop-configuration.
gnu: Deprecate gnome meta-package.
services: gnome-desktop: Add core packages for GNOME 44.

gnu/packages/gnome.scm | 3 +-
gnu/services/desktop.scm | 174 +++++++++++++++++++++++++++++++++++----
2 files changed, 162 insertions(+), 15 deletions(-)


base-commit: 2e7d78b1f02a8eae82c34e5183134c9d1a0d02b3
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 17:27 +0100
(address . control@debbugs.gnu.org)
cecf48ec34c58a7e77052d5c6fae58a3fc003666.camel@gmail.com
retitle 68716 Modularize gnome-desktop-service
thanks
L
L
Liliana Marie Prikler wrote on 25 Jan 16:35 +0100
(address . 68716@debbugs.gnu.org)
f75a3f173bb2db1723ee813cde74b6466f6e950a.1706199146.git.liliana.prikler@gmail.com
* gnu/services/gnome.scm (%gnome-core-services, %gnome-core-shell)
(%gnome-core-utilities, %gnome-essential-extras): New variables.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’. Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
---
gnu/services/desktop.scm | 172 +++++++++++++++++++++++++++++++++++----
1 file changed, 158 insertions(+), 14 deletions(-)

Toggle diff (244 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 5b79fbcda1..86be99252d 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -37,6 +37,7 @@ (define-module (gnu services desktop)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services base)
+ #:use-module (gnu services configuration)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
@@ -56,10 +57,16 @@ (define-module (gnu services desktop)
#:use-module (gnu packages admin)
#:use-module (gnu packages cups)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages geo)
+ #:use-module (gnu packages gstreamer)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xfce)
#:use-module (gnu packages avahi)
#:use-module (gnu packages xdisorg)
@@ -73,6 +80,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
+ #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -81,6 +89,7 @@ (define-module (gnu services desktop)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -137,8 +146,16 @@ (define-module (gnu services desktop)
cups-pk-helper-service-type
sane-service-type
+ %gnome-core-services
+ %gnome-core-shell
+ %gnome-core-utilities
+ %gnome-essential-extras
gnome-desktop-configuration
gnome-desktop-configuration?
+ gnome-desktop-configuration-core-services
+ gnome-desktop-configuration-shell
+ gnome-desktop-configuration-utilities
+ gnome-desktop-configuration-extra-packages
gnome-desktop-service
gnome-desktop-service-type
@@ -1382,11 +1399,100 @@ (define sane-service-type
;;; GNOME desktop service.
;;;
-(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
- make-gnome-desktop-configuration
- gnome-desktop-configuration?
- (gnome gnome-desktop-configuration-gnome
- (default gnome)))
+(define %gnome-core-services
+ (list accountsservice network-manager packagekit upower))
+
+(define %gnome-core-shell
+ (list gdm
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-desktop
+ gnome-initial-setup
+ gnome-keyring
+ gnome-menus
+ gnome-session
+ gnome-settings-daemon
+ gnome-shell-extensions
+ gnome-shell
+ gnome-user-docs
+ gnome-user-share
+ gvfs
+ mutter
+ orca
+ rygel
+ sushi
+ adwaita-icon-theme
+ glib-networking
+ gsettings-desktop-schemas))
+
+(define %gnome-core-utilities
+ (list baobab
+ cheese
+ eog
+ epiphany
+ evince
+ file-roller
+ gnome-calculator
+ gnome-calendar
+ gnome-characters
+ gnome-clocks
+ gnome-console
+ gnome-contacts
+ gnome-disk-utility
+ gnome-font-viewer
+ gnome-maps
+ gnome-music
+ gnome-photos
+ gnome-screenshot
+ gnome-system-monitor
+ gnome-text-editor
+ gnome-weather
+ nautilus
+ simple-scan
+ totem
+ tracker-miners
+ xdg-desktop-portal-gnome
+ yelp))
+
+(define %gnome-essential-extras
+ (list at-spi2-core
+ dbus
+ dconf
+ desktop-file-utils
+ font-abattis-cantarell
+ font-dejavu
+ gnome-default-applications ; XXX: Allow customization by records
+ gst-plugins-base
+ gst-plugins-good
+ gucharmap
+ pinentry-gnome3
+ pulseaudio ; XXX: Replace with pipewire
+ shared-mime-info
+ system-config-printer
+ xdg-user-dirs
+ zenity))
+
+(define-maybe/no-serialization package)
+
+(define-configuration/no-serialization gnome-desktop-configuration
+ (core-services
+ (list-of-packages %gnome-core-services)
+ "A list of packages that the GNOME Shell and applications may rely on.")
+ (shell
+ (list-of-packages %gnome-core-shell)
+ "A list of packages that constitute the GNOME Shell, without applications.")
+ (utilities
+ (list-of-packages %gnome-core-utilities)
+ "A list of packages that serve as applications to use on top of the \
+GNOME Shell.")
+ (gnome (maybe-package) "Deprecated. Do not use.")
+ (extra-packages
+ (list-of-packages %gnome-essential-extras)
+ "A list of GNOME-adjacent packages to also include. This field is intended
+for users to add their own packages to their GNOME experience. Note, that it
+already includes some packages that are considered essential by some (most?)
+GNOME users."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1400,18 +1506,56 @@ (define (gnome-packages gnome names)
(define (gnome-udev-rules config)
"Return the list of GNOME dependencies that provide udev rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome '("gnome-settings-daemon"))))
+ (let* ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda
+ ((and pkg (= package-name "gnome-settings-daemon"))
+ (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome '("gnome-settings-daemon")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gnome-settings-daemon"))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gvfs"))))))))
+
+(define (gnome-profile config)
+ "Return a list of packages propagated through CONFIG."
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config)))
(define gnome-desktop-service-type
(service-type
@@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list gnome-desktop-configuration-gnome))))
+ gnome-profile)))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 17:06 +0100
[PATCH gnome-team RFC 3/3] services: gnome-desktop: Add core packages for GNOME 44.
(address . 68716@debbugs.gnu.org)
5d7ba29661a605837ccb75a502b223c698c234b4.1706199146.git.liliana.prikler@gmail.com
* gnu/services/desktop.scm (%gnome-core-shell): Add gnome-remote-desktop.
(%gnome-core-utilities): Add gnome-connections.
---
gnu/services/desktop.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 86be99252d..f929a6cf31 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1411,6 +1411,7 @@ (define %gnome-core-shell
gnome-initial-setup
gnome-keyring
gnome-menus
+ gnome-remote-desktop
gnome-session
gnome-settings-daemon
gnome-shell-extensions
@@ -1437,6 +1438,7 @@ (define %gnome-core-utilities
gnome-calendar
gnome-characters
gnome-clocks
+ gnome-connections
gnome-console
gnome-contacts
gnome-disk-utility
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:55 +0100
[PATCH gnome-team RFC 2/3] gnu: Deprecate gnome meta-package.
(address . 68716@debbugs.gnu.org)
c5ac4d666b0bc15d2b8f56e9d88dd197ff78d7f4.1706199146.git.liliana.prikler@gmail.com
GNOME is not a "one size fits all" environment, but with the introduction of
World, Circle, and to some extent Developer Extras and recent explorations of
mobile form factors much more customizable towards the needs of users. As
such, it is silly to insist on a single meta-package to make everyone happy.

* gnu/packages/gnome.scm (gnome): Deprecate.
---
gnu/packages/gnome.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3d89f06d6a..2726c052d4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -236,6 +236,7 @@ (define-module (gnu packages gnome)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -10131,7 +10132,7 @@ (define-public gnome-weather
(home-page "https://wiki.gnome.org/Apps/Weather")
(license license:gpl2+)))
-(define-public gnome
+(define-deprecated/public gnome #f
(package
(name "gnome")
(version (package-version gnome-shell))
--
2.41.0
V
V
Vivien Kraus wrote on 25 Jan 18:12 +0100
Re: [bug#68716] [PATCH gnome-team RFC 1/3] services: Modularise gnome-desktop-configuration.
4d7b7ed7da044d557271f02b3d90ba87ce12ccf0.camel@planete-kraus.eu
Hello!

Thank you for this series.

Le jeudi 25 janvier 2024 à 16:35 +0100, Liliana Marie Prikler a écrit :
Toggle quote (21 lines)
>  (define (gnome-udev-rules config)
>    "Return the list of GNOME dependencies that provide udev rules."
> -  (let ((gnome (gnome-desktop-configuration-gnome config)))
> -    (gnome-packages gnome '("gnome-settings-daemon"))))
> +  (let* ((gnome (gnome-desktop-configuration-gnome config))
> +         (shell (gnome-desktop-configuration-shell config)))
> +    (or (any (match-lambda
> +               ((and pkg (= package-name "gnome-settings-daemon"))
> +                (list pkg))
> +               (_ #f))
> +             shell)
> +        (and (maybe-value-set? gnome)
> +             (gnome-packages gnome '("gnome-settings-daemon")))
> +        (raise
> +         (condition
> +          (&error-location
> +           (location (gnome-desktop-configuration-source-location
> config)))
> +          (&message (message (G_ "Missing gnome-settings-
> daemon"))))))))
>  
Is there a reason why we can’t just add everything (like what your new
gnome-profile function does)?

As far as I understand, the user doesn’t have a say over which
individual rules will be used, among the rules that come from the same
package. So if we want the user to have full control over the rules
that are picked, then the current configuration record does not allow
sufficient precision.

Also, we now have udev hardware files. I’m not sure we have any GNOME
packages that install hardware files, but the user might have some. The
gnome-udev-rules function name is misleading now (sorry, my bad, I
should have renamed it when the udev service changed), because every
package listed here will also have its hardware files installed, not
just rules. If you want to pick rules separately from hardware files,
you have to use file->udev-rule, file->udev-hardware (or udev-rule and
udev-hardware) from (gnu services base).

Toggle quote (9 lines)
> @@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
> (service-extension polkit-service-type
> gnome-polkit-settings)
> (service-extension profile-service-type
> - (compose list gnome-desktop-
> configuration-gnome))))
> + gnome-profile)))
> (default-value (gnome-desktop-configuration))
> (description "Run the GNOME desktop environment.")))
I think the gnome-desktop-service-type could be easily made extensible,
so that e.g a gnome-circle-service-type could add all the circles
applications in their respective sections.

Maybe it could be extended with other instances of gnome-desktop-
configuration? It looks to me that merging multiple instances is quite
easy, as you could just merge the lists for each category, and the
"gnome" field of the extension could simply be ignored. There are still
issues, such as: how can a service extension replace a package with a
conflicting one. Maybe that case is too far out of scope.

That being said, the extensibility of the gnome-desktop-service-type is
not very much needed, because we can also extend the udev, polkit and
profile services directly.

Other than that, the series looks great to me!

Vivien
L
L
Liliana Marie Prikler wrote on 25 Jan 18:38 +0100
1dc89038a0afc877b7b0e7de3166242406be0033.camel@gmail.com
Am Donnerstag, dem 25.01.2024 um 18:12 +0100 schrieb Vivien Kraus:
Toggle quote (44 lines)
> Hello!
>
> Thank you for this series.
>
> Le jeudi 25 janvier 2024 à 16:35 +0100, Liliana Marie Prikler a
> écrit :
> >  (define (gnome-udev-rules config)
> >    "Return the list of GNOME dependencies that provide udev rules."
> > -  (let ((gnome (gnome-desktop-configuration-gnome config)))
> > -    (gnome-packages gnome '("gnome-settings-daemon"))))
> > +  (let* ((gnome (gnome-desktop-configuration-gnome config))
> > +         (shell (gnome-desktop-configuration-shell config)))
> > +    (or (any (match-lambda
> > +               ((and pkg (= package-name "gnome-settings-daemon"))
> > +                (list pkg))
> > +               (_ #f))
> > +             shell)
> > +        (and (maybe-value-set? gnome)
> > +             (gnome-packages gnome '("gnome-settings-daemon")))
> > +        (raise
> > +         (condition
> > +          (&error-location
> > +           (location (gnome-desktop-configuration-source-location
> > config)))
> > +          (&message (message (G_ "Missing gnome-settings-
> > daemon"))))))))
> >  
> Is there a reason why we can’t just add everything (like what your
> new gnome-profile function does)?
>
> As far as I understand, the user doesn’t have a say over which
> individual rules will be used, among the rules that come from the
> same package. So if we want the user to have full control over the
> rules that are picked, then the current configuration record does not
> allow sufficient precision.
>
> Also, we now have udev hardware files. I’m not sure we have any GNOME
> packages that install hardware files, but the user might have some.
> The gnome-udev-rules function name is misleading now (sorry, my bad,
> I should have renamed it when the udev service changed), because
> every package listed here will also have its hardware files
> installed, not just rules. If you want to pick rules separately from
> hardware files, you have to use file->udev-rule, file->udev-hardware
> (or udev-rule and udev-hardware) from (gnu services base).
That is a good point that I've been debating with myself. For v1, I
simply aimed at service equivalence, but I have yet to decide whether
that's desirable or useful.

I don't want to simply drop all packages into udev-service-type,
though, unless there's some clever filtering going on behind the back.
I'm not sure at which stage we could efficiently check for the presence
of these magic directories and add them.

Toggle quote (19 lines)
> > @@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
> >            (service-extension polkit-service-type
> >                               gnome-polkit-settings)
> >            (service-extension profile-service-type
> > -                             (compose list gnome-desktop-
> > configuration-gnome))))
> > +                             gnome-profile)))
> >     (default-value (gnome-desktop-configuration))
> >     (description "Run the GNOME desktop environment.")))
> I think the gnome-desktop-service-type could be easily made
> extensible, so that e.g a gnome-circle-service-type could add all the
> circles applications in their respective sections.
>
> Maybe it could be extended with other instances of gnome-desktop-
> configuration? It looks to me that merging multiple instances is
> quite easy, as you could just merge the lists for each category, and
> the "gnome" field of the extension could simply be ignored. There are
> still issues, such as: how can a service extension replace a package
> with a conflicting one. Maybe that case is too far out of scope.
In my humble opinion, instantiating services twice and merging them
doesn't make sense for a number of services, with gnome being one of
them. We already have an escape hatch for further packages and
configuration records support extension via inheritance (+ public
accessors).

Toggle quote (3 lines)
> That being said, the extensibility of the gnome-desktop-service-type
> is not very much needed, because we can also extend the udev, polkit
> and profile services directly.
That too.

Cheers
M
M
Maxim Cournoyer wrote on 26 Jan 22:13 +0100
Re: [bug#68716] [PATCH gnome-team RFC 0/3] *** SUBJECT HERE ***
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87le8b23yz.fsf@gmail.com
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (9 lines)
> *** BLURB HERE ***
>
> Liliana Marie Prikler (3):
> services: Modularise gnome-desktop-configuration.
> gnu: Deprecate gnome meta-package.
> services: gnome-desktop: Add core packages for GNOME 44.
>
> gnu/packages/gnome.scm | 3 +-

Since this is an RFC, you may want to leave it open for the full 2
weeks, but otherwise, I like the directive of making the core set of
GNOME packages configurable.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

--
Thanks,
Maxim
V
V
Vivien Kraus wrote on 5 Feb 21:00 +0100
[PATCH gnome-team v2 0/5] Modularization of the gnome desktop service with udev blocklist
(address . 68716@debbugs.gnu.org)
cover.1707163201.git.vivien@planete-kraus.eu
Dear guix,

Here is a suggestion for the udev service type extension of the gnome desktop
service: add every rule and hardware, and let the system administrator
configure a blocklist of rules and hardware files.

This way, when newer packages provide different rules and hardware, they are
automatically used unless explicitely disabled.

What do you think?

Best regards,

Vivien

Liliana Marie Prikler (3):
services: Modularise gnome-desktop-configuration.
services: gnome-desktop: Add core packages for GNOME 44.
gnu: Deprecate gnome meta-package.

Vivien Kraus (2):
services: Rename gnome-udev-rules.
services: gnome: Use a blocklist for udev configurations.

gnu/packages/gnome.scm | 3 +-
gnu/services/desktop.scm | 214 +++++++++++++++++++++++++++++++++++----
2 files changed, 199 insertions(+), 18 deletions(-)


base-commit: 6d3c414f11e5ec9eb029fbfd20fb08731c2b9aab
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:35 +0100
[PATCH gnome-team v2 1/5] services: Modularise gnome-desktop-configuration.
(address . 68716@debbugs.gnu.org)
bb3ff63295022c4ccd1b5655f521d96b3b85416a.1707163201.git.vivien@planete-kraus.eu
* gnu/services/gnome.scm (%gnome-core-services, %gnome-core-shell)
(%gnome-core-utilities, %gnome-essential-extras): New variables.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’. Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
---
gnu/services/desktop.scm | 172 +++++++++++++++++++++++++++++++++++----
1 file changed, 158 insertions(+), 14 deletions(-)

Toggle diff (244 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 5b79fbcda1..86be99252d 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -37,6 +37,7 @@ (define-module (gnu services desktop)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services base)
+ #:use-module (gnu services configuration)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
@@ -56,10 +57,16 @@ (define-module (gnu services desktop)
#:use-module (gnu packages admin)
#:use-module (gnu packages cups)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages geo)
+ #:use-module (gnu packages gstreamer)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xfce)
#:use-module (gnu packages avahi)
#:use-module (gnu packages xdisorg)
@@ -73,6 +80,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
+ #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -81,6 +89,7 @@ (define-module (gnu services desktop)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -137,8 +146,16 @@ (define-module (gnu services desktop)
cups-pk-helper-service-type
sane-service-type
+ %gnome-core-services
+ %gnome-core-shell
+ %gnome-core-utilities
+ %gnome-essential-extras
gnome-desktop-configuration
gnome-desktop-configuration?
+ gnome-desktop-configuration-core-services
+ gnome-desktop-configuration-shell
+ gnome-desktop-configuration-utilities
+ gnome-desktop-configuration-extra-packages
gnome-desktop-service
gnome-desktop-service-type
@@ -1382,11 +1399,100 @@ (define sane-service-type
;;; GNOME desktop service.
;;;
-(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
- make-gnome-desktop-configuration
- gnome-desktop-configuration?
- (gnome gnome-desktop-configuration-gnome
- (default gnome)))
+(define %gnome-core-services
+ (list accountsservice network-manager packagekit upower))
+
+(define %gnome-core-shell
+ (list gdm
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-desktop
+ gnome-initial-setup
+ gnome-keyring
+ gnome-menus
+ gnome-session
+ gnome-settings-daemon
+ gnome-shell-extensions
+ gnome-shell
+ gnome-user-docs
+ gnome-user-share
+ gvfs
+ mutter
+ orca
+ rygel
+ sushi
+ adwaita-icon-theme
+ glib-networking
+ gsettings-desktop-schemas))
+
+(define %gnome-core-utilities
+ (list baobab
+ cheese
+ eog
+ epiphany
+ evince
+ file-roller
+ gnome-calculator
+ gnome-calendar
+ gnome-characters
+ gnome-clocks
+ gnome-console
+ gnome-contacts
+ gnome-disk-utility
+ gnome-font-viewer
+ gnome-maps
+ gnome-music
+ gnome-photos
+ gnome-screenshot
+ gnome-system-monitor
+ gnome-text-editor
+ gnome-weather
+ nautilus
+ simple-scan
+ totem
+ tracker-miners
+ xdg-desktop-portal-gnome
+ yelp))
+
+(define %gnome-essential-extras
+ (list at-spi2-core
+ dbus
+ dconf
+ desktop-file-utils
+ font-abattis-cantarell
+ font-dejavu
+ gnome-default-applications ; XXX: Allow customization by records
+ gst-plugins-base
+ gst-plugins-good
+ gucharmap
+ pinentry-gnome3
+ pulseaudio ; XXX: Replace with pipewire
+ shared-mime-info
+ system-config-printer
+ xdg-user-dirs
+ zenity))
+
+(define-maybe/no-serialization package)
+
+(define-configuration/no-serialization gnome-desktop-configuration
+ (core-services
+ (list-of-packages %gnome-core-services)
+ "A list of packages that the GNOME Shell and applications may rely on.")
+ (shell
+ (list-of-packages %gnome-core-shell)
+ "A list of packages that constitute the GNOME Shell, without applications.")
+ (utilities
+ (list-of-packages %gnome-core-utilities)
+ "A list of packages that serve as applications to use on top of the \
+GNOME Shell.")
+ (gnome (maybe-package) "Deprecated. Do not use.")
+ (extra-packages
+ (list-of-packages %gnome-essential-extras)
+ "A list of GNOME-adjacent packages to also include. This field is intended
+for users to add their own packages to their GNOME experience. Note, that it
+already includes some packages that are considered essential by some (most?)
+GNOME users."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1400,18 +1506,56 @@ (define (gnome-packages gnome names)
(define (gnome-udev-rules config)
"Return the list of GNOME dependencies that provide udev rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome '("gnome-settings-daemon"))))
+ (let* ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda
+ ((and pkg (= package-name "gnome-settings-daemon"))
+ (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome '("gnome-settings-daemon")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gnome-settings-daemon"))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gvfs"))))))))
+
+(define (gnome-profile config)
+ "Return a list of packages propagated through CONFIG."
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config)))
(define gnome-desktop-service-type
(service-type
@@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list gnome-desktop-configuration-gnome))))
+ gnome-profile)))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 17:06 +0100
[PATCH gnome-team v2 2/5] services: gnome-desktop: Add core packages for GNOME 44.
(address . 68716@debbugs.gnu.org)
e4cf13b28a4bd4699d1106ca93102e787e70b45b.1707163201.git.vivien@planete-kraus.eu
* gnu/services/desktop.scm (%gnome-core-shell): Add gnome-remote-desktop.
(%gnome-core-utilities): Add gnome-connections.
---
gnu/services/desktop.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 86be99252d..f929a6cf31 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1411,6 +1411,7 @@ (define %gnome-core-shell
gnome-initial-setup
gnome-keyring
gnome-menus
+ gnome-remote-desktop
gnome-session
gnome-settings-daemon
gnome-shell-extensions
@@ -1437,6 +1438,7 @@ (define %gnome-core-utilities
gnome-calendar
gnome-characters
gnome-clocks
+ gnome-connections
gnome-console
gnome-contacts
gnome-disk-utility
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:55 +0100
[PATCH gnome-team v2 3/5] gnu: Deprecate gnome meta-package.
(address . 68716@debbugs.gnu.org)
04093d75b073b6d6fad760ea521d0512b9b66d00.1707163201.git.vivien@planete-kraus.eu
GNOME is not a "one size fits all" environment, but with the introduction of
World, Circle, and to some extent Developer Extras and recent explorations of
mobile form factors much more customizable towards the needs of users. As
such, it is silly to insist on a single meta-package to make everyone happy.

* gnu/packages/gnome.scm (gnome): Deprecate.
---
gnu/packages/gnome.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index e98f4ac15f..e066da4d77 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -236,6 +236,7 @@ (define-module (gnu packages gnome)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -10143,7 +10144,7 @@ (define-public gnome-weather
(home-page "https://wiki.gnome.org/Apps/Weather")
(license license:gpl2+)))
-(define-public gnome
+(define-deprecated/public gnome #f
(package
(name "gnome")
(version (package-version gnome-shell))
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 18:05 +0100
[PATCH gnome-team v2 4/5] services: Rename gnome-udev-rules.
(address . 68716@debbugs.gnu.org)
7d56e8c01341114bf15d347dd59f30278ac2130b.1707163201.git.vivien@planete-kraus.eu
This function manages both rules and hardware files.

* gnu/services/desktop.scm (gnome-udev-resources): Rename to
gnome-udev-configuration-files.
(gnome-desktop-service-type): Use the new function name gnome-udev-configuration-files.

Change-Id: I195ea6ba032e1e9b5ee45519de109bbd969b6503
---
gnu/services/desktop.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index f929a6cf31..263ae61698 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1506,8 +1506,9 @@ (define (gnome-packages gnome names)
"Return the package NAMES among the GNOME package inputs."
(map (cut gnome-package gnome <>) names))
-(define (gnome-udev-rules config)
- "Return the list of GNOME dependencies that provide udev rules."
+(define (gnome-udev-configuration-files config)
+ "Return the list of GNOME dependencies that provide udev rules and hardware
+files."
(let* ((gnome (gnome-desktop-configuration-gnome config))
(shell (gnome-desktop-configuration-shell config)))
(or (any (match-lambda
@@ -1564,7 +1565,7 @@ (define gnome-desktop-service-type
(name 'gnome-desktop)
(extensions
(list (service-extension udev-service-type
- gnome-udev-rules)
+ gnome-udev-configuration-files)
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 19:30 +0100
[PATCH gnome-team v2 5/5] services: gnome: Use a blocklist for udev configurations.
(address . 68716@debbugs.gnu.org)
fd12cd63dda9dfb81881bd33466bd4df629212f4.1707163201.git.vivien@planete-kraus.eu
The gnome-udev-configuration-files now lists every udev rule and hardware
file, and remove files based on a user-supplied list of regular expressions.

* gnu/services/desktop.scm (gnome-desktop-configuration): Add the
udev-blocklist field.
(gnome-udev-configuration-files): Change behavior.

Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
---
gnu/services/desktop.scm | 63 ++++++++++++++++++++++++++++++----------
1 file changed, 48 insertions(+), 15 deletions(-)

Toggle diff (97 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 263ae61698..8045406c10 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -87,6 +87,7 @@ (define-module (gnu services desktop)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix gexp)
+ #:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
@@ -156,6 +157,7 @@ (define-module (gnu services desktop)
gnome-desktop-configuration-shell
gnome-desktop-configuration-utilities
gnome-desktop-configuration-extra-packages
+ gnome-desktop-configuration-udev-blocklist
gnome-desktop-service
gnome-desktop-service-type
@@ -1494,7 +1496,12 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of GNOME-adjacent packages to also include. This field is intended
for users to add their own packages to their GNOME experience. Note, that it
already includes some packages that are considered essential by some (most?)
-GNOME users."))
+GNOME users.")
+ (udev-blocklist
+ (list-of-strings '())
+ "A list of regular expressions denoting udev rules or hardware file names
+provided by any package, that should not be installed. By default, every udev
+rule and hardware file specified by all packages are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1509,20 +1516,46 @@ (define (gnome-packages gnome names)
(define (gnome-udev-configuration-files config)
"Return the list of GNOME dependencies that provide udev rules and hardware
files."
- (let* ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda
- ((and pkg (= package-name "gnome-settings-daemon"))
- (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome '("gnome-settings-daemon")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gnome-settings-daemon"))))))))
+ (let* ((all-packages
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config))))
+ (list
+ (computed-file
+ "gnome-udev-configurations"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)))
+ #~(begin
+ (use-modules (guix build utils))
+ (for-each
+ (lambda (package)
+ (with-directory-excursion
+ package
+ (for-each
+ (lambda (filename)
+ (mkdir-p (dirname (string-append #$output "/" filename)))
+ (copy-file filename (string-append #$output "/" filename)))
+ (find-files "."
+ (lambda (name st)
+ (or (string-prefix? "./lib/udev/" name)
+ (string-prefix? "./libexec/udev/" name)))))))
+ (list #$@all-packages))
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files #$output pattern)))
+ (list #$@(gnome-desktop-configuration-udev-blocklist config)))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
--
2.41.0
L
L
Liliana Marie Prikler wrote on 5 Feb 21:52 +0100
2671e8ad3f84f79252e8b8ccfc5ebf7b13966ef2.camel@gmail.com
Am Montag, dem 05.02.2024 um 19:30 +0100 schrieb Vivien Kraus:
Toggle quote (94 lines)
> The gnome-udev-configuration-files now lists every udev rule and
> hardware
> file, and remove files based on a user-supplied list of regular
> expressions.
>
> * gnu/services/desktop.scm (gnome-desktop-configuration): Add the
> udev-blocklist field.
> (gnome-udev-configuration-files): Change behavior.
>
> Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
> ---
>  gnu/services/desktop.scm | 63 ++++++++++++++++++++++++++++++--------
> --
>  1 file changed, 48 insertions(+), 15 deletions(-)
>
> diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
> index 263ae61698..8045406c10 100644
> --- a/gnu/services/desktop.scm
> +++ b/gnu/services/desktop.scm
> @@ -87,6 +87,7 @@ (define-module (gnu services desktop)
>    #:use-module (guix ui)
>    #:use-module (guix utils)
>    #:use-module (guix gexp)
> +  #:use-module (guix modules)
>    #:use-module (srfi srfi-1)
>    #:use-module (srfi srfi-26)
>    #:use-module (srfi srfi-35)
> @@ -156,6 +157,7 @@ (define-module (gnu services desktop)
>              gnome-desktop-configuration-shell
>              gnome-desktop-configuration-utilities
>              gnome-desktop-configuration-extra-packages
> +            gnome-desktop-configuration-udev-blocklist
>              gnome-desktop-service
>              gnome-desktop-service-type
>  
> @@ -1494,7 +1496,12 @@ (define-configuration/no-serialization gnome-
> desktop-configuration
>     "A list of GNOME-adjacent packages to also include.  This field
> is intended
>  for users to add their own packages to their GNOME experience. 
> Note, that it
>  already includes some packages that are considered essential by some
> (most?)
> -GNOME users."))
> +GNOME users.")
> +  (udev-blocklist
> +   (list-of-strings '())
> +   "A list of regular expressions denoting udev rules or hardware
> file names
> +provided by any package, that should not be installed.  By default,
> every udev
> +rule and hardware file specified by all packages are installed."))
>  
>  (define (gnome-package gnome name)
>    "Return the package NAME among the GNOME package inputs.  NAME can
> be a
> @@ -1509,20 +1516,46 @@ (define (gnome-packages gnome names)
>  (define (gnome-udev-configuration-files config)
>    "Return the list of GNOME dependencies that provide udev rules and
> hardware
>  files."
> -  (let* ((gnome (gnome-desktop-configuration-gnome config))
> -         (shell (gnome-desktop-configuration-shell config)))
> -    (or (any (match-lambda
> -               ((and pkg (= package-name "gnome-settings-daemon"))
> -                (list pkg))
> -               (_ #f))
> -             shell)
> -        (and (maybe-value-set? gnome)
> -             (gnome-packages gnome '("gnome-settings-daemon")))
> -        (raise
> -         (condition
> -          (&error-location
> -           (location (gnome-desktop-configuration-source-location
> config)))
> -          (&message (message (G_ "Missing gnome-settings-
> daemon"))))))))
> +  (let* ((all-packages
> +          (append
> +           (gnome-desktop-configuration-core-services config)
> +           (gnome-desktop-configuration-shell config)
> +           (gnome-desktop-configuration-utilities config)
> +           (let ((gnome-meta (gnome-desktop-configuration-gnome
> config)))
> +             (if (maybe-value-set? gnome-meta)
> +                 (begin
> +                   (warning
> +                    (gnome-desktop-configuration-source-location
> config)
> +                    (G_ "Using a meta-package for gnome-desktop is
> discouraged.~%"))
> +                   (list gnome-meta))
> +                 (list)))
> +           (gnome-desktop-configuration-extra-packages config))))
You could reuse the function that we have to implement for the profile
service anyway, no?
Toggle quote (23 lines)
> +    (list
> +     (computed-file
> +      "gnome-udev-configurations"
> +      (with-imported-modules
> +          (source-module-closure '((guix build utils)))
> +        #~(begin
> +            (use-modules (guix build utils))
> +            (for-each
> +             (lambda (package)
> +               (with-directory-excursion
> +                   package
> +                 (for-each
> +                  (lambda (filename)
> +                    (mkdir-p (dirname (string-append #$output "/"
> filename)))
> +                    (copy-file filename (string-append #$output "/"
> filename)))
> +                  (find-files "."
> +                              (lambda (name st)
> +                                (or (string-prefix? "./lib/udev/"
> name)
> +                                    (string-prefix?
> "./libexec/udev/" name)))))))
IIRC, string-prefix matching is not a great idea with find-files.
search-path-as-list from (guix build utils) is probably preferable.
Toggle quote (12 lines)
> +             (list #$@all-packages))
> +            (for-each
> +             (lambda (pattern)
> +               (for-each
> +                delete-file-recursively
> +                (find-files #$output pattern)))
> +             (list #$@(gnome-desktop-configuration-udev-blocklist
> config)))))))))
>  
>  (define (gnome-polkit-settings config)
>    "Return the list of GNOME dependencies that provide polkit actions
> and
Cheers
L
L
Liliana Marie Prikler wrote on 25 Jan 16:55 +0100
[PATCH gnome-team v3 3/5] gnu: Deprecate gnome meta-package.
(address . 68716@debbugs.gnu.org)
cc733d15b6f3e9a49f0ec4b169eaf81c0da98023.1707175669.git.vivien@planete-kraus.eu
GNOME is not a "one size fits all" environment, but with the introduction of
World, Circle, and to some extent Developer Extras and recent explorations of
mobile form factors much more customizable towards the needs of users. As
such, it is silly to insist on a single meta-package to make everyone happy.

* gnu/packages/gnome.scm (gnome): Deprecate.
---
gnu/packages/gnome.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index e98f4ac15f..e066da4d77 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -236,6 +236,7 @@ (define-module (gnu packages gnome)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -10143,7 +10144,7 @@ (define-public gnome-weather
(home-page "https://wiki.gnome.org/Apps/Weather")
(license license:gpl2+)))
-(define-public gnome
+(define-deprecated/public gnome #f
(package
(name "gnome")
(version (package-version gnome-shell))
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 19:30 +0100
[PATCH gnome-team v3 5/5] services: gnome: Use a blocklist for udev configurations.
(address . 68716@debbugs.gnu.org)
2887b3fe20091da84408d10cc25f17b160d184ab.1707175669.git.vivien@planete-kraus.eu
The gnome-udev-configuration-files now lists every udev rule and hardware
file, and remove files based on a user-supplied list of regular expressions.

* gnu/services/desktop.scm (gnome-desktop-configuration): Add the
udev-blocklist field.
(gnome-udev-configuration-files): Change behavior.

Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
---
gnu/services/desktop.scm | 46 +++++++++++++++++++++++++++-------------
1 file changed, 31 insertions(+), 15 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 263ae61698..f04e99ba9a 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -87,6 +87,7 @@ (define-module (gnu services desktop)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix gexp)
+ #:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
@@ -156,6 +157,7 @@ (define-module (gnu services desktop)
gnome-desktop-configuration-shell
gnome-desktop-configuration-utilities
gnome-desktop-configuration-extra-packages
+ gnome-desktop-configuration-udev-blocklist
gnome-desktop-service
gnome-desktop-service-type
@@ -1494,7 +1496,12 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of GNOME-adjacent packages to also include. This field is intended
for users to add their own packages to their GNOME experience. Note, that it
already includes some packages that are considered essential by some (most?)
-GNOME users."))
+GNOME users.")
+ (udev-blocklist
+ (list-of-strings '())
+ "A list of regular expressions denoting udev rules or hardware file names
+provided by any package, that should not be installed. By default, every udev
+rule and hardware file specified by all packages are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1509,20 +1516,29 @@ (define (gnome-packages gnome names)
(define (gnome-udev-configuration-files config)
"Return the list of GNOME dependencies that provide udev rules and hardware
files."
- (let* ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda
- ((and pkg (= package-name "gnome-settings-daemon"))
- (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome '("gnome-settings-daemon")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gnome-settings-daemon"))))))))
+ (list
+ (computed-file
+ "gnome-udev-configurations"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)
+ (guix build union)))
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build union))
+ ;; If rules.d or hwdb.d is not a proper directory but a symlink,
+ ;; then it will not be possible to delete individual files in this
+ ;; directory.
+ (union-build #$output
+ (search-path-as-list
+ (list "lib/udev" "libexec/udev")
+ (list #$@(gnome-profile config)))
+ #:create-all-directories? #t)
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files #$output pattern)))
+ (list #$@(gnome-desktop-configuration-udev-blocklist config))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
--
2.41.0
V
V
Vivien Kraus wrote on 6 Feb 00:27 +0100
[PATCH gnome-team v3 0/5] More elegant filtering of udev configurations
(address . 68716@debbugs.gnu.org)
cover.1707175669.git.vivien@planete-kraus.eu
Dear guix,

Here is a new version, where I use union-build to gather all udev files, and
then I remove the files that belong to the blocklist.

What do you think?

Best regards,

Vivien

Liliana Marie Prikler (3):
services: Modularise gnome-desktop-configuration.
services: gnome-desktop: Add core packages for GNOME 44.
gnu: Deprecate gnome meta-package.

Vivien Kraus (2):
services: Rename gnome-udev-rules.
services: gnome: Use a blocklist for udev configurations.

gnu/packages/gnome.scm | 3 +-
gnu/services/desktop.scm | 197 +++++++++++++++++++++++++++++++++++----
2 files changed, 182 insertions(+), 18 deletions(-)


base-commit: 6d3c414f11e5ec9eb029fbfd20fb08731c2b9aab
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:35 +0100
[PATCH gnome-team v3 1/5] services: Modularise gnome-desktop-configuration.
(address . 68716@debbugs.gnu.org)
5a32e4ce61dd8d0aa204e1da57753acfbea378b3.1707175669.git.vivien@planete-kraus.eu
* gnu/services/gnome.scm (%gnome-core-services, %gnome-core-shell)
(%gnome-core-utilities, %gnome-essential-extras): New variables.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’. Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
---
gnu/services/desktop.scm | 172 +++++++++++++++++++++++++++++++++++----
1 file changed, 158 insertions(+), 14 deletions(-)

Toggle diff (244 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 5b79fbcda1..86be99252d 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -37,6 +37,7 @@ (define-module (gnu services desktop)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services base)
+ #:use-module (gnu services configuration)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
@@ -56,10 +57,16 @@ (define-module (gnu services desktop)
#:use-module (gnu packages admin)
#:use-module (gnu packages cups)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages geo)
+ #:use-module (gnu packages gstreamer)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xfce)
#:use-module (gnu packages avahi)
#:use-module (gnu packages xdisorg)
@@ -73,6 +80,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
+ #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -81,6 +89,7 @@ (define-module (gnu services desktop)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -137,8 +146,16 @@ (define-module (gnu services desktop)
cups-pk-helper-service-type
sane-service-type
+ %gnome-core-services
+ %gnome-core-shell
+ %gnome-core-utilities
+ %gnome-essential-extras
gnome-desktop-configuration
gnome-desktop-configuration?
+ gnome-desktop-configuration-core-services
+ gnome-desktop-configuration-shell
+ gnome-desktop-configuration-utilities
+ gnome-desktop-configuration-extra-packages
gnome-desktop-service
gnome-desktop-service-type
@@ -1382,11 +1399,100 @@ (define sane-service-type
;;; GNOME desktop service.
;;;
-(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
- make-gnome-desktop-configuration
- gnome-desktop-configuration?
- (gnome gnome-desktop-configuration-gnome
- (default gnome)))
+(define %gnome-core-services
+ (list accountsservice network-manager packagekit upower))
+
+(define %gnome-core-shell
+ (list gdm
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-desktop
+ gnome-initial-setup
+ gnome-keyring
+ gnome-menus
+ gnome-session
+ gnome-settings-daemon
+ gnome-shell-extensions
+ gnome-shell
+ gnome-user-docs
+ gnome-user-share
+ gvfs
+ mutter
+ orca
+ rygel
+ sushi
+ adwaita-icon-theme
+ glib-networking
+ gsettings-desktop-schemas))
+
+(define %gnome-core-utilities
+ (list baobab
+ cheese
+ eog
+ epiphany
+ evince
+ file-roller
+ gnome-calculator
+ gnome-calendar
+ gnome-characters
+ gnome-clocks
+ gnome-console
+ gnome-contacts
+ gnome-disk-utility
+ gnome-font-viewer
+ gnome-maps
+ gnome-music
+ gnome-photos
+ gnome-screenshot
+ gnome-system-monitor
+ gnome-text-editor
+ gnome-weather
+ nautilus
+ simple-scan
+ totem
+ tracker-miners
+ xdg-desktop-portal-gnome
+ yelp))
+
+(define %gnome-essential-extras
+ (list at-spi2-core
+ dbus
+ dconf
+ desktop-file-utils
+ font-abattis-cantarell
+ font-dejavu
+ gnome-default-applications ; XXX: Allow customization by records
+ gst-plugins-base
+ gst-plugins-good
+ gucharmap
+ pinentry-gnome3
+ pulseaudio ; XXX: Replace with pipewire
+ shared-mime-info
+ system-config-printer
+ xdg-user-dirs
+ zenity))
+
+(define-maybe/no-serialization package)
+
+(define-configuration/no-serialization gnome-desktop-configuration
+ (core-services
+ (list-of-packages %gnome-core-services)
+ "A list of packages that the GNOME Shell and applications may rely on.")
+ (shell
+ (list-of-packages %gnome-core-shell)
+ "A list of packages that constitute the GNOME Shell, without applications.")
+ (utilities
+ (list-of-packages %gnome-core-utilities)
+ "A list of packages that serve as applications to use on top of the \
+GNOME Shell.")
+ (gnome (maybe-package) "Deprecated. Do not use.")
+ (extra-packages
+ (list-of-packages %gnome-essential-extras)
+ "A list of GNOME-adjacent packages to also include. This field is intended
+for users to add their own packages to their GNOME experience. Note, that it
+already includes some packages that are considered essential by some (most?)
+GNOME users."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1400,18 +1506,56 @@ (define (gnome-packages gnome names)
(define (gnome-udev-rules config)
"Return the list of GNOME dependencies that provide udev rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome '("gnome-settings-daemon"))))
+ (let* ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda
+ ((and pkg (= package-name "gnome-settings-daemon"))
+ (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome '("gnome-settings-daemon")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gnome-settings-daemon"))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gvfs"))))))))
+
+(define (gnome-profile config)
+ "Return a list of packages propagated through CONFIG."
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config)))
(define gnome-desktop-service-type
(service-type
@@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list gnome-desktop-configuration-gnome))))
+ gnome-profile)))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 18:05 +0100
[PATCH gnome-team v3 4/5] services: Rename gnome-udev-rules.
(address . 68716@debbugs.gnu.org)
8de89efd7bc23466a840be8c099ce875014b2ca3.1707175669.git.vivien@planete-kraus.eu
This function manages both rules and hardware files.

* gnu/services/desktop.scm (gnome-udev-resources): Rename to
gnome-udev-configuration-files.
(gnome-desktop-service-type): Use the new function name gnome-udev-configuration-files.

Change-Id: I195ea6ba032e1e9b5ee45519de109bbd969b6503
---
gnu/services/desktop.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index f929a6cf31..263ae61698 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1506,8 +1506,9 @@ (define (gnome-packages gnome names)
"Return the package NAMES among the GNOME package inputs."
(map (cut gnome-package gnome <>) names))
-(define (gnome-udev-rules config)
- "Return the list of GNOME dependencies that provide udev rules."
+(define (gnome-udev-configuration-files config)
+ "Return the list of GNOME dependencies that provide udev rules and hardware
+files."
(let* ((gnome (gnome-desktop-configuration-gnome config))
(shell (gnome-desktop-configuration-shell config)))
(or (any (match-lambda
@@ -1564,7 +1565,7 @@ (define gnome-desktop-service-type
(name 'gnome-desktop)
(extensions
(list (service-extension udev-service-type
- gnome-udev-rules)
+ gnome-udev-configuration-files)
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 17:06 +0100
[PATCH gnome-team v3 2/5] services: gnome-desktop: Add core packages for GNOME 44.
(address . 68716@debbugs.gnu.org)
c242ca2c0fb91df2f104723626af9206069ca9c0.1707175669.git.vivien@planete-kraus.eu
* gnu/services/desktop.scm (%gnome-core-shell): Add gnome-remote-desktop.
(%gnome-core-utilities): Add gnome-connections.
---
gnu/services/desktop.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 86be99252d..f929a6cf31 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1411,6 +1411,7 @@ (define %gnome-core-shell
gnome-initial-setup
gnome-keyring
gnome-menus
+ gnome-remote-desktop
gnome-session
gnome-settings-daemon
gnome-shell-extensions
@@ -1437,6 +1438,7 @@ (define %gnome-core-utilities
gnome-calendar
gnome-characters
gnome-clocks
+ gnome-connections
gnome-console
gnome-contacts
gnome-disk-utility
--
2.41.0
L
L
Liliana Marie Prikler wrote on 6 Feb 06:13 +0100
Re: [PATCH gnome-team v3 0/5] More elegant filtering of udev configurations
e76809021cf3ed1610a517917cd24c91a5e5d4e2.camel@gmail.com
Am Dienstag, dem 06.02.2024 um 00:27 +0100 schrieb Vivien Kraus:
Toggle quote (6 lines)
> Dear guix,
>
> Here is a new version, where I use union-build to gather all udev
> files, and then I remove the files that belong to the blocklist.
>
> What do you think?
LGTM, but I need to retouch my own 1-3. Will send a v4 with everything
once that's done.

Cheers
V
V
Vivien Kraus wrote on 7 Feb 22:38 +0100
74ed95468711757bebf1fcdc18ee7ebbe1b1767a.camel@planete-kraus.eu
Hello,

Le mardi 06 février 2024 à 06:13 +0100, Liliana Marie Prikler a écrit :
Toggle quote (3 lines)
> I need to retouch my own 1-3.  Will send a v4 with everything
> once that's done.

I noticed that gnome-control-center, gnome-online-accounts, gnome-
themes-extra and hicolor-icon-theme got lost in the process. Both
gnome-control-center and gnome-online-accounts seem vital to me, and
the others may be of interest too.

Best regards,

Vivien
L
L
Liliana Marie Prikler wrote on 16 Feb 12:02 +0100
[PATCH gnome-team v4 2/7] gnu: gnome: Add core packages for GNOME 44.
(address . 68716@debbugs.gnu.org)
eb2bdefff2155b2a4f7bc4eda86e330becef98cd.1708087345.git.liliana.prikler@gmail.com
* gnu/packages/gnome.scm (gnome-meta-core-shell): Add gnome-remote-desktop.
(gnome-meta-core-utilities): Add gnome-connections.
---
gnu/packages/gnome.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4fde75f612..f3d1548fe9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10200,6 +10200,7 @@ (define-public gnome-meta-core-shell
gnome-initial-setup
gnome-keyring
gnome-menus
+ gnome-remote-desktop
gnome-session
gnome-settings-daemon
gnome-shell
@@ -10232,6 +10233,7 @@ (define-public gnome-meta-core-utilities
gnome-calendar
gnome-characters
gnome-clocks
+ gnome-connections
gnome-console
gnome-contacts
gnome-disk-utility
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 18:05 +0100
[PATCH gnome-team v4 4/7] services: Extend udev capabilities of gnome-desktop-service.
(address . 68716@debbugs.gnu.org)
c56a7999d0f561078849370c25f59b1274022261.1708087345.git.liliana.prikler@gmail.com
Our udev service is capable of handling both rules and hardware databases.
This patch makes it so that gnome can install any such needed rules or
databases, while also allowing users to supply a list of names to ignore
(via regular expressions).

* gnu/services/desktop.scm (gnome-desktop-configuration): Add udev-ignorelist.
(gnome-udev-resources): Rename to…
(gnome-udev-configuration-files): … this. Account for udev-ignorelist.
(gnome-desktop-service-type): Adjust accordingly.

Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
---
gnu/services/desktop.scm | 54 ++++++++++++++++++++++++++--------------
1 file changed, 36 insertions(+), 18 deletions(-)

Toggle diff (95 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 0667acfaba..0631571c49 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -82,6 +82,7 @@ (define-module (gnu services desktop)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix gexp)
+ #:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
@@ -147,6 +148,7 @@ (define-module (gnu services desktop)
gnome-desktop-configuration-shell
gnome-desktop-configuration-utilities
gnome-desktop-configuration-extra-packages
+ gnome-desktop-configuration-udev-ignorelist
gnome-desktop-service
gnome-desktop-service-type
@@ -1417,7 +1419,13 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of GNOME-adjacent packages to also include. This field is intended
for users to add their own packages to their GNOME experience. Note, that it
already includes some packages that are considered essential by some (most?)
-GNOME users."))
+GNOME users.")
+ (udev-ignorelist
+ (list-of-strings '())
+ "A list of regular expressions denoting udev rules or hardware file names
+provided by any package that should not be installed. By default, every udev
+rule and hardware file specified by any package referenced in the other fields
+are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1429,22 +1437,32 @@ (define (gnome-packages gnome names)
"Return the package NAMES among the GNOME package inputs."
(map (cut gnome-package gnome <>) names))
-(define (gnome-udev-rules config)
- "Return the list of GNOME dependencies that provide udev rules."
- (let* ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda
- ((and pkg (= package-name "gnome-settings-daemon"))
- (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome '("gnome-settings-daemon")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gnome-settings-daemon"))))))))
+(define (gnome-udev-configuration-files config)
+ "Return the GNOME udev rules and hardware files as computed from its
+dependencies by filtering out the ignorelist."
+ (list
+ (computed-file
+ "gnome-udev-configurations"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)
+ (guix build union)))
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build union))
+ ;; If rules.d or hwdb.d is not a proper directory but a symlink,
+ ;; then it will not be possible to delete individual files in this
+ ;; directory.
+ (union-build #$output
+ (search-path-as-list
+ (list "lib/udev" "libexec/udev")
+ (list #$@(gnome-profile config)))
+ #:create-all-directories? #t)
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files #$output pattern)))
+ (list #$@(gnome-desktop-configuration-udev-ignorelist config))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
@@ -1487,7 +1505,7 @@ (define gnome-desktop-service-type
(name 'gnome-desktop)
(extensions
(list (service-extension udev-service-type
- gnome-udev-rules)
+ gnome-udev-configuration-files)
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:35 +0100
[PATCH gnome-team v4 3/7] services: Modularise gnome-desktop-configuration.
(address . 68716@debbugs.gnu.org)
5a3f4ee73a4798d3e5ebc3c5bdc2980cf8fb16c8.1708087345.git.liliana.prikler@gmail.com
* gnu/services/gnome.scm (extract-propagated-inputs): New variable.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’. Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
---
gnu/services/desktop.scm | 97 ++++++++++++++++++++++++++++++++++------
1 file changed, 83 insertions(+), 14 deletions(-)

Toggle diff (163 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 5b79fbcda1..0667acfaba 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -37,6 +37,7 @@ (define-module (gnu services desktop)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services base)
+ #:use-module (gnu services configuration)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
@@ -60,6 +61,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xfce)
#:use-module (gnu packages avahi)
#:use-module (gnu packages xdisorg)
@@ -73,6 +75,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
+ #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -81,6 +84,7 @@ (define-module (gnu services desktop)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -139,6 +143,10 @@ (define-module (gnu services desktop)
gnome-desktop-configuration
gnome-desktop-configuration?
+ gnome-desktop-configuration-core-services
+ gnome-desktop-configuration-shell
+ gnome-desktop-configuration-utilities
+ gnome-desktop-configuration-extra-packages
gnome-desktop-service
gnome-desktop-service-type
@@ -1382,11 +1390,34 @@ (define sane-service-type
;;; GNOME desktop service.
;;;
-(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
- make-gnome-desktop-configuration
- gnome-desktop-configuration?
- (gnome gnome-desktop-configuration-gnome
- (default gnome)))
+(define-maybe/no-serialization package)
+
+(define (extract-propagated-inputs package)
+ ;; Drop input labels. Attempt to support outputs.
+ (map
+ (match-lambda
+ ((_ (? package? pkg)) pkg)
+ ((_ (? package? pkg) output) (list pkg output)))
+ (package-propagated-inputs package)))
+
+(define-configuration/no-serialization gnome-desktop-configuration
+ (core-services
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-services))
+ "A list of packages that the GNOME Shell and applications may rely on.")
+ (shell
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-shell))
+ "A list of packages that constitute the GNOME Shell, without applications.")
+ (utilities
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-utilities))
+ "A list of packages that serve as applications to use on top of the \
+GNOME Shell.")
+ (gnome (maybe-package) "Deprecated. Do not use.")
+ (extra-packages
+ (list-of-packages (extract-propagated-inputs gnome-essential-extras))
+ "A list of GNOME-adjacent packages to also include. This field is intended
+for users to add their own packages to their GNOME experience. Note, that it
+already includes some packages that are considered essential by some (most?)
+GNOME users."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1400,18 +1431,56 @@ (define (gnome-packages gnome names)
(define (gnome-udev-rules config)
"Return the list of GNOME dependencies that provide udev rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome '("gnome-settings-daemon"))))
+ (let* ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda
+ ((and pkg (= package-name "gnome-settings-daemon"))
+ (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome '("gnome-settings-daemon")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gnome-settings-daemon"))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gvfs"))))))))
+
+(define (gnome-profile config)
+ "Return a list of packages propagated through CONFIG."
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config)))
(define gnome-desktop-service-type
(service-type
@@ -1422,7 +1491,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list gnome-desktop-configuration-gnome))))
+ gnome-profile)))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 11:53 +0100
[PATCH gnome-team v4 1/7] gnu: Split gnome into more meta-packages.
(address . 68716@debbugs.gnu.org)
5e0b95c296a3abfe2da6c1828dfbbc1a47886083.1708087345.git.liliana.prikler@gmail.com
* gnu/packages/gnome.scm (gnome-meta-package): New syntax rule.
(gnome-meta-core-services, gnome-meta-core-shell, gnome-meta-core-utilities)
(gnome-essential-extras): New variables.
(gnome): Implement in terms of the former.
---
gnu/packages/gnome.scm | 179 ++++++++++++++++++++++++-----------------
1 file changed, 105 insertions(+), 74 deletions(-)

Toggle diff (205 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 7397148c2b..4fde75f612 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10154,52 +10154,76 @@ (define-public gnome-weather
(home-page "https://wiki.gnome.org/Apps/Weather")
(license license:gpl2+)))
-(define-public gnome
+(define-syntax-rule (gnome-meta-package %name propagate)
(package
- (name "gnome")
+ (name %name)
(version (package-version gnome-shell))
(source #f)
(build-system trivial-build-system)
- (arguments '(#:builder (begin (mkdir %output) #t)))
- (propagated-inputs
- `(,@(if (string-prefix? "x86_64" (%current-system))
- ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
- ;; only works on x86_64, so exclude it on other architectures.
- (list eog)
- '())
- ,@(list
- ;; GNOME-Core-OS-Services.
- accountsservice
- network-manager
- packagekit
- upower
- ;; GNOME-Core-Shell.
- adwaita-icon-theme
- gdm
- glib-networking
- gnome-backgrounds
- gnome-bluetooth
- gnome-color-manager
- gnome-control-center
- gnome-desktop
- gnome-initial-setup
- gnome-keyring
- gnome-menus
- gnome-session
- gnome-settings-daemon
- gnome-shell
- gnome-shell-extensions
- gnome-themes-extra
- gnome-user-docs
- gnome-user-share
- gsettings-desktop-schemas
- gvfs
- mutter
- orca
- rygel
- sushi
- ;; GNOME-Core-Utilities.
- baobab
+ (arguments
+ (list #:builder
+ #~(begin
+ (format (current-warning-port)
+ "Building ~a is useless. \
+Refer to its propagated inputs instead.\n"
+ #$name)
+ (mkdir #$output))))
+ (propagated-inputs propagate)
+ (home-page "https://www.gnome.org")
+ (synopsis "The GNU desktop environment")
+ (description
+ "GNOME is the graphical desktop for GNU. It includes a wide variety of
+applications for browsing the web, editing text and images, creating
+documents and diagrams, playing media, scanning, and much more.")
+ (license license:gpl2+)
+ (properties `((hidden? . #t)))))
+
+(define-public gnome-meta-core-services
+ (gnome-meta-package
+ "gnome-meta-core-services"
+ (list accountsservice
+ network-manager
+ packagekit
+ upower)))
+
+(define-public gnome-meta-core-shell
+ (gnome-meta-package
+ "gnome-meta-core-shell"
+ (list adwaita-icon-theme
+ gdm
+ glib-networking
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-control-center
+ gnome-desktop
+ gnome-initial-setup
+ gnome-keyring
+ gnome-menus
+ gnome-session
+ gnome-settings-daemon
+ gnome-shell
+ gnome-shell-extensions
+ gnome-themes-extra
+ gnome-user-docs
+ gnome-user-share
+ gsettings-desktop-schemas
+ gvfs
+ mutter
+ orca
+ rygel
+ sushi)))
+
+(define-public gnome-meta-core-utilities
+ (gnome-meta-package
+ "gnome-meta-core-utilities"
+ (append
+ ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
+ ;; only works on x86_64, so exclude it on other architectures.
+ (if (string-prefix? "x86_64" (%current-system))
+ (list eog)
+ '())
+ (list baobab
cheese
epiphany
evince
@@ -10224,38 +10248,45 @@ (define-public gnome
totem
tracker-miners
xdg-desktop-portal-gnome
- yelp
- ;; Others.
- gnome-online-accounts
- hicolor-icon-theme
-
- ;; Packages not part of GNOME proper but that are needed for a good
- ;; experience. See <https://bugs.gnu.org/39646>.
- ;; XXX: Find out exactly which ones are needed and why.
- at-spi2-core
- dbus
- dconf
- desktop-file-utils
- font-abattis-cantarell
- font-dejavu
- gnome-default-applications
- gst-plugins-base
- gst-plugins-good
- gucharmap
- pinentry-gnome3
- pulseaudio
- shared-mime-info
- system-config-printer
- xdg-user-dirs
- yelp
- zenity)))
- (synopsis "The GNU desktop environment")
- (home-page "https://www.gnome.org/")
- (description
- "GNOME is the graphical desktop for GNU. It includes a wide variety of
-applications for browsing the web, editing text and images, creating
-documents and diagrams, playing media, scanning, and much more.")
- (license license:gpl2+)))
+ yelp))))
+
+(define-public gnome-essential-extras
+ (package
+ (inherit
+ (gnome-meta-package
+ "gnome-essential-extras"
+ (list at-spi2-core
+ dbus
+ dconf
+ desktop-file-utils
+ font-abattis-cantarell
+ font-dejavu
+ gnome-default-applications
+ gnome-online-accounts
+ gst-plugins-base
+ gst-plugins-good
+ gucharmap
+ hicolor-icon-theme
+ pinentry-gnome3
+ pulseaudio
+ shared-mime-info
+ system-config-printer
+ xdg-user-dirs
+ yelp
+ zenity)))
+ (description "This package provides a list of packages required for
+a good GNOME experience, mixed from core dependencies and other implicitly
+relied-on packages.")))
+
+(define-public gnome
+ (package
+ (inherit (gnome-meta-package "gnome"
+ (append-map package-propagated-inputs
+ (list gnome-meta-core-services
+ gnome-meta-core-shell
+ gnome-meta-core-utilities
+ gnome-essential-extras))))
+ (properties (list))))
(define-public byzanz
;; The last stable release of Byzanz was in 2011, but there have been many

base-commit: 622df12ef389c9e91f68ae10c54c043f34828c83
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 13:35 +0100
[PATCH gnome-team v4 6/7] services: desktop: Remove unused imports.
(address . 68716@debbugs.gnu.org)
bf9a1b8ae5305645c87e870ba4fd24c477a28773.1708087345.git.liliana.prikler@gmail.com
These imports were needed for a short time to consider two variants of finding
udev/polkit configuration files. They are no longer needed, since the
respective procedures use all packages now.

* gnu/services/desktop.scm: Strip use of (guix diagnostics) and (srfi srfi-35).
---
gnu/services/desktop.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index b3c0f4fc41..02a7802d58 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -75,7 +75,6 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
- #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -85,7 +84,6 @@ (define-module (gnu services desktop)
#:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 13:08 +0100
[PATCH gnome-team v4 5/7] services: Extend polkit capabilities of gnome-desktop-service.
(address . 68716@debbugs.gnu.org)
00013ffb07bdd7231f561e8c6c5d220d33b3e32f.1708087345.git.liliana.prikler@gmail.com
As with our udev extension, this makes it so that all inputs are considered
modulo a new ignorelist.

* gnu/services/desktop.scm (gnome-desktop-configuration): Add
polkit-ignorelist.
(gnome-polkit-settings): Adjust accordingly.
---
gnu/services/desktop.scm | 44 ++++++++++++++++++++++++----------------
1 file changed, 27 insertions(+), 17 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 0631571c49..b3c0f4fc41 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1425,7 +1425,12 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of regular expressions denoting udev rules or hardware file names
provided by any package that should not be installed. By default, every udev
rule and hardware file specified by any package referenced in the other fields
-are installed."))
+are installed.")
+ (polkit-ignorelist
+ (list-of-strings '())
+ "A list of regular expressions denoting polkit rules provided by any package
+that should not be installed. By default, every polkit rule added by any package
+referenced in the other fields are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1467,22 +1472,27 @@ (define (gnome-udev-configuration-files config)
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gvfs"))))))))
+ (list
+ (computed-file
+ "gnome-polkit-settings"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)
+ (guix build union)))
+ #~(let ((output (string-append #$output "/share/polkit-1")))
+ (use-modules (guix build utils)
+ (guix build union))
+ (mkdir-p (dirname output))
+ (union-build output
+ (search-path-as-list
+ (list "share/polkit-1")
+ (list #$@(gnome-profile config)))
+ #:create-all-directories? #t)
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files output pattern)))
+ (list #$@(gnome-desktop-configuration-polkit-ignorelist config))))))))
(define (gnome-profile config)
"Return a list of packages propagated through CONFIG."
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:55 +0100
[PATCH gnome-team v4 7/7] gnu: Deprecate gnome meta-package.
(address . 68716@debbugs.gnu.org)
0ef52d621063bf7cd5487b287b4d4421ec3b786c.1708087345.git.liliana.prikler@gmail.com
GNOME is not a "one size fits all" environment, but with the introduction of
World, Circle, and to some extent Developer Extras and recent explorations of
mobile form factors much more customizable towards the needs of users. As
such, it is silly to insist on a single meta-package to make everyone happy.

* gnu/packages/gnome.scm (gnome): Deprecate.
---
gnu/packages/gnome.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f3d1548fe9..e47a4576f5 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -237,6 +237,7 @@ (define-module (gnu packages gnome)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -10280,7 +10281,7 @@ (define-public gnome-essential-extras
a good GNOME experience, mixed from core dependencies and other implicitly
relied-on packages.")))
-(define-public gnome
+(define-deprecated/public gnome #f
(package
(inherit (gnome-meta-package "gnome"
(append-map package-propagated-inputs
--
2.41.0
V
V
Vivien Kraus wrote on 16 Feb 18:44 +0100
7bf8118fbb5392b1ca0a885f282cd39525f97691.camel@planete-kraus.eu
Hello!

The whole series seems good to me. I reconfigured my system and
rebooted into it, and it works.

Best regards,

Vivien

Le jeudi 25 janvier 2024 à 16:55 +0100, Liliana Marie Prikler a écrit :
Toggle quote (37 lines)
> GNOME is not a "one size fits all" environment, but with the
> introduction of
> World, Circle, and to some extent Developer Extras and recent
> explorations of
> mobile form factors much more customizable towards the needs of
> users.  As
> such, it is silly to insist on a single meta-package to make everyone
> happy.
>
> * gnu/packages/gnome.scm (gnome): Deprecate.
> ---
>  gnu/packages/gnome.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index f3d1548fe9..e47a4576f5 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -237,6 +237,7 @@ (define-module (gnu packages gnome)
>    #:use-module (guix build-system meson)
>    #:use-module (guix build-system python)
>    #:use-module (guix build-system trivial)
> +  #:use-module (guix deprecation)
>    #:use-module (guix download)
>    #:use-module (guix git-download)
>    #:use-module ((guix licenses) #:prefix license:)
> @@ -10280,7 +10281,7 @@ (define-public gnome-essential-extras
>  a good GNOME experience, mixed from core dependencies and other
> implicitly
>  relied-on packages.")))
>  
> -(define-public gnome
> +(define-deprecated/public gnome #f
>    (package
>      (inherit (gnome-meta-package "gnome"
>                                   (append-map package-propagated-
> inputs
M
M
Maxim Cournoyer wrote on 16 Feb 20:44 +0100
Re: [bug#68716] [PATCH gnome-team v4 1/7] gnu: Split gnome into more meta-packages.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87mss0ry78.fsf@gmail.com
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (19 lines)
> * gnu/packages/gnome.scm (gnome-meta-package): New syntax rule.
> (gnome-meta-core-services, gnome-meta-core-shell, gnome-meta-core-utilities)
> (gnome-essential-extras): New variables.
> (gnome): Implement in terms of the former.
> ---
> gnu/packages/gnome.scm | 179 ++++++++++++++++++++++++-----------------
> 1 file changed, 105 insertions(+), 74 deletions(-)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 7397148c2b..4fde75f612 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -10154,52 +10154,76 @@ (define-public gnome-weather
> (home-page "https://wiki.gnome.org/Apps/Weather")
> (license license:gpl2+)))
>
> -(define-public gnome
> +(define-syntax-rule (gnome-meta-package %name propagate)

It'd be nice to allow any kind of extra fields to be appended to the
package definition, as done e.g. for the make-openjdk syntax.

Toggle quote (4 lines)
> (package
> - (name "gnome")
> + (name %name)

Nitpick: I'd use name*, as %name is often associated with globals in Guix.

Toggle quote (57 lines)
> (version (package-version gnome-shell))
> (source #f)
> (build-system trivial-build-system)
> - (arguments '(#:builder (begin (mkdir %output) #t)))
> - (propagated-inputs
> - `(,@(if (string-prefix? "x86_64" (%current-system))
> - ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
> - ;; only works on x86_64, so exclude it on other architectures.
> - (list eog)
> - '())
> - ,@(list
> - ;; GNOME-Core-OS-Services.
> - accountsservice
> - network-manager
> - packagekit
> - upower
> - ;; GNOME-Core-Shell.
> - adwaita-icon-theme
> - gdm
> - glib-networking
> - gnome-backgrounds
> - gnome-bluetooth
> - gnome-color-manager
> - gnome-control-center
> - gnome-desktop
> - gnome-initial-setup
> - gnome-keyring
> - gnome-menus
> - gnome-session
> - gnome-settings-daemon
> - gnome-shell
> - gnome-shell-extensions
> - gnome-themes-extra
> - gnome-user-docs
> - gnome-user-share
> - gsettings-desktop-schemas
> - gvfs
> - mutter
> - orca
> - rygel
> - sushi
> - ;; GNOME-Core-Utilities.
> - baobab
> + (arguments
> + (list #:builder
> + #~(begin
> + (format (current-warning-port)
> + "Building ~a is useless. \
> +Refer to its propagated inputs instead.\n"
> + #$name)
> + (mkdir #$output))))
> + (propagated-inputs propagate)
> + (home-page "https://www.gnome.org")
> + (synopsis "The GNU desktop environment")
> + (description
> + "GNOME is the graphical desktop for GNU. It includes a wide variety of

I think it's misleading to associate GNOME with GNU at this point in
time. They aren't even a GNU project anymore.

Toggle quote (130 lines)
> +applications for browsing the web, editing text and images, creating
> +documents and diagrams, playing media, scanning, and much more.")
> + (license license:gpl2+)
> + (properties `((hidden? . #t)))))
> +
> +(define-public gnome-meta-core-services
> + (gnome-meta-package
> + "gnome-meta-core-services"
> + (list accountsservice
> + network-manager
> + packagekit
> + upower)))
> +
> +(define-public gnome-meta-core-shell
> + (gnome-meta-package
> + "gnome-meta-core-shell"
> + (list adwaita-icon-theme
> + gdm
> + glib-networking
> + gnome-backgrounds
> + gnome-bluetooth
> + gnome-color-manager
> + gnome-control-center
> + gnome-desktop
> + gnome-initial-setup
> + gnome-keyring
> + gnome-menus
> + gnome-session
> + gnome-settings-daemon
> + gnome-shell
> + gnome-shell-extensions
> + gnome-themes-extra
> + gnome-user-docs
> + gnome-user-share
> + gsettings-desktop-schemas
> + gvfs
> + mutter
> + orca
> + rygel
> + sushi)))
> +
> +(define-public gnome-meta-core-utilities
> + (gnome-meta-package
> + "gnome-meta-core-utilities"
> + (append
> + ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
> + ;; only works on x86_64, so exclude it on other architectures.
> + (if (string-prefix? "x86_64" (%current-system))
> + (list eog)
> + '())
> + (list baobab
> cheese
> epiphany
> evince
> @@ -10224,38 +10248,45 @@ (define-public gnome
> totem
> tracker-miners
> xdg-desktop-portal-gnome
> - yelp
> - ;; Others.
> - gnome-online-accounts
> - hicolor-icon-theme
> -
> - ;; Packages not part of GNOME proper but that are needed for a good
> - ;; experience. See <https://bugs.gnu.org/39646>.
> - ;; XXX: Find out exactly which ones are needed and why.
> - at-spi2-core
> - dbus
> - dconf
> - desktop-file-utils
> - font-abattis-cantarell
> - font-dejavu
> - gnome-default-applications
> - gst-plugins-base
> - gst-plugins-good
> - gucharmap
> - pinentry-gnome3
> - pulseaudio
> - shared-mime-info
> - system-config-printer
> - xdg-user-dirs
> - yelp
> - zenity)))
> - (synopsis "The GNU desktop environment")
> - (home-page "https://www.gnome.org/")
> - (description
> - "GNOME is the graphical desktop for GNU. It includes a wide variety of
> -applications for browsing the web, editing text and images, creating
> -documents and diagrams, playing media, scanning, and much more.")
> - (license license:gpl2+)))
> + yelp))))
> +
> +(define-public gnome-essential-extras
> + (package
> + (inherit
> + (gnome-meta-package
> + "gnome-essential-extras"
> + (list at-spi2-core
> + dbus
> + dconf
> + desktop-file-utils
> + font-abattis-cantarell
> + font-dejavu
> + gnome-default-applications
> + gnome-online-accounts
> + gst-plugins-base
> + gst-plugins-good
> + gucharmap
> + hicolor-icon-theme
> + pinentry-gnome3
> + pulseaudio
> + shared-mime-info
> + system-config-printer
> + xdg-user-dirs
> + yelp
> + zenity)))
> + (description "This package provides a list of packages required for
> +a good GNOME experience, mixed from core dependencies and other implicitly
> +relied-on packages.")))
> +
> +(define-public gnome
> + (package
> + (inherit (gnome-meta-package "gnome"
> + (append-map package-propagated-inputs
> + (list gnome-meta-core-services
> + gnome-meta-core-shell
> + gnome-meta-core-utilities
> + gnome-essential-extras))))
> + (properties (list))))

With the make-openjdk like change I suggested above, this could be
expressed without using inherit as:

Toggle snippet (11 lines)
(define-public gnome
(gnome-meta-package
"gnome"
(append-map package-propagated-inputs
(list gnome-meta-core-services
gnome-meta-core-shell
gnome-meta-core-utilities
gnome-essential-extras))
(properties '())))

which I find more pleasing to read.

Otherwise,

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

--
Thanks,
Maxim
L
L
Liliana Marie Prikler wrote on 16 Feb 21:08 +0100
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
bc25d860c518c82f1438608640268f18ab4e6c0e.camel@gmail.com
Am Freitag, dem 16.02.2024 um 14:44 -0500 schrieb Maxim Cournoyer:
Toggle quote (27 lines)
> Hi,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > * gnu/packages/gnome.scm (gnome-meta-package): New syntax rule.
> > (gnome-meta-core-services, gnome-meta-core-shell, gnome-meta-core-
> > utilities)
> > (gnome-essential-extras): New variables.
> > (gnome): Implement in terms of the former.
> > ---
> >  gnu/packages/gnome.scm | 179 ++++++++++++++++++++++++-------------
> > ----
> >  1 file changed, 105 insertions(+), 74 deletions(-)
> >
> > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> > index 7397148c2b..4fde75f612 100644
> > --- a/gnu/packages/gnome.scm
> > +++ b/gnu/packages/gnome.scm
> > @@ -10154,52 +10154,76 @@ (define-public gnome-weather
> >      (home-page "https://wiki.gnome.org/Apps/Weather")
> >      (license license:gpl2+)))
> >  
> > -(define-public gnome
> > +(define-syntax-rule (gnome-meta-package %name propagate)
>
> It'd be nice to allow any kind of extra fields to be appended to the
> package definition, as done e.g. for the make-openjdk syntax.
Thanks for the hint.

Toggle quote (6 lines)
> >    (package
> > -    (name "gnome")
> > +    (name %name)
>
> Nitpick: I'd use name*, as %name is often associated with globals in
> Guix.
I think I'll be using a dummy name instead so that we can use regular
field syntax.

Toggle quote (62 lines)
> >      (version (package-version gnome-shell))
> >      (source #f)
> >      (build-system trivial-build-system)
> > -    (arguments '(#:builder (begin (mkdir %output) #t)))
> > -    (propagated-inputs
> > -     `(,@(if (string-prefix? "x86_64" (%current-system))
> > -             ;; XXX: EoG requires librsvg-next, which depends on
> > Rust, which currently
> > -             ;; only works on x86_64, so exclude it on other
> > architectures.
> > -             (list eog)
> > -             '())
> > -       ,@(list
> > -          ;; GNOME-Core-OS-Services.
> > -          accountsservice
> > -          network-manager
> > -          packagekit
> > -          upower
> > -          ;; GNOME-Core-Shell.
> > -          adwaita-icon-theme
> > -          gdm
> > -          glib-networking
> > -          gnome-backgrounds
> > -          gnome-bluetooth
> > -          gnome-color-manager
> > -          gnome-control-center
> > -          gnome-desktop
> > -          gnome-initial-setup
> > -          gnome-keyring
> > -          gnome-menus
> > -          gnome-session
> > -          gnome-settings-daemon
> > -          gnome-shell
> > -          gnome-shell-extensions
> > -          gnome-themes-extra
> > -          gnome-user-docs
> > -          gnome-user-share
> > -          gsettings-desktop-schemas
> > -          gvfs
> > -          mutter
> > -          orca
> > -          rygel
> > -          sushi
> > -          ;; GNOME-Core-Utilities.
> > -          baobab
> > +    (arguments
> > +     (list #:builder
> > +           #~(begin
> > +               (format (current-warning-port)
> > +                       "Building ~a is useless.  \
> > +Refer to its propagated inputs instead.\n"
> > +                       #$name)
> > +               (mkdir #$output))))
> > +    (propagated-inputs propagate)
> > +    (home-page "https://www.gnome.org")
> > +    (synopsis "The GNU desktop environment")
> > +    (description
> > +     "GNOME is the graphical desktop for GNU.  It includes a wide
> > variety of
>
> I think it's misleading to associate GNOME with GNU at this point in
> time.  They aren't even a GNU project anymore.
I took the synopsis and description of the existing GNOME package.
Feel free to suggest an alternative.

Cheers
Toggle quote (1 lines)
>
V
V
Vivien Kraus wrote on 17 Feb 08:50 +0100
1e69a08515d3344caa93cec2edf1bf728351275f.camel@planete-kraus.eu
Hello,

Le vendredi 16 février 2024 à 21:08 +0100, Liliana Marie Prikler a
écrit :
Toggle quote (9 lines)
> > > +     "GNOME is the graphical desktop for GNU.  It includes a
> > > wide
> > > variety of
> >
> > I think it's misleading to associate GNOME with GNU at this point
> > in
> > time.  They aren't even a GNU project anymore.
> I took the synopsis and description of the existing GNOME package.
> Feel free to suggest an alternative.
Here is my suggestion:

GNOME is a graphical desktop environment. It includes a wide variety
of applications with a common interface for browsing the web, editing
text and images, creating documents and diagrams, playing media,
scanning, and much more. It also provides libraries and tools to help
write such applications.

What do you think?

Best regards,

Vivien
L
L
Liliana Marie Prikler wrote on 16 Feb 11:53 +0100
[PATCH v5 1/8] gnu: Split gnome into more meta-packages.
(address . 68716@debbugs.gnu.org)
dc2ab552abdcba97b0d557a06e77055d976e1812.1708158195.git.liliana.prikler@gmail.com
* gnu/packages/gnome.scm (gnome-meta-package): New syntax rule.
(gnome-meta-core-services, gnome-meta-core-shell, gnome-meta-core-utilities)
(gnome-essential-extras): New variables.
(gnome): Implement in terms of the former.
---
gnu/packages/gnome.scm | 235 +++++++++++++++++++++++------------------
1 file changed, 135 insertions(+), 100 deletions(-)

Toggle diff (252 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 7397148c2b..9a27343353 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10154,108 +10154,143 @@ (define-public gnome-weather
(home-page "https://wiki.gnome.org/Apps/Weather")
(license license:gpl2+)))
-(define-public gnome
- (package
- (name "gnome")
- (version (package-version gnome-shell))
- (source #f)
- (build-system trivial-build-system)
- (arguments '(#:builder (begin (mkdir %output) #t)))
- (propagated-inputs
- `(,@(if (string-prefix? "x86_64" (%current-system))
- ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
- ;; only works on x86_64, so exclude it on other architectures.
- (list eog)
- '())
- ,@(list
- ;; GNOME-Core-OS-Services.
- accountsservice
- network-manager
- packagekit
- upower
- ;; GNOME-Core-Shell.
- adwaita-icon-theme
- gdm
- glib-networking
- gnome-backgrounds
- gnome-bluetooth
- gnome-color-manager
- gnome-control-center
- gnome-desktop
- gnome-initial-setup
- gnome-keyring
- gnome-menus
- gnome-session
- gnome-settings-daemon
- gnome-shell
- gnome-shell-extensions
- gnome-themes-extra
- gnome-user-docs
- gnome-user-share
- gsettings-desktop-schemas
- gvfs
- mutter
- orca
- rygel
- sushi
- ;; GNOME-Core-Utilities.
- baobab
- cheese
- epiphany
- evince
- file-roller
- gnome-calculator
- gnome-calendar
- gnome-characters
- gnome-clocks
- gnome-console
- gnome-contacts
- gnome-disk-utility
- gnome-font-viewer
- gnome-maps
- gnome-music
- gnome-photos
- gnome-screenshot
- gnome-system-monitor
- gnome-text-editor
- gnome-weather
- nautilus
- simple-scan
- totem
- tracker-miners
- xdg-desktop-portal-gnome
- yelp
- ;; Others.
- gnome-online-accounts
- hicolor-icon-theme
-
- ;; Packages not part of GNOME proper but that are needed for a good
- ;; experience. See <https://bugs.gnu.org/39646>.
- ;; XXX: Find out exactly which ones are needed and why.
- at-spi2-core
- dbus
- dconf
- desktop-file-utils
- font-abattis-cantarell
- font-dejavu
- gnome-default-applications
- gst-plugins-base
- gst-plugins-good
- gucharmap
- pinentry-gnome3
- pulseaudio
- shared-mime-info
- system-config-printer
- xdg-user-dirs
- yelp
- zenity)))
- (synopsis "The GNU desktop environment")
- (home-page "https://www.gnome.org/")
- (description
- "GNOME is the graphical desktop for GNU. It includes a wide variety of
+(define-syntax gnome-meta-package
+ (lambda (x)
+ (syntax-case x ()
+ ((_ field ...)
+ (with-syntax ((base (datum->syntax x 'base)))
+ #'(let ((base
+ (package
+ (name #f) ; we're hidden by default, so don't worry
+ (version (package-version gnome-shell))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list #:builder
+ #~(begin (format (current-warning-port)
+ "Building ~a is useless. \
+Refer to its propagated inputs instead.\n"
+ #$(package-name this-package))
+ (mkdir #$output))))
+ (home-page "https://www.gnome.org")
+ (synopsis "The GNU desktop environment")
+ (description "\
+GNOME is the graphical desktop for GNU. It includes a wide variety of
applications for browsing the web, editing text and images, creating
documents and diagrams, playing media, scanning, and much more.")
- (license license:gpl2+)))
+ (license license:gpl2+)
+ (properties `((hidden? . #t))))))
+ (package (inherit base)
+ field ...)))))))
+
+(define-public gnome-meta-core-services
+ (gnome-meta-package
+ (name "gnome-meta-core-services")
+ (propagated-inputs (list accountsservice
+ network-manager
+ packagekit
+ upower))))
+
+(define-public gnome-meta-core-shell
+ (gnome-meta-package
+ (name "gnome-meta-core-shell")
+ (propagated-inputs (list adwaita-icon-theme
+ gdm
+ glib-networking
+ gnome-backgrounds
+ gnome-bluetooth
+ gnome-color-manager
+ gnome-control-center
+ gnome-desktop
+ gnome-initial-setup
+ gnome-keyring
+ gnome-menus
+ gnome-session
+ gnome-settings-daemon
+ gnome-shell
+ gnome-shell-extensions
+ gnome-themes-extra
+ gnome-user-docs
+ gnome-user-share
+ gsettings-desktop-schemas
+ gvfs
+ mutter
+ orca
+ rygel
+ sushi))))
+
+(define-public gnome-meta-core-utilities
+ (gnome-meta-package
+ (name "gnome-meta-core-utilities")
+ (propagated-inputs (append
+ ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
+ ;; only works on x86_64, so exclude it on other architectures.
+ (if (string-prefix? "x86_64" (%current-system))
+ (list eog)
+ '())
+ (list baobab
+ cheese
+ epiphany
+ evince
+ file-roller
+ gnome-calculator
+ gnome-calendar
+ gnome-characters
+ gnome-clocks
+ gnome-console
+ gnome-contacts
+ gnome-disk-utility
+ gnome-font-viewer
+ gnome-maps
+ gnome-music
+ gnome-photos
+ gnome-screenshot
+ gnome-system-monitor
+ gnome-text-editor
+ gnome-weather
+ nautilus
+ simple-scan
+ totem
+ tracker-miners
+ xdg-desktop-portal-gnome
+ yelp)))))
+
+(define-public gnome-essential-extras
+ (gnome-meta-package
+ (name "gnome-essential-extras")
+ (propagated-inputs (list at-spi2-core
+ dbus
+ dconf
+ desktop-file-utils
+ font-abattis-cantarell
+ font-dejavu
+ gnome-default-applications
+ gnome-online-accounts
+ gst-plugins-base
+ gst-plugins-good
+ gucharmap
+ hicolor-icon-theme
+ pinentry-gnome3
+ pulseaudio
+ shared-mime-info
+ system-config-printer
+ xdg-user-dirs
+ yelp
+ zenity))
+ (description "This package provides a list of packages required for
+a good GNOME experience, mixed from core dependencies and other implicitly
+relied-on packages.")))
+
+(define-public gnome
+ (gnome-meta-package
+ (name "gnome")
+ (propagated-inputs
+ (append-map package-propagated-inputs
+ (list gnome-meta-core-services
+ gnome-meta-core-shell
+ gnome-meta-core-utilities
+ gnome-essential-extras)))
+ (properties (list))))
(define-public byzanz
;; The last stable release of Byzanz was in 2011, but there have been many

base-commit: 622df12ef389c9e91f68ae10c54c043f34828c83
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 12:02 +0100
[PATCH v5 2/8] gnu: gnome: Add core packages for GNOME 44.
(address . 68716@debbugs.gnu.org)
948a04ec358b02194ab3ae448b73801ba340f065.1708158195.git.liliana.prikler@gmail.com
* gnu/packages/gnome.scm (gnome-meta-core-shell): Add gnome-remote-desktop.
(gnome-meta-core-utilities): Add gnome-connections.
---
gnu/packages/gnome.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 9a27343353..119f957def 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10205,6 +10205,7 @@ (define-public gnome-meta-core-shell
gnome-initial-setup
gnome-keyring
gnome-menus
+ gnome-remote-desktop
gnome-session
gnome-settings-daemon
gnome-shell
@@ -10237,6 +10238,7 @@ (define-public gnome-meta-core-utilities
gnome-calendar
gnome-characters
gnome-clocks
+ gnome-connections
gnome-console
gnome-contacts
gnome-disk-utility
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:35 +0100
[PATCH v5 3/8] services: Modularise gnome-desktop-configuration.
(address . 68716@debbugs.gnu.org)
2869f41835d62e93d4f501f5bbb50a1c7a67c91c.1708158195.git.liliana.prikler@gmail.com
* gnu/services/gnome.scm (extract-propagated-inputs): New variable.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’. Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
---
gnu/services/desktop.scm | 97 ++++++++++++++++++++++++++++++++++------
1 file changed, 83 insertions(+), 14 deletions(-)

Toggle diff (163 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 5b79fbcda1..0667acfaba 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -37,6 +37,7 @@ (define-module (gnu services desktop)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services base)
+ #:use-module (gnu services configuration)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
@@ -60,6 +61,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages xfce)
#:use-module (gnu packages avahi)
#:use-module (gnu packages xdisorg)
@@ -73,6 +75,7 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
+ #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -81,6 +84,7 @@ (define-module (gnu services desktop)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -139,6 +143,10 @@ (define-module (gnu services desktop)
gnome-desktop-configuration
gnome-desktop-configuration?
+ gnome-desktop-configuration-core-services
+ gnome-desktop-configuration-shell
+ gnome-desktop-configuration-utilities
+ gnome-desktop-configuration-extra-packages
gnome-desktop-service
gnome-desktop-service-type
@@ -1382,11 +1390,34 @@ (define sane-service-type
;;; GNOME desktop service.
;;;
-(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
- make-gnome-desktop-configuration
- gnome-desktop-configuration?
- (gnome gnome-desktop-configuration-gnome
- (default gnome)))
+(define-maybe/no-serialization package)
+
+(define (extract-propagated-inputs package)
+ ;; Drop input labels. Attempt to support outputs.
+ (map
+ (match-lambda
+ ((_ (? package? pkg)) pkg)
+ ((_ (? package? pkg) output) (list pkg output)))
+ (package-propagated-inputs package)))
+
+(define-configuration/no-serialization gnome-desktop-configuration
+ (core-services
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-services))
+ "A list of packages that the GNOME Shell and applications may rely on.")
+ (shell
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-shell))
+ "A list of packages that constitute the GNOME Shell, without applications.")
+ (utilities
+ (list-of-packages (extract-propagated-inputs gnome-meta-core-utilities))
+ "A list of packages that serve as applications to use on top of the \
+GNOME Shell.")
+ (gnome (maybe-package) "Deprecated. Do not use.")
+ (extra-packages
+ (list-of-packages (extract-propagated-inputs gnome-essential-extras))
+ "A list of GNOME-adjacent packages to also include. This field is intended
+for users to add their own packages to their GNOME experience. Note, that it
+already includes some packages that are considered essential by some (most?)
+GNOME users."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1400,18 +1431,56 @@ (define (gnome-packages gnome names)
(define (gnome-udev-rules config)
"Return the list of GNOME dependencies that provide udev rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome '("gnome-settings-daemon"))))
+ (let* ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda
+ ((and pkg (= package-name "gnome-settings-daemon"))
+ (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome '("gnome-settings-daemon")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gnome-settings-daemon"))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config)))
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config))
+ (shell (gnome-desktop-configuration-shell config)))
+ (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
+ (_ #f))
+ shell)
+ (and (maybe-value-set? gnome)
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs")))
+ (raise
+ (condition
+ (&error-location
+ (location (gnome-desktop-configuration-source-location config)))
+ (&message (message (G_ "Missing gvfs"))))))))
+
+(define (gnome-profile config)
+ "Return a list of packages propagated through CONFIG."
+ (append
+ (gnome-desktop-configuration-core-services config)
+ (gnome-desktop-configuration-shell config)
+ (gnome-desktop-configuration-utilities config)
+ (let ((gnome-meta (gnome-desktop-configuration-gnome config)))
+ (if (maybe-value-set? gnome-meta)
+ (begin
+ (warning
+ (gnome-desktop-configuration-source-location config)
+ (G_ "Using a meta-package for gnome-desktop is discouraged.~%"))
+ (list gnome-meta))
+ (list)))
+ (gnome-desktop-configuration-extra-packages config)))
(define gnome-desktop-service-type
(service-type
@@ -1422,7 +1491,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list gnome-desktop-configuration-gnome))))
+ gnome-profile)))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 25 Jan 16:55 +0100
[PATCH v5 7/8] gnu: Deprecate gnome meta-package.
(address . 68716@debbugs.gnu.org)
1e2625c51c274850da6622775cef74d0d76ad554.1708158195.git.liliana.prikler@gmail.com
GNOME is not a "one size fits all" environment, but with the introduction of
World, Circle, and to some extent Developer Extras and recent explorations of
mobile form factors much more customizable towards the needs of users. As
such, it is silly to insist on a single meta-package to make everyone happy.

* gnu/packages/gnome.scm (gnome): Deprecate.
---
gnu/packages/gnome.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 119f957def..3736b9c351 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -237,6 +237,7 @@ (define-module (gnu packages gnome)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -10283,7 +10284,7 @@ (define-public gnome-essential-extras
a good GNOME experience, mixed from core dependencies and other implicitly
relied-on packages.")))
-(define-public gnome
+(define-deprecated/public gnome #f
(gnome-meta-package
(name "gnome")
(propagated-inputs
--
2.41.0
L
L
Liliana Marie Prikler wrote on 17 Feb 09:19 +0100
[PATCH v5 8/8] gnu: gnome: Update synopsis and description.
(address . 68716@debbugs.gnu.org)
148822e650a43b1084633018a626d618cc30da95.1708158195.git.liliana.prikler@gmail.com
Gnome no longer considers itself “The GNU desktop environment”™, so let's
reflect that.

* gnu/packages/gnome.scm (gnome-meta-package)[synopsis]: Shorten to “Graphical
desktop environment”.
[description]: Adjust accordingly.
---
gnu/packages/gnome.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3736b9c351..43126388e9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10174,11 +10174,11 @@ (define-syntax gnome-meta-package
#$(package-name this-package))
(mkdir #$output))))
(home-page "https://www.gnome.org")
- (synopsis "The GNU desktop environment")
- (description "\
-GNOME is the graphical desktop for GNU. It includes a wide variety of
-applications for browsing the web, editing text and images, creating
-documents and diagrams, playing media, scanning, and much more.")
+ (synopsis "Graphical desktop environment")
+ (description "GNOME is a graphical desktop environment.
+It includes a wide variety of applications with a common interface for
+browsing the web, editing text and images, creating documents and diagrams,
+playing media, scanning, and much more.")
(license license:gpl2+)
(properties `((hidden? . #t))))))
(package (inherit base)
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 13:35 +0100
[PATCH v5 6/8] services: desktop: Remove unused imports.
(address . 68716@debbugs.gnu.org)
f3e5a53f339a139d3e55b9efccd8ab150b89e1b4.1708158195.git.liliana.prikler@gmail.com
These imports were needed for a short time to consider two variants of finding
udev/polkit configuration files. They are no longer needed, since the
respective procedures use all packages now.

* gnu/services/desktop.scm: Strip use of (guix diagnostics) and (srfi srfi-35).
---
gnu/services/desktop.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index b3c0f4fc41..02a7802d58 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -75,7 +75,6 @@ (define-module (gnu services desktop)
#:use-module (gnu packages nfs)
#:use-module (gnu packages enlightenment)
#:use-module (guix deprecation)
- #:use-module (guix diagnostics)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -85,7 +84,6 @@ (define-module (gnu services desktop)
#:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:use-module (srfi srfi-35)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Feb 13:08 +0100
[PATCH v5 5/8] services: Extend polkit capabilities of gnome-desktop-service.
(address . 68716@debbugs.gnu.org)
546e128bfc3a77723987a842d5979c08a4153c6c.1708158195.git.liliana.prikler@gmail.com
As with our udev extension, this makes it so that all inputs are considered
modulo a new ignorelist.

* gnu/services/desktop.scm (gnome-desktop-configuration): Add
polkit-ignorelist.
(gnome-polkit-settings): Adjust accordingly.
---
gnu/services/desktop.scm | 44 ++++++++++++++++++++++++----------------
1 file changed, 27 insertions(+), 17 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 0631571c49..b3c0f4fc41 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1425,7 +1425,12 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of regular expressions denoting udev rules or hardware file names
provided by any package that should not be installed. By default, every udev
rule and hardware file specified by any package referenced in the other fields
-are installed."))
+are installed.")
+ (polkit-ignorelist
+ (list-of-strings '())
+ "A list of regular expressions denoting polkit rules provided by any package
+that should not be installed. By default, every polkit rule added by any package
+referenced in the other fields are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1467,22 +1472,27 @@ (define (gnome-udev-configuration-files config)
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (let ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gvfs"))))))))
+ (list
+ (computed-file
+ "gnome-polkit-settings"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)
+ (guix build union)))
+ #~(let ((output (string-append #$output "/share/polkit-1")))
+ (use-modules (guix build utils)
+ (guix build union))
+ (mkdir-p (dirname output))
+ (union-build output
+ (search-path-as-list
+ (list "share/polkit-1")
+ (list #$@(gnome-profile config)))
+ #:create-all-directories? #t)
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files output pattern)))
+ (list #$@(gnome-desktop-configuration-polkit-ignorelist config))))))))
(define (gnome-profile config)
"Return a list of packages propagated through CONFIG."
--
2.41.0
V
V
Vivien Kraus wrote on 5 Feb 18:05 +0100
[PATCH v5 4/8] services: Extend udev capabilities of gnome-desktop-service.
(address . 68716@debbugs.gnu.org)
18430b0ce6613e52113e07ae6305e529270e3265.1708158195.git.liliana.prikler@gmail.com
Our udev service is capable of handling both rules and hardware databases.
This patch makes it so that gnome can install any such needed rules or
databases, while also allowing users to supply a list of names to ignore
(via regular expressions).

* gnu/services/desktop.scm (gnome-desktop-configuration): Add udev-ignorelist.
(gnome-udev-resources): Rename to…
(gnome-udev-configuration-files): … this. Account for udev-ignorelist.
(gnome-desktop-service-type): Adjust accordingly.

Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
---
gnu/services/desktop.scm | 54 ++++++++++++++++++++++++++--------------
1 file changed, 36 insertions(+), 18 deletions(-)

Toggle diff (95 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 0667acfaba..0631571c49 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -82,6 +82,7 @@ (define-module (gnu services desktop)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix gexp)
+ #:use-module (guix modules)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
@@ -147,6 +148,7 @@ (define-module (gnu services desktop)
gnome-desktop-configuration-shell
gnome-desktop-configuration-utilities
gnome-desktop-configuration-extra-packages
+ gnome-desktop-configuration-udev-ignorelist
gnome-desktop-service
gnome-desktop-service-type
@@ -1417,7 +1419,13 @@ (define-configuration/no-serialization gnome-desktop-configuration
"A list of GNOME-adjacent packages to also include. This field is intended
for users to add their own packages to their GNOME experience. Note, that it
already includes some packages that are considered essential by some (most?)
-GNOME users."))
+GNOME users.")
+ (udev-ignorelist
+ (list-of-strings '())
+ "A list of regular expressions denoting udev rules or hardware file names
+provided by any package that should not be installed. By default, every udev
+rule and hardware file specified by any package referenced in the other fields
+are installed."))
(define (gnome-package gnome name)
"Return the package NAME among the GNOME package inputs. NAME can be a
@@ -1429,22 +1437,32 @@ (define (gnome-packages gnome names)
"Return the package NAMES among the GNOME package inputs."
(map (cut gnome-package gnome <>) names))
-(define (gnome-udev-rules config)
- "Return the list of GNOME dependencies that provide udev rules."
- (let* ((gnome (gnome-desktop-configuration-gnome config))
- (shell (gnome-desktop-configuration-shell config)))
- (or (any (match-lambda
- ((and pkg (= package-name "gnome-settings-daemon"))
- (list pkg))
- (_ #f))
- shell)
- (and (maybe-value-set? gnome)
- (gnome-packages gnome '("gnome-settings-daemon")))
- (raise
- (condition
- (&error-location
- (location (gnome-desktop-configuration-source-location config)))
- (&message (message (G_ "Missing gnome-settings-daemon"))))))))
+(define (gnome-udev-configuration-files config)
+ "Return the GNOME udev rules and hardware files as computed from its
+dependencies by filtering out the ignorelist."
+ (list
+ (computed-file
+ "gnome-udev-configurations"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)
+ (guix build union)))
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build union))
+ ;; If rules.d or hwdb.d is not a proper directory but a symlink,
+ ;; then it will not be possible to delete individual files in this
+ ;; directory.
+ (union-build #$output
+ (search-path-as-list
+ (list "lib/udev" "libexec/udev")
+ (list #$@(gnome-profile config)))
+ #:create-all-directories? #t)
+ (for-each
+ (lambda (pattern)
+ (for-each
+ delete-file-recursively
+ (find-files #$output pattern)))
+ (list #$@(gnome-desktop-configuration-udev-ignorelist config))))))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
@@ -1487,7 +1505,7 @@ (define gnome-desktop-service-type
(name 'gnome-desktop)
(extensions
(list (service-extension udev-service-type
- gnome-udev-rules)
+ gnome-udev-configuration-files)
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
--
2.41.0
L
L
Liliana Marie Prikler wrote on 24 Feb 07:40 +0100
Re: [PATCH v5 1/8] gnu: Split gnome into more meta-packages.
(address . 68716-done@debbugs.gnu.org)
460eb418793291de0a700b0dcdaa1865b811592f.camel@gmail.com
Am Freitag, dem 16.02.2024 um 11:53 +0100 schrieb Liliana Marie
Prikler:
Toggle quote (6 lines)
> * gnu/packages/gnome.scm (gnome-meta-package): New syntax rule.
> (gnome-meta-core-services, gnome-meta-core-shell, gnome-meta-core-
> utilities)
> (gnome-essential-extras): New variables.
> (gnome): Implement in terms of the former.
> ---
Pushed.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 68716
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