From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OKfrNGOnrl/4dQAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 15:33:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mLOrMGOnrl8iYgAAbx9fmQ (envelope-from ) for ; Fri, 13 Nov 2020 15:33:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 72793940366 for ; Fri, 13 Nov 2020 15:33:55 +0000 (UTC) Received: from localhost ([::1]:45620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdb5G-00041g-FA for larch@yhetil.org; Fri, 13 Nov 2020 10:33:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdb1Z-00028z-Dc for guix-patches@gnu.org; Fri, 13 Nov 2020 10:30:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdb1W-0007jU-R3 for guix-patches@gnu.org; Fri, 13 Nov 2020 10:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdb1W-0004Hf-NA for guix-patches@gnu.org; Fri, 13 Nov 2020 10:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44621] [PATCH] services: Add 'xorg-server-service-type'. Resent-From: iyzsong@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Nov 2020 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44621 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44621@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160528136116390 (code B ref -1); Fri, 13 Nov 2020 15:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Nov 2020 15:29:21 +0000 Received: from localhost ([127.0.0.1]:49106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdb0o-0004GG-WC for submit@debbugs.gnu.org; Fri, 13 Nov 2020 10:29:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:57202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdZrk-00023C-Pz for submit@debbugs.gnu.org; Fri, 13 Nov 2020 09:15:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdZrk-0007au-Kk for guix-patches@gnu.org; Fri, 13 Nov 2020 09:15:52 -0500 Received: from mail-oln040092253044.outbound.protection.outlook.com ([40.92.253.44]:6182 helo=APC01-SG2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdZrf-0006NY-Cr for guix-patches@gnu.org; Fri, 13 Nov 2020 09:15:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyGGLCYGDYr3DpWlr86g6t80No0bJxbMRkolzu1Gl79xiYpRR4g+lsMEmkPTmMlQchXoj+Ed2HJoJTtdGYKhJYyy59PbJZC7sdkKMuen9M+BJD8/+RH3Q0NUUZsC8jbIteHrU0XqK/yEHLI8BBY3k+F8KiEi0XbQpMWEXZMN0ib4fETNlYg1cW0Zcpn93ZR5XOsIP6LKp6+P4dJBcaRNXTcagVpNAMLoopDjQaQ/S3IR0YH5fJYL2IMe9cUHSt3WV9sES4rV0DOHeymQBvuWAQrbtNuEuf6BoXFbwMgStjIs1qbq5v0hhLeagZF2XBZ7C4RG5lD+iR/stMyyIx6C4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fhEqoCdLU9v4q5pHCmP7eL3xVVuqb9ZnPE+79/Zuos0=; b=RQeHvyg7kLoX6unwUii9jki/+nFZNREGO/QkA2YsmvUggCCkfj6Z3TIylIdaOrcPhTWQRWHhVl0KI843jjdfJ9ais+KlGXbMpFNKYfoMFJuZllIDmh8muufgKOYFRNqNNQlgYLSMLS7x/XpczrYCNDvH0NNL/p4SHgosLqKHiKYpbJxvrBHLOfhPJtEQqHJqim//SIn88vxKwa5xGjodtZV0QRQF+jnhUCGLyF/+PKXTRu8BDAF98XQ5KEekA6XErj0EJqpsODgUrYjAJ7bZmoKk0m9vlAEJSn1dbn/fmEQUBQ+rVKPPYTaPL7v37eGxz6EQ6Q6j2V/eAhqWErPe6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fhEqoCdLU9v4q5pHCmP7eL3xVVuqb9ZnPE+79/Zuos0=; b=tR70BoV+qxlcSJyp3Rvv/Db4LA+nVf5cx1USjSrb6FEkJzGTt7v0MeRIZ2FF9mihPjxzPvUWolWhnzfZGYUqdEBYztfyTf5IqSJ2Ae6QCsHIfnbz0mfQXLL6J2OQhpTDa05mJ/nwhFu285df6UivbEhKEjZwvK4reUpJiS1tNYneq6JvWq0wjamfO+kboQ+XVgiGBSUZhvQ5M4kqoaeExwQovaCC0Hz/+7Nbisd1MAsmfz/yCao2BJyFGoRhgI6sO1PGw60cu4sBpr6uxfsTw1C0du6zGNU158fyOMSQfLmz9E1zr/VhMUoTTVIgFnnqNk6qdqAJBOSon68waMBONQ== Received: from HK2APC01FT035.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::50) by HK2APC01HT207.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::442) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.22; Fri, 13 Nov 2020 14:00:36 +0000 Received: from OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM (2a01:111:e400:7ebc::47) by HK2APC01FT035.mail.protection.outlook.com (2a01:111:e400:7ebc::182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.22 via Frontend Transport; Fri, 13 Nov 2020 14:00:36 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:650FD71178376088056B322214D5C28E4E5BB969FDAF56D47A90E2A7328330A7; UpperCasedChecksum:E0E9A5FE066606E92FA91886EAF24D140010FD9889636AEC2E4DE585D9ADB28E; SizeAsReceived:8501; Count:45 Received: from OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM ([fe80::3813:6edd:69a0:95e]) by OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM ([fe80::3813:6edd:69a0:95e%7]) with mapi id 15.20.3541.025; Fri, 13 Nov 2020 14:00:36 +0000 From: iyzsong@outlook.com Date: Fri, 13 Nov 2020 22:00:33 +0800 Message-ID: X-Mailer: git-send-email 2.29.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TMN: [fkWuERq9EcC+VCklvIQd2Rr8w+rZK/tFjCNqoLsFgsXitlq9dXBFE9gLQ51o8edy] X-ClientProxiedBy: BYAPR04CA0012.namprd04.prod.outlook.com (2603:10b6:a03:40::25) To OS0P286MB0178.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:95::7) X-Microsoft-Original-Message-ID: <20201113140033.24073-1-iyzsong@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2409:8a62:37c:240:2f1:f5ff:fe18:6bb) by BYAPR04CA0012.namprd04.prod.outlook.com (2603:10b6:a03:40::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25 via Frontend Transport; Fri, 13 Nov 2020 14:00:35 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: f986ed90-8786-4e16-d1bc-08d887dc7ee6 X-MS-TrafficTypeDiagnostic: HK2APC01HT207: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X8IlrwgV94lLB1rN9DUhaym5e4O6Fucz/KB6iSaYUjfTlg9kbDsAA38HMJWGL/d7OCZZQYG1HSpTK8vMyn4MAIq7AyViF/V/vFb507PP4aHQWQjPFJHTbMF4zmJYEnFi9GM1sR8SOfMEuWh/XiZ6kFB0swnSYOzN1NGQQO5841COauVJMcn2xu+iteEiemLQgasVUw0plKW6k3SZg9jHLQ== X-MS-Exchange-AntiSpam-MessageData: d6AgPPshiFQD+tupEOmJVn4NQf9iLk6nMkYFTV0VvxOqnDPbdpZZqrIUGXj7zbYd1eKuA9uI1Mp8Ogr5JKODfvApZKHQnd/bld0GYWVWbRNMwIw+D4OjpGUSauKEqp+YAb6LUDb4I5I5Zcz7vD/FFqMC8qfzq6xmyg5PSp02PX2K6r5Q/N2hndFPv6beJUbwmec+NOs7W9i93yDzdfALxA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f986ed90-8786-4e16-d1bc-08d887dc7ee6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2020 14:00:36.8050 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HK2APC01FT035.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT207 Received-SPF: pass client-ip=40.92.253.44; envelope-from=iyzsong@outlook.com; helo=APC01-SG2-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/13 09:15:44 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.4 (/) X-Mailman-Approved-At: Fri, 13 Nov 2020 10:29:18 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=outlook.com header.s=selector1 header.b=tR70BoV+; arc=reject (signature check failed: fail, {[1] = sig:microsoft.com:reject}); dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 2.09 X-TUID: po3Hi5GeEp3i From: 宋文武 * 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 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