mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
environment: Export 'load-manifest'.
* guix/scripts/environment.scm (load-manifest): New procedure. (options/resolve-packages): Use it.
This commit is contained in:
parent
f54f2aa9df
commit
6fed836a6f
1 changed files with 7 additions and 2 deletions
|
@ -56,6 +56,7 @@ (define-module (guix scripts environment)
|
|||
#:use-module (srfi srfi-37)
|
||||
#:use-module (srfi srfi-98)
|
||||
#:export (assert-container-features
|
||||
load-manifest
|
||||
guix-environment
|
||||
guix-environment*
|
||||
show-environment-options-help
|
||||
|
@ -285,6 +286,11 @@ (define same-key? (cut eq? key <>))
|
|||
(_ memo)))
|
||||
'() alist))
|
||||
|
||||
(define (load-manifest file) ;TODO: factorize
|
||||
"Load the user-profile manifest (Scheme code) from FILE and return it."
|
||||
(let ((user-module (make-user-module '((guix profiles) (gnu)))))
|
||||
(load* file user-module)))
|
||||
|
||||
(define (options/resolve-packages store opts)
|
||||
"Return OPTS with package specification strings replaced by manifest entries
|
||||
for the corresponding packages."
|
||||
|
@ -331,8 +337,7 @@ (define (packages->outputs packages mode)
|
|||
(let ((module (make-user-module '())))
|
||||
(packages->outputs (load* file module) mode)))
|
||||
(('manifest . file)
|
||||
(let ((module (make-user-module '((guix profiles) (gnu)))))
|
||||
(manifest-entries (load* file module))))
|
||||
(manifest-entries (load-manifest file)))
|
||||
(_ '()))
|
||||
opts)
|
||||
manifest-entry=?)))
|
||||
|
|
Loading…
Reference in a new issue