[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using multiple manifest files

From: Chris Marusich
Subject: Re: Problem using multiple manifest files
Date: Tue, 23 Oct 2018 01:07:08 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Mikhail Kryshen <address@hidden> writes:

> Chris Marusich <address@hidden> writes:
>> Mikhail Kryshen <address@hidden> writes:
>>> (use-modules (srfi srfi-1)
>>>              ((guix ui) #:select (make-user-module)))
>>> (define (load-manifest file)
>>>   ;; Load manifest file in a fresh module with necessary imports.
>>>   (let ((module (make-user-module '((guix profiles) (gnu)))))
>>>     (save-module-excursion
>>>      (lambda _
>>>        (set-current-module module)
>>>        (load (canonicalize-path file))))))
>> Neat example!
> Thanks! 
>> But what is make-user-module doing, and is it necessary?
> I looked into the Guix source and reproduced what "guix package -m" does
> to load a manifest file.  Make-user-module procedure appear to be used
> in Guix to dynamically create modules for running user code.  I could
> have simply used "load" here, but then all the files would be loaded in
> the same environment and could potentially interfere with each other.

I see.  Thank you for the explanation!  That does indeed seem to be the


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]