[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54393] [PATCH v2 2/3] environment: Export 'load-manifest'.
From: |
Ludovic Courtès |
Subject: |
[bug#54393] [PATCH v2 2/3] environment: Export 'load-manifest'. |
Date: |
Thu, 31 Mar 2022 13:09:56 +0200 |
* guix/scripts/environment.scm (load-manifest): New procedure.
(options/resolve-packages): Use it.
---
guix/scripts/environment.scm | 9 +++++++--
1 file 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 @@ (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=?)))
--
2.34.0
- [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, (continued)
- [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, zimoun, 2022/03/15
- [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, Ludovic Courtès, 2022/03/15
- [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, zimoun, 2022/03/15
- [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, Ludovic Courtès, 2022/03/15
- [bug#54393] [PATCH v2 0/3] Add '--export-manifest' to 'guix shell', Ludovic Courtès, 2022/03/31
- [bug#54393] [PATCH v2 1/3] packages: Add 'package-unique-version-prefix'., Ludovic Courtès, 2022/03/31
- [bug#54393] [PATCH v2 2/3] environment: Export 'load-manifest'.,
Ludovic Courtès <=
- [bug#54393] [PATCH v2 3/3] shell: Add '--export-manifest'., Ludovic Courtès, 2022/03/31
[bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests, Greg Hogan, 2022/03/15