GNU bug report logs -
#44621
[PATCH] services: Add 'xorg-server-service-type'.
Previous Next
Reported by: iyzsong <at> outlook.com
Date: Fri, 13 Nov 2020 15:30:02 UTC
Severity: normal
Tags: patch
Done: 宋文武 <iyzsong <at> outlook.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#44621: [PATCH] services: Add 'xorg-server-service-type'.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 44621 <at> debbugs.gnu.org.
--
44621: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44621
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Pushed, close now.
[Message part 3 (message/rfc822, inline)]
From: 宋文武 <iyzsong <at> member.fsf.org>
* gnu/services/xorg.scm (xorg-server-service-type): New service type.
(xorg-server-profile-service): New procedure.
---
gnu/services/xorg.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 4590709187..33c3102514 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -45,6 +45,7 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu system shadow)
+ #:use-module (guix build-system trivial)
#:use-module (guix gexp)
#:use-module (guix store)
#:use-module (guix packages)
@@ -70,6 +71,7 @@
xorg-wrapper
xorg-start-command
xinitrc
+ xorg-server-service-type
%default-slim-theme
%default-slim-theme-name
@@ -483,6 +485,40 @@ a `service-extension', as used by `set-xorg-configuration'."
(xorg-configuration xorg-configuration))
config)))))))
+(define (xorg-server-profile-service config)
+ ;; XXX: profile-service-type only accepts <package> objects.
+ (list
+ (package
+ (name "xorg-wrapper")
+ (version (package-version xorg-server))
+ (source (xorg-wrapper config))
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (symlink source (string-append bin "/X"))
+ #t))))
+ (home-page (package-home-page xorg-server))
+ (synopsis (package-synopsis xorg-server))
+ (description (package-description xorg-server))
+ (license (package-license xorg-server)))))
+
+(define xorg-server-service-type
+ (service-type
+ (name 'xorg-server)
+ (extensions
+ (list (service-extension profile-service-type
+ xorg-server-profile-service)))
+ (default-value (xorg-configuration))
+ (description "Add @command{X} to the system profile, to be used with
+@command{startx}.")))
+
;;;
;;; SLiM log-in manager.
--
2.29.1
This bug report was last modified 4 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.