diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-03-31 12:12:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-04 22:58:03 +0200 |
commit | 6fed836a6f9b8fb63ba067d0523942119687ce0b (patch) | |
tree | 8c62a2f24840b269d7c282c60035f0f90dc2ec91 | |
parent | f54f2aa9df5047b348ca104f5145af50c1a482f6 (diff) | |
download | guix-6fed836a6f9b8fb63ba067d0523942119687ce0b.tar.gz |
environment: Export 'load-manifest'.
* guix/scripts/environment.scm (load-manifest): New procedure. (options/resolve-packages): Use it.
-rw-r--r-- | guix/scripts/environment.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index ec071402f4..07b54cd89b 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -56,6 +56,7 @@ #: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 @@ use '--preserve' instead~%")) (_ 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 @@ for the corresponding packages." (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=?))) |