From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wAW1B0nHK2BpCAAA0tVLHw (envelope-from ) for ; Tue, 16 Feb 2021 13:23:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AEWeA0nHK2DIbwAA1q6Kng (envelope-from ) for ; Tue, 16 Feb 2021 13:23:21 +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 BC2A51977D for ; Tue, 16 Feb 2021 14:23:20 +0100 (CET) Received: from localhost ([::1]:33156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC0Jz-0003mI-QC for larch@yhetil.org; Tue, 16 Feb 2021 08:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC0Jj-0003kf-6e for guix-patches@gnu.org; Tue, 16 Feb 2021 08:23:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lC0Ji-0002NK-W0 for guix-patches@gnu.org; Tue, 16 Feb 2021 08:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lC0Ji-00053L-SS for guix-patches@gnu.org; Tue, 16 Feb 2021 08:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46560] [PATCH 1/2] gnu: services: Add activate script to the profile system directory. References: <87czx06ubt.fsf@waegenei.re> In-Reply-To: <87czx06ubt.fsf@waegenei.re> Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Feb 2021 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46560@debbugs.gnu.org Received: via spool by 46560-submit@debbugs.gnu.org id=B46560.161348176919369 (code B ref 46560); Tue, 16 Feb 2021 13:23:02 +0000 Received: (at 46560) by debbugs.gnu.org; 16 Feb 2021 13:22:49 +0000 Received: from localhost ([127.0.0.1]:39821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC0JU-00052L-Vc for submit@debbugs.gnu.org; Tue, 16 Feb 2021 08:22:49 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:50381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC0JS-00051z-Gy for 46560@debbugs.gnu.org; Tue, 16 Feb 2021 08:22:47 -0500 X-Originating-IP: 31.170.9.129 Received: from localhost (reverse4.evolix.net [31.170.9.129]) (Authenticated sender: brice@waegenei.re) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id BCFDEFF80D for <46560@debbugs.gnu.org>; Tue, 16 Feb 2021 13:22:39 +0000 (UTC) From: Brice Waegeneire Date: Tue, 16 Feb 2021 14:22:34 +0100 Message-Id: <20210216132235.15811-1-brice@waegenei.re> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 4.14 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Migadu-Queue-Id: BC2A51977D X-Spam-Score: 4.14 X-Migadu-Scanner: scn1.migadu.com X-TUID: fpG6JJnvGxh1 * gnu/services.scm (activation-profile-entry): New procedure... (activation-service-type): ... use it. --- gnu/services.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/services.scm b/gnu/services.scm index 13259dfaee..ddd1bac30c 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -617,13 +617,21 @@ ACTIVATION-SCRIPT-TYPE." "Return a gexp that runs the activation script containing GEXPS." #~(primitive-load #$(activation-script gexps))) +(define (activation-profile-entry gexps) + "Return, as a monadic value, an entry for the activation script in the +system directory." + (mlet %store-monad ((activate (lower-object (activation-script gexps)))) + (return `(("activate" ,activate))))) + (define (second-argument a b) b) (define activation-service-type (service-type (name 'activate) (extensions (list (service-extension boot-service-type - gexps->activation-gexp))) + gexps->activation-gexp) + (service-extension system-service-type + activation-profile-entry))) (compose identity) (extend second-argument) (description -- 2.30.1