guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: sugar-desktop-configuration: Allow specification of activiti


From: guix-commits
Subject: 04/04: gnu: sugar-desktop-configuration: Allow specification of activities.
Date: Tue, 28 Feb 2023 17:18:01 -0500 (EST)

rekado pushed a commit to branch master
in repository guix.

commit d7f9eb0e876257b28672057bea3561fef2fe5c0f
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Feb 28 23:14:23 2023 +0100

    gnu: sugar-desktop-configuration: Allow specification of activities.
    
    * gnu/services/desktop.scm (<sugar-desktop-configuration>): Add new fields 
for
    activities and gobject-introspection.
    (sugar-gobject-introspection, sugar-activities): New procedures.
    (sugar-desktop-service-type): Install packages for activities and
    gobject-introspection alongside the sugar package.
    * doc/guix.texi (Desktop Services): Document changes.
---
 doc/guix.texi            | 31 +++++++++++++++++++++++++++----
 gnu/services/desktop.scm | 11 +++++++++--
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 73e3d1aa92..6ff525d0ff 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23185,10 +23185,9 @@ This is the type of the service that runs the
 @uref{https://www.sugarlabs.org, Sugar desktop environment}.  Its value
 is a @code{sugar-desktop-configuration} object (see below).
 
-This service adds the @code{sugar} package to the system profile.  It
-does not install any Sugar Activity.  Add packages providing activities
-to the list of packages to be installed globally to make them available
-to users of the Sugar desktop environment.
+This service adds the @code{sugar} package to the system profile, as
+well as any selected Sugar activities.  By default it only includes a
+minimal set of activities.
 @end defvar
 
 @deftp {Data Type} sugar-desktop-configuration
@@ -23197,9 +23196,33 @@ Configuration record for the Sugar desktop environment.
 @table @asis
 @item @code{sugar} (default: @code{sugar})
 The Sugar package to use.
+@item @code{gobject-introspection} (default: @code{gobject-introspection})
+The @code{gobject-introspection} package to use.  This package is used
+to access libraries installed as dependencies of Sugar activities.
+@item @code{activities} (default: @code{(list sugar-help-activity)})
+A list of Sugar activities to install.
 @end table
 @end deftp
 
+The following example configures the Sugar desktop environment with a
+number of useful activities:
+
+@lisp
+(use-modules (gnu))
+(use-package-modules sugar)
+(use-service-modules desktop)
+(operating-system
+  ...
+  (services (cons* (service sugar-desktop-service-type
+                            (sugar-desktop-configuration
+                              (activities (list sugar-browse-activity
+                                                sugar-help-activity
+                                                sugar-jukebox-activity
+                                                
sugar-typing-turtle-activity))))
+                   %desktop-services))
+  ...)
+@end lisp
+
 @defvar enlightenment-desktop-service-type
 Return a service that adds the @code{enlightenment} package to the system
 profile, and extends dbus with actions from @code{efl}.
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 42f35e9a75..4724294433 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1530,7 +1530,11 @@ rules."
 (define-record-type* <sugar-desktop-configuration> sugar-desktop-configuration
   make-sugar-desktop-configuration
   sugar-desktop-configuration?
-  (sugar sugar-package (default sugar)))
+  (sugar sugar-package (default sugar))
+  (gobject-introspection
+   sugar-gobject-introspection (default gobject-introspection))
+  (activities
+   sugar-activities (default (list sugar-help-activity))))
 
 (define (sugar-polkit-settings config)
   "Return the list of packages that provide polkit actions and rules."
@@ -1543,7 +1547,10 @@ rules."
     (list (service-extension polkit-service-type
                              sugar-polkit-settings)
           (service-extension profile-service-type
-                             (compose list sugar-package))))
+                             (lambda (config)
+                               (cons* (sugar-package config)
+                                      (sugar-gobject-introspection config)
+                                      (sugar-activities config))))))
    (default-value (sugar-desktop-configuration))
    (description "Run the Sugar desktop environment.")))
 



reply via email to

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