[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: services: Add Enlightenment desktop service.
From: |
Efraim Flashner |
Subject: |
02/06: services: Add Enlightenment desktop service. |
Date: |
Sun, 20 May 2018 14:44:11 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit e9d271ed9a1fba86f372986a137b6110a41a1324
Author: Efraim Flashner <address@hidden>
Date: Sat Mar 10 22:24:00 2018 +0200
services: Add Enlightenment desktop service.
* gnu/services/desktop.scm (<enlightenment-desktop-configuration>,
enlightenment-desktop-service-type): New variables.
* doc/guix.texi (Desktop Services): Document the service.
* NEWS: Mention it.
---
NEWS | 7 ++++++
doc/guix.texi | 27 ++++++++++++++++-----
gnu/services/desktop.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 90 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index ca57f5d..6003b5d 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,13 @@ Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès
<address@hidden>
Please send Guix bug reports to address@hidden
* Changes in 0.15.0 (since 0.14.0)
+
+** Distribution
+
+*** New services
+
+enlightenment
+
** Programming interfaces
*** package-full-name (guix packages) now uses "@" as its delimiter.
diff --git a/doc/guix.texi b/doc/guix.texi
index 81ad4f4..5129b99 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12678,11 +12678,11 @@ field of an @code{operating-system} declaration
(@pxref{operating-system
Reference, @code{services}}).
Additionally, the @code{gnome-desktop-service},
address@hidden and @code{mate-desktop-service}
-procedures can add GNOME, XFCE and/or MATE to a system.
-To ``add GNOME'' means that system-level services like the
-backlight adjustment helpers and the power management utilities are
-added to the system, extending @code{polkit} and @code{dbus}
address@hidden, @code{mate-desktop-service} and
address@hidden procedures can add GNOME, XFCE, MATE
+and/or Enlightenment to a system. To ``add GNOME'' means that system-level
+services like the backlight adjustment helpers and the power management
+utilities are added to the system, extending @code{polkit} and @code{dbus}
appropriately, allowing GNOME to operate with elevated privileges on a
limited number of special-purpose system interfaces. Additionally,
adding a service made by @code{gnome-desktop-service} adds the GNOME
@@ -12695,7 +12695,10 @@ To ``add MATE'' means that @code{polkit} and
@code{dbus} are extended
appropriately, allowing MATE to operate with elevated privileges on a
limited number of special-purpose system interfaces. Additionally,
adding a service made by @code{mate-desktop-service} adds the MATE
-metapackage to the system profile.
+metapackage to the system profile. ``Adding ENLIGHTENMENT'' means that
address@hidden is extended appropriately, and several of Enlightenment's
binaries
+are set as setuid, allowing Enlightenment's screen locker and other
+functionality to work as expetected.
The desktop environments in Guix use the Xorg display server by
default. If you'd like to use the newer display server protocol
@@ -12725,6 +12728,18 @@ profile, and extends polkit with the actions from
@code{mate-settings-daemon}.
@end deffn
address@hidden {Scheme Procedure} 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}.
address@hidden deffn
+
address@hidden {Data Type} enlightenment-desktop-service-configuration
address@hidden @asis
address@hidden @code{enlightenment} (default @code{enlightenment})
+The enlightenment package to use.
address@hidden table
address@hidden deftp
+
Because the GNOME, XFCE and MATE desktop services pull in so many packages,
the default @code{%desktop-services} variable doesn't include any of
them by default. To add GNOME, XFCE or MATE, just @code{cons} them onto
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 0dada82..a9af724 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016 Sou Bunnbu <address@hidden>
;;; Copyright © 2017 Maxim Cournoyer <address@hidden>
;;; Copyright © 2017 Nils Gillmann <address@hidden>
+;;; Copyright © 2018 Efraim Flashner <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (gnu services sound)
#:use-module ((gnu system file-systems)
#:select (%elogind-file-systems))
+ #:use-module (gnu system)
#:use-module (gnu system shadow)
#:use-module (gnu system pam)
#:use-module (gnu packages glib)
@@ -45,9 +47,11 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages libusb)
#:use-module (gnu packages mate)
+ #:use-module (gnu packages enlightenment)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
+ #:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
@@ -97,6 +101,10 @@
x11-socket-directory-service
+ enlightenment-desktop-configuration
+ enlightenment-desktop-configuration?
+ enlightenment-desktop-service-type
+
%desktop-services))
;;; Commentary:
@@ -900,6 +908,60 @@ with the administrator's password."
(let ((directory "/tmp/.X11-unix"))
(mkdir-p directory)
(chmod directory #o777))))))
+
+;;;
+;;; Enlightenment desktop service.
+;;;
+
+(define-record-type* <enlightenment-desktop-configuration>
+ enlightenment-desktop-configuration make-enlightenment-desktop-configuration
+ enlightenment-desktop-configuration?
+ ;; <package>
+ (enlightenment enlightenment-package
+ (default enlightenment)))
+
+(define (enlightenment-setuid-programs enlightenment-desktop-configuration)
+ (match-record enlightenment-desktop-configuration
+ <enlightenment-desktop-configuration>
+ (enlightenment)
+ (list (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_sys")
+ (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_backlight")
+ ;; TODO: Move this binary to a screen-locker service.
+ (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_ckpasswd")
+ (file-append enlightenment
+ (string-append
+ "/lib/enlightenment/modules/cpufreq/"
+ (match (string-tokenize (%current-system)
+ (char-set-complement
(char-set #\-)))
+ ((arch "linux") (string-append "linux-gnu-"
arch))
+ ((arch "gnu") (string-append "gnu-" arch)))
+ "-"
+ (version-major+minor (package-version enlightenment))
+ "/freqset")))))
+
+(define enlightenment-desktop-service-type
+ (service-type
+ (name 'enlightenment-desktop)
+ (extensions
+ (list (service-extension dbus-root-service-type
+ (compose list
+ (package-direct-input-selector
+ "efl")
+ enlightenment-package))
+ (service-extension setuid-program-service-type
+ enlightenment-setuid-programs)
+ (service-extension profile-service-type
+ (compose list
+ enlightenment-package))))
+ (default-value (enlightenment-desktop-configuration))
+ (description
+ "Return a service that adds the @code{enlightenment} package to the system
+profile, and extends dbus with the ability for @code{efl} to generate
+thumbnails and makes setuid the programs which enlightenment needs to function
+as expected.")))
;;;
- branch master updated (89f8c2a -> d8ac798), Efraim Flashner, 2018/05/20
- 04/06: services: dbus: Search more directories for '.service' files., Efraim Flashner, 2018/05/20
- 02/06: services: Add Enlightenment desktop service.,
Efraim Flashner <=
- 03/06: services: connman: Add default configuration to the connman-service-type., Efraim Flashner, 2018/05/20
- 06/06: services: connman: Add polkit hooks for connman., Efraim Flashner, 2018/05/20
- 05/06: services: openntpd: Add openntpd to the system profile., Efraim Flashner, 2018/05/20
- 01/06: gnu: enlightenment: Fix setuid program locations., Efraim Flashner, 2018/05/20