[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/04: services: xorg: Filter modules based on system
From: |
guix-commits |
Subject: |
04/04: services: xorg: Filter modules based on system |
Date: |
Sat, 15 Feb 2020 18:03:12 -0500 (EST) |
niedzejkob pushed a commit to branch master
in repository guix.
commit 779d96c9b0ee38cbaca9f8577e6cc7f907fb29cb
Author: shtwzrd <address@hidden>
AuthorDate: Sun Feb 9 21:31:09 2020 +0000
services: xorg: Filter modules based on system
Fixes <https://bugs.gnu.org/39402>.
Reported by shtwzrd <address@hidden>.
* gnu/services/xorg.scm (xorg-configuration):
Apply a filter over %default-xorg-modules packages, excluding
those for which the %current-system is not among the package's
supported-systems.
This patch makes it possible to use xorg-configuration on systems
other than x86_64 and i686, as without it, xf86-video-intel would
be pulled in on the unsupported architecture and fail.
Signed-off-by: Jakub Kądziołka <address@hidden>
---
gnu/services/xorg.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 73a32e4..df5c350 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2018, 2019 Timothy Sample <address@hidden>
;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <address@hidden>
;;; Copyright © 2019 Tim Gesthuizen <address@hidden>
+;;; Copyright © 2020 shtwzrd <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -152,7 +153,12 @@
xorg-configuration make-xorg-configuration
xorg-configuration?
(modules xorg-configuration-modules ;list of packages
- (default %default-xorg-modules))
+ ; filter out modules not supported on current system
+ (default (filter
+ (lambda (p)
+ (member (%current-system)
+ (package-supported-systems p)))
+ %default-xorg-modules)))
(fonts xorg-configuration-fonts ;list of packges
(default %default-xorg-fonts))
(drivers xorg-configuration-drivers ;list of strings