From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iD2SJQ1zZ2WplQAA9RJhRA:P1 (envelope-from ) for ; Wed, 29 Nov 2023 18:21:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iD2SJQ1zZ2WplQAA9RJhRA (envelope-from ) for ; Wed, 29 Nov 2023 18:21:17 +0100 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 DA023418CF for ; Wed, 29 Nov 2023 18:21:16 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701278477; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=ZbS1plf7VyJ5a6xi9YNX0BhLJ5lQ1FQ+TlQEOXl6/rQ=; b=o12BD7V+ZJQOlQ4Hwm6a/1yqvSxL9J1p8uzcvnafqKH1YlmN3PB/qSueByJzx3nFMT2UQl XXCKLaoorpuVNRPPHnOMGDafx8g6FgfLjuJGHWHUt1O7pC7JuN2Uy4dNJiAED47oCd92Dz sO8sVBGUKAzKWm2gQGQE2EmpwZFbEspXL08aI+6mjJ6Zx9e0RTCf5Zrxbr/euGgItHN8jS vD/CHAD4bMhlM6Q7imkcDuwYfdFbIL7U9D2CZKv53DmMh9uPRCR5+sjxmKZ0Hjcalh1GQK qbaEfvqgYTUomjY5MNBn/8y3W5wOq/QWnGWeWXLqnljc9Wb0KmJJeALvQ8iN3A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701278477; a=rsa-sha256; cv=none; b=Aj+6/yDqJKQ1Wn/yor7Z3INglGnr6j8CYejHyOFvYCQEQccHEcR4mI9NeP+L1D6cyQrBnq RCK9e45ZWBvjpP0UbEB6ZD2kSfL6N6xQn3POAG8ttmREhy4UUa/I+xlc3YvOfy2+oFkQ0g 3Io3GUPfemT2r0oRpkoru7NK3sSSc66ntBmjB4TznyPX/2/J+rYIWslSyHUckZ+YMJyQwq /UJoIOGmJoMwzX+F6Odrs/2IbnVJITd19XNcMZqfT6Lo1GqOoqEHyl1MbC5HniqyDD3wpr m7btSI0Lkmoo/nW3QQaog8MtMsh2P6gCtgJPrqPh5u5gGb5Qpf0+ZtDzNvrgIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8OF7-00051y-9I; Wed, 29 Nov 2023 12:20:57 -0500 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 1r8OF5-00051q-7l for guix-patches@gnu.org; Wed, 29 Nov 2023 12:20:55 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8OF5-0006Gi-02 for guix-patches@gnu.org; Wed, 29 Nov 2023 12:20:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8OFC-0002Kq-6v for guix-patches@gnu.org; Wed, 29 Nov 2023 12:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66557] [PATCH] home: services: Add goimapnotify service. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Nov 2023 17:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66557 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nils Landt Cc: 66557@debbugs.gnu.org Received: via spool by 66557-submit@debbugs.gnu.org id=B66557.17012784508948 (code B ref 66557); Wed, 29 Nov 2023 17:21:02 +0000 Received: (at 66557) by debbugs.gnu.org; 29 Nov 2023 17:20:50 +0000 Received: from localhost ([127.0.0.1]:50998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8OF0-0002KG-7r for submit@debbugs.gnu.org; Wed, 29 Nov 2023 12:20:50 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:42252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8OEy-0002K6-4x for 66557@debbugs.gnu.org; Wed, 29 Nov 2023 12:20:48 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id A0E9F20A0B; Wed, 29 Nov 2023 18:20:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id EE46380067; Wed, 29 Nov 2023 18:20:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fCZvE5ygXrNY; Wed, 29 Nov 2023 18:20:34 +0100 (CET) Received: from [192.168.1.116] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 61FCA80060; Wed, 29 Nov 2023 18:20:34 +0100 (CET) Message-ID: <52947fbf-42c2-44e5-adf4-0b1bd66f56c0@makinata.eu> Date: Wed, 29 Nov 2023 17:20:09 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US References: <1635724009.68147.1700997260830@office.mailbox.org> From: Bruno Victal In-Reply-To: <1635724009.68147.1700997260830@office.mailbox.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------I9T01YonLOdKc8NXXbadyF8S" 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -8.21 X-Spam-Score: -8.21 X-Migadu-Queue-Id: DA023418CF X-TUID: 6zYy3/jPGVVJ This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------I9T01YonLOdKc8NXXbadyF8S Content-Type: multipart/mixed; boundary="------------igvkadOhEDLvz9lzF4WijUYt"; protected-headers="v1" From: Bruno Victal To: Nils Landt Cc: 66557@debbugs.gnu.org Message-ID: <52947fbf-42c2-44e5-adf4-0b1bd66f56c0@makinata.eu> Subject: Re: [bug#66557] [PATCH] home: services: Add goimapnotify service. References: <1635724009.68147.1700997260830@office.mailbox.org> In-Reply-To: <1635724009.68147.1700997260830@office.mailbox.org> --------------igvkadOhEDLvz9lzF4WijUYt Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Nils, On 2023-11-26 11:14, Nils Landt wrote: > Bruno: >> This isn't needed, fields whose maybe-values are unset don't call the >> serializing procedures. >=20 > combined with >=20 >> You can use 'serialize-configuration' instead which accounts for the u= nset maybe-values. >=20 > I put some time into this, but I don't see how serialize-configuration,= which returns a gexp including string-append, could be used to turn a co= nfiguration record into the format required by guile-json. Right, I missed that you are synthesizing a list for scm->json, you will need to make use of the lower-level transducers in (gnu services configuration). The fstrim-service-type in (gnu services linux) provides a simple example of its use though for your case you might be looking at something like: --8<---------------cut here---------------start------------->8--- ;; note: untested snippet (define (goimapnotify-files config) (match-record config (accounts) (map (match-lambda ((path account) (list path (computed-file (string-append "mail-imapnotify-config-" (goimapnotify-account-host account)) (with-extensions (list guile-json-4) #~(begin (use-modules (json builder)) (with-output-to-file #$output (lambda () (scm->json (list #$@(list-transduce (base-transducer account) rcons goimapnotify-account-fields))) #:pretty #t)))))))) accounts))) --8<---------------cut here---------------end--------------->8--- --=20 Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. --------------igvkadOhEDLvz9lzF4WijUYt-- --------------I9T01YonLOdKc8NXXbadyF8S Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTAPCseV0HOaN0YFheobOGDL+spVQUCZWdyywAKCRCobOGDL+sp Vc+fAQCgT2X2e25LJsMdp1B9SNr2SLSdurGU35QuEST69UsfywEAtWp6Xes5PE+h x4v92ETD+vm8kbYQpyIN6DWnaOIR1wQ= =eMJU -----END PGP SIGNATURE----- --------------I9T01YonLOdKc8NXXbadyF8S--