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; 3+ 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] 3+ messages in thread

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

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