From: "Ludovic Courtès" <ludo@gnu.org>
To: 54393@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#54393] [PATCH v2 2/3] environment: Export 'load-manifest'.
Date: Thu, 31 Mar 2022 13:09:56 +0200 [thread overview]
Message-ID: <20220331110957.31829-2-ludo@gnu.org> (raw)
In-Reply-To: <20220331110957.31829-1-ludo@gnu.org>
* 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
next prev parent reply other threads:[~2022-03-31 11:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 21:50 [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Ludovic Courtès
2022-03-14 21:51 ` [bug#54393] [PATCH 1/2] packages: Add 'package-unique-version-prefix' Ludovic Courtès
2022-03-14 21:51 ` [bug#54393] [PATCH 2/2] Add 'guix manifest' Ludovic Courtès
2022-03-15 7:18 ` [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Liliana Marie Prikler
2022-03-15 9:27 ` Ludovic Courtès
2022-03-15 9:53 ` Liliana Marie Prikler
2022-03-15 15:17 ` Ludovic Courtès
2022-03-15 9:00 ` zimoun
2022-03-15 9:23 ` Ludovic Courtès
2022-03-15 10:21 ` zimoun
2022-03-15 19:38 ` Ludovic Courtès
2022-03-31 11:09 ` [bug#54393] [PATCH v2 1/3] packages: Add 'package-unique-version-prefix' Ludovic Courtès
2022-03-31 11:09 ` Ludovic Courtès [this message]
2022-03-31 11:09 ` [bug#54393] [PATCH v2 3/3] shell: Add '--export-manifest' Ludovic Courtès
2022-04-04 14:37 ` [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Maxim Cournoyer
2022-04-04 21:16 ` bug#54393: " Ludovic Courtès
2022-04-05 5:48 ` [bug#54393] " zimoun
2022-04-06 8:08 ` Ludovic Courtès
2022-03-31 11:10 ` [bug#54393] [PATCH v2 0/3] Add '--export-manifest' to 'guix shell' Ludovic Courtès
2022-03-15 16:50 ` [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Greg Hogan
2022-03-16 9:58 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220331110957.31829-2-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=54393@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).