From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0KkSN3KagWaicwEA62LTzQ:P1 (envelope-from ) for ; Sun, 30 Jun 2024 17:48:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0KkSN3KagWaicwEA62LTzQ (envelope-from ) for ; Sun, 30 Jun 2024 19:48:35 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bT7blkcK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719769714; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FK8XiK6cdfly4rQDIBho3h2FpgrYdiQPO3/lX4aUK+Q=; b=Ogo6R4aAHphpMa0lYGaqLiRNDsfoMe91tYufcyR5GwAwxut0eyzb0fIhwgfQDM909qMISu R/EBTzcjmcnbOiNAWAqyug7FXBELSyqMNRLrj09JGsyhMUwAutE9mX4zXZAPVYGonl1Ovi vyyRus9+YmV79473fr4brmrIHdedtQ7IXt0wsz3K1LzdDintuLZpXyl5HFsLa5uozU3c0y yX2mORb6TC4xz3WtA+z2GpccXvLWc7pfAOIrLEinYbrW8t3G8Oc32WPxQBbJ+9RwMo0pxt 4WDDSV+6AeImO1HWOK32hOh1qkJPLrVBfzViDkWdTJ/wZn9Ut3GX5tea+URMbw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719769714; a=rsa-sha256; cv=none; b=nJNTwhzzKurgzPeFyN0iylRY6zGxwpWYgu6lmvWOaIAJyc+ToWaNS74+IfmKNy4kYuxi3r js9MR/5yivbZTlqD2NiD599V7m6MFu9Hfw8R7rLh6Me1CXIU3zKAAB9A042U8OobafQfn6 qKClR5ypP4wjfnDV4GVWh/3YBZ1pr3ThuAC5Eedjg+blQUUeMUxhFmBtoZxnaC/jflmY55 MNEqFgj0fmzejzZLXjq7qj5PJ8KG1MLvBMhJO5vBBxDdtXFFQoXoo6t40lfiiGJnxS0ZPS LE9ilLA9KYlD3YjH/9uRGWy34olXKnqjxjxEyR117mBw2svFniFPQ8JCYmkYgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bT7blkcK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" 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 A7AE2ABCA for ; Sun, 30 Jun 2024 19:48:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNyeb-0001eV-Hr; Sun, 30 Jun 2024 13:47:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNxBn-00057q-0k for guix-devel@gnu.org; Sun, 30 Jun 2024 12:14:07 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNxBl-0004o4-BX for guix-devel@gnu.org; Sun, 30 Jun 2024 12:14:06 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a729d9d7086so540076166b.0 for ; Sun, 30 Jun 2024 09:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719764042; x=1720368842; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FK8XiK6cdfly4rQDIBho3h2FpgrYdiQPO3/lX4aUK+Q=; b=bT7blkcKIYVCf2YKppx5+l1XxwdtKmz4isC7jVhPPfDOTwEeZcSLs9GRzBPS2NC0A7 PbZX+OHlbaKXM7uYFkT+zV/eDtxiNJD275q++qWBfoA+velU2HNhTmjWONGuiXrvu0xP W1LPfo1i0k5uDbaJUuEhBzBepv4OJUMzmVlVyZ4Ah+wIDWZltRHtmzKLZDbt5kxgsv1n GSsHl0jpGrYvEXH7Zn9et+ms7Qiq5CPYe12l4uS122ZtPnDX5/HypaUXmvQ+EB4nlVkg iZdiPY2vptfJBQqNn3yGuJESPIAhv4PDH3G74Dl3mF1gl6SjZovtBSKR/43dnJO8999k 9JZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719764042; x=1720368842; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FK8XiK6cdfly4rQDIBho3h2FpgrYdiQPO3/lX4aUK+Q=; b=lQYHVNV/g/25sFKM9DWIiTHePhuuxiADd1PRe+WRzDHHl/6uC0H44bjHjSwOjg56MT r9IZj5KKHviFIWjl0oWXuM2bnxdMG5IDPTG1hZr5APQtzJDzw66WEX0hcEiHyeQt3H+U /1uRQHcpaqurV4H36Jaf4ciZ/aHGBriPpUva41MvHXMX73zbxyPI8EhimRro5bSfzzrM OyZnrKpyPhyPMKHQKzzXfj8LGY/GN52jDC2rfnF6CjtFRvmdEgMhrUszHIiBQH9VwPfo bOZFCZ0JcCBALilvRGOMxTKWoGy6bAQrr4ANwkV4ut855TWbUNy8gFP9Z9UjI2EHi4lK x8rA== X-Gm-Message-State: AOJu0Yyyu7XX3AxEVxoYDOONuooApudRlGLD64YhFNhnbJfhrzvNbxuA B77rK9DC4pzrJzv657nfXF/97gkUnGXxSaUTQxcRpSm7dLm1rI6yOOQrPg== X-Google-Smtp-Source: AGHT+IHpNX92QPQVDYhhmIqOd/KF4tzAUNRPG7G+EwKoeStdUH+Pc9WxxKWZXsFblyXsoI01mfXe9Q== X-Received: by 2002:a17:906:bc52:b0:a6e:f869:d718 with SMTP id a640c23a62f3a-a75138b7d9bmr250245066b.21.1719764042021; Sun, 30 Jun 2024 09:14:02 -0700 (PDT) Received: from lelap.lan (2a00-1f40-b161-2920--477.pool6.panelnet.hu. [2a00:1f40:b161:2920::477]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf1bc08sm252509666b.28.2024.06.30.09.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 09:14:01 -0700 (PDT) From: attila.lendvai@gmail.com X-Google-Original-From: attila@lendvai.name To: guix-devel@gnu.org Cc: Attila Lendvai Subject: [PATCH shepherd] service: Add custom printer for . Date: Sun, 30 Jun 2024 18:12:59 +0200 Message-ID: <20240630161303.22507-2-attila@lendvai.name> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=attila.lendvai@gmail.com; helo=mail-ej1-x635.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 30 Jun 2024 13:47:43 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.22 X-Spam-Score: -6.22 X-Migadu-Queue-Id: A7AE2ABCA X-Migadu-Scanner: mx11.migadu.com X-TUID: Gpg07a8FAZeZ From: Attila Lendvai * modules/shepherd/service.scm (print-service): New function. --- modules/shepherd/service.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm index 8c9d1c6..b018e39 100644 --- a/modules/shepherd/service.scm +++ b/modules/shepherd/service.scm @@ -34,6 +34,7 @@ #:use-module (fibers timers) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module ((srfi srfi-35) #:hide (make-condition)) @@ -358,6 +359,11 @@ Log abnormal termination reported by @var{status}." ;; requests such as 'start' and 'stop' on this channel. (control %service-control set-service-control!)) +(define (print-service service port) + (format port "#" (service-canonical-name service))) + +(set-record-type-printer! print-service) + (define* (service provision #:key (requirement '()) base-commit: 9f2d5ea865a7a769fe2c7ef5cd13ff84cf277ec5 -- 2.45.2