[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading Channels from a file
From: |
Phil Beadling |
Subject: |
Re: Loading Channels from a file |
Date: |
Sun, 17 Oct 2021 11:39:55 +0100 |
To answer my own question somewhat see below - although I need to think a
bit more my my original approach wasn't good enough - the problem I think
it my own understanding of Guile!
On Sat, 16 Oct 2021 at 22:24, Phil Beadling <phil@beadling.co.uk> wrote:
> Hi,
>
> (define my-channels2 (call-with-input-file (option-ref options 'channel
> #f) read))
>
>
Instead of calling read on the file there is a function in (guix ui) called
"load*" which will do the heavy lifting for you:
(define my-channels
(let ((file (option-ref options 'channel #f)))
(load* file (make-user-module '((guix channels))))))