unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Prepend string to "file" in G-expression
@ 2024-12-11  7:43 Marc Coquand
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Coquand @ 2024-12-11  7:43 UTC (permalink / raw)
  To: help-guix


Heya, I'm trying to grok g-expressions and setting up a small guile
program that sends an email.

I have the following

(define notify-mail-gexp
  (with-imported-modules
   '((guix build utils))
   #~(begin
       (use-modules
	(guix build utils))
       (let* ((msmtp-bin #$(file-append msmtp "/bin/msmtp"))
	      (run-number (getenv "RUN"))
	      (result (getenv "RESULT"))
	      (job-name (getenv "JOB"))
	      (password-eval-command
	       (string-append
               "--password-eval=" #$coreutils "/bin/cat"))) ;; more to come later
	 (invoke msmtp-bin
		 "--user=\"me@address\""
		 password-eval-command
		 "-t"
		 "--read-envelope-from"
		 "--set-from-header=\"auto\""
		 (result-email job-name run-number result))))))

(program-file "notify-mail" notify-mail-gexp)

What I struggle with is the correct incantation to build an argument to
invoke that looks like this:

--password-eval=/gnu/blahblah/bin/cat some-file

And I'd love any kind of directions for how I'm supposed to write this
correctly.

Thanks in advance


-- 
Marc


^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <87r06esal7.fsf@rdklein.fr>]

end of thread, other threads:[~2024-12-11 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11  7:43 Prepend string to "file" in G-expression Marc Coquand
     [not found] <87r06esal7.fsf@rdklein.fr>
2024-12-11 12:40 ` Marc Coquand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).