GNU bug report logs - #77647
[PATCH] home: mail: Add G-expression support to msmtp configuration.

Previous Next

Package: guix-patches;

Reported by: Romain GARBAGE <romain.garbage <at> inria.fr>

Date: Tue, 8 Apr 2025 14:09:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Romain GARBAGE <romain.garbage <at> inria.fr>
Subject: bug#77647: closed (Re: [bug#77647] [PATCH] home: mail: Add
 G-expression support to msmtp configuration.)
Date: Wed, 09 Apr 2025 09:58:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#77647: [PATCH] home: mail: Add G-expression support to msmtp configuration.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 77647 <at> debbugs.gnu.org.

-- 
77647: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77647
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Romain GARBAGE <romain.garbage <at> inria.fr>
Cc: Tanguy Le Carrour <tanguy <at> bioneland.org>,
 Janneke Nieuwenhuizen <janneke <at> gnu.org>, 77647-done <at> debbugs.gnu.org,
 Andrew Tropin <andrew <at> trop.in>
Subject: Re: [bug#77647] [PATCH] home: mail: Add G-expression support to
 msmtp configuration.
Date: Wed, 09 Apr 2025 11:54:10 +0200
Romain GARBAGE <romain.garbage <at> inria.fr> skribis:

> * gnu/home/services/mail.scm (string-or-gexp?): New variable.
> (maybe-string-or-gexp): New record type
> (msmtp-configuration-serialize-string-or-gexp): New variable.
> (msmtp-configuration) [password-eval]: Change type.
>
> Change-Id: Id3016956250c447b301b40f29a6509d57058be49

Pushed as c88f98bb3ca2616baea6b1e452cc900cc9c87503 with minor edits to
the commit log.  Thanks! :-)

[Message part 3 (message/rfc822, inline)]
From: Romain GARBAGE <romain.garbage <at> inria.fr>
To: guix-patches <at> gnu.org
Cc: ludovic.courtes <at> inria.fr, Romain GARBAGE <romain.garbage <at> inria.fr>
Subject: [PATCH] home: mail: Add G-expression support to msmtp configuration.
Date: Tue,  8 Apr 2025 16:07:00 +0200
* gnu/home/services/mail.scm (string-or-gexp?): New variable.
(maybe-string-or-gexp): New record type
(msmtp-configuration-serialize-string-or-gexp): New variable.
(msmtp-configuration) [password-eval]: Change type.

Change-Id: Id3016956250c447b301b40f29a6509d57058be49
---
 gnu/home/services/mail.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/home/services/mail.scm b/gnu/home/services/mail.scm
index 5445c82c67..78d614dc84 100644
--- a/gnu/home/services/mail.scm
+++ b/gnu/home/services/mail.scm
@@ -49,9 +49,14 @@ (define-module (gnu home services mail)
             msmtp-account-name
             msmtp-account-configuration))
 
+(define (string-or-gexp? obj)
+  (or (string? obj)
+      (gexp? obj)))
+
 (define-maybe string (prefix msmtp-configuration-))
 (define-maybe boolean (prefix msmtp-configuration-))
 (define-maybe integer (prefix msmtp-configuration-))
+(define-maybe string-or-gexp (prefix msmtp-configuration-))
 
 ;; Serialization of 'msmtp'.
 (define (uglify-symbol field-name)
@@ -68,6 +73,9 @@ (define (msmtp-configuration-serialize-boolean field-name value)
 (define (msmtp-configuration-serialize-string field-name value)
   #~(string-append #$(uglify-symbol field-name) " " #$value "\n"))
 
+(define msmtp-configuration-serialize-string-or-gexp
+  msmtp-configuration-serialize-string)
+
 (define (msmtp-configuration-serialize-maybe-string-no-underscore field-name value)
   #~(if #$(maybe-value-set? value)
       (string-append
@@ -148,7 +156,7 @@ (define-configuration msmtp-configuration
     "Set the envelope-from address.")
 
   (password-eval
-    maybe-string
+    maybe-string-or-gexp
     "Set the password for authentication to the output (stdout) of the command cmd."
     (serializer msmtp-configuration-serialize-maybe-string-no-underscore))
 

base-commit: 61fe7d1749720d4e6f0feb00a8baa8ca1606e1a4
-- 
2.49.0




This bug report was last modified 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.