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

Reply via email to