From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WMI/HkOFQGAraAAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 06:59:15 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wJPYGUOFQGD1eQAAbx9fmQ (envelope-from ) for ; Thu, 04 Mar 2021 06:59:15 +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 aspmx2.migadu.com (Postfix) with ESMTPS id C27FB20A9C for ; Thu, 4 Mar 2021 07:59:14 +0100 (CET) Received: from localhost ([::1]:44448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHhx3-0006ur-W2 for larch@yhetil.org; Thu, 04 Mar 2021 01:59:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHhws-0006u7-Jm for guix-patches@gnu.org; Thu, 04 Mar 2021 01:59:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHhws-0003zu-CK for guix-patches@gnu.org; Thu, 04 Mar 2021 01:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHhws-0000tW-C1 for guix-patches@gnu.org; Thu, 04 Mar 2021 01:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46560] [PATCH v2 1/2] gnu: services: Add activate script to the profile system directory. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Mar 2021 06:59: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 Cc: ludo@gnu.org Received: via spool by 46560-submit@debbugs.gnu.org id=B46560.16148410883361 (code B ref 46560); Thu, 04 Mar 2021 06:59:02 +0000 Received: (at 46560) by debbugs.gnu.org; 4 Mar 2021 06:58:08 +0000 Received: from localhost ([127.0.0.1]:57524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHhw0-0000s4-G1 for submit@debbugs.gnu.org; Thu, 04 Mar 2021 01:58:08 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:48415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHhvy-0000rS-Sf for 46560@debbugs.gnu.org; Thu, 04 Mar 2021 01:58:07 -0500 X-Originating-IP: 176.181.186.101 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@waegenei.re) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id D4DD0FF805; Thu, 4 Mar 2021 06:57:59 +0000 (UTC) From: Brice Waegeneire Date: Thu, 4 Mar 2021 07:57:53 +0100 Message-Id: <20210304065754.18619-2-brice@waegenei.re> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304065754.18619-1-brice@waegenei.re> References: <87czx06ubt.fsf@waegenei.re> <20210304065754.18619-1-brice@waegenei.re> 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614841155; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Bk00PySH7dxK/cAyTjjcHYdM3JqENhrDQQhXHFW9tGc=; b=LiuLwJGdML32wZ8FvIghAKaXwGxdm/HlT5S2BlGFabajxYNKIbsKmXO1Vf2o8T6zG4Q1Ga XharAVZklDrWccEkyuOvciQSUmTC3DWdinaJbFrzKCOzhNBmdBM4vVrfLUd3hMMM8UCmyA /6vinKtqBjspKZfm/eiOo+JKjfRNraDLL2P581PCUSbb/52pHid4y9F3i0QQZ/zixi3kOG yx627KuRUCRy5L5Hh4gexdaR8N7yyxOP1dQSt5llz3AhUHi/GIkvs9qBhZk8LYs2977h+c hI4GlTdrM3sc7mJelRci8H9KvFgm6T4RZl0nuXwuus4CdVx4q3i846vbkJSHKA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614841155; a=rsa-sha256; cv=none; b=sbiC186Cix0lXXysuVtFLOqt3lGA1lTy2wpUnph7GQKJ8IkBFs5saSTw4zT2RXhAhfo34I XnTEvMnpgUbQrCUvjhUxHLMWTwTPDKL/TsmuAYDCBVibbw5n1lovU3vfXWn5XWacg1AXmz T6Jo0OLJiLCtlM3hBRBsJon1A0LCE/Jbnn5EEj0/5ZtF1qNQ99NPVfADeVKaQ2UkCMKjXW 6bK6mXR9tJ8yObeJ+IRbjFerJUu/ir3dJM9enrtr652sSJABfAZ2zbgKmA7TPdyalajgcP 7FNLIwLTjOHke7pXo8HuB2bTlmHlDPxTruAVVwxqwKTSNnzWNzcEdBMSFjEcOw== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.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-Spam-Score: 2.64 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.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: C27FB20A9C X-Spam-Score: 2.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: jn1rtRS+rCwz * 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