[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61576] [PATCH 18/21] services: desktop: Extract a new gnome-package
From: |
Maxim Cournoyer |
Subject: |
[bug#61576] [PATCH 18/21] services: desktop: Extract a new gnome-package procedure. |
Date: |
Fri, 17 Feb 2023 12:00:59 -0500 |
* gnu/services/desktop.scm (<gnome-desktop-configuration>): Rename gnome
package accessor to gnome-desktop-configuration-gnome, to avoid name conflict.
(gnome-packages): Change first argument from a config object to a the gnome
package used. Rename second argument from package to name. Extract core
logic into...
(gnome-package): ... this.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-desktop-service-type): Likewise.
---
gnu/services/desktop.scm | 43 ++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 189334dc23..5ddfbb9e53 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -73,6 +73,7 @@ (define-module (gnu services desktop)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:export (<upower-configuration>
@@ -1347,31 +1348,36 @@ (define sane-service-type
(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
make-gnome-desktop-configuration
gnome-desktop-configuration?
- (gnome gnome-package (default gnome)))
+ (gnome gnome-desktop-configuration-gnome
+ (default gnome)))
-(define (gnome-packages config packages)
- "Return the list of GNOME dependencies from CONFIG which names are part of
-the given PACKAGES list."
- (let ((gnome (gnome-package config)))
- (map (lambda (name)
- ((package-direct-input-selector name) gnome))
- packages)))
+(define (gnome-package gnome name)
+ "Return the package NAME among the GNOME package inputs. NAME can be a
+single name or a tree-like, e.g. @code{'(\"gnome-boxes\" \"spice-gtk\")} to
+denote the spice-gtk input of the gnome-boxes input of the GNOME meta-package."
+ ((package-direct-input-selector name) gnome))
+
+(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."
- (gnome-packages config '("gnome-settings-daemon")))
+ (let ((gnome (gnome-desktop-configuration-gnome config)))
+ (gnome-packages gnome '("gnome-settings-daemon"))))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
- (gnome-packages config
- '("gnome-settings-daemon"
- "gnome-control-center"
- "gnome-system-monitor"
- "gvfs"
- ;; spice-gtk provides polkit actions for USB redirection
- ;; in GNOME Boxes.
- ("gnome-boxes" "spice-gtk"))))
+ (let ((gnome (gnome-desktop-configuration-gnome config)))
+ (gnome-packages gnome
+ '("gnome-settings-daemon"
+ "gnome-control-center"
+ "gnome-system-monitor"
+ "gvfs"
+ ;; spice-gtk provides polkit actions for USB redirection
+ ;; in GNOME Boxes.
+ ("gnome-boxes" "spice-gtk")))))
(define gnome-desktop-service-type
(service-type
@@ -1382,8 +1388,7 @@ (define gnome-desktop-service-type
(service-extension polkit-service-type
gnome-polkit-settings)
(service-extension profile-service-type
- (compose list
- gnome-package))))
+ (compose list
gnome-desktop-configuration-gnome))))
(default-value (gnome-desktop-configuration))
(description "Run the GNOME desktop environment.")))
--
2.39.1
- [bug#61576] [PATCH 00/21] Allow USB redirection as an unprivileged user in in GNOME Boxes, Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 01/21] gnu: spice-gtk: Fix indentation and normalize field order., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 08/21] gnu: virglrenderer: Update to 0.7.0., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 06/21] gnu: spice-protocol: Update to 0.14.4., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 09/21] gnu: libcacard: Remove obsolete configure flags., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 03/21] gnu: spice-gtk: Use gexps., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 12/21] gnu: usbutils: Update to 015., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 15/21] gnu: osinfo-db: Use libsoup 3., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 04/21] gnu: spice-gtk: Update to 0.42., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 13/21] gnu: phodav: Propagate glib, libsoup and libxml2., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 18/21] services: desktop: Extract a new gnome-package procedure.,
Maxim Cournoyer <=
- [bug#61576] [PATCH 20/21] gnu: gnome-boxes: Mention extra configuration requirements., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 10/21] gnu: spice: Update to 0.15.1., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 05/21] gnu: spice-gtk: Propagate libjpeg-turbo, lz4, opus, and usbredir., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 14/21] gnu: spice-gtk: Enable support for polkit, webdav and others., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 02/21] gnu: spice-gtk: Remove input labels., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 19/21] services: gnome-desktop-service-type: Extend setuid-program-service-type., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 11/21] gnu: spice-vdagent: Update to 0.22.1., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 16/21] gnu: gnome-boxes: Update to 43.3., Maxim Cournoyer, 2023/02/17
- [bug#61576] [PATCH 07/21] gnu: usbredir: Update to 0.13.0., Maxim Cournoyer, 2023/02/17