[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/11: environment: Skip derivation computation when '--profile' is used
From: |
guix-commits |
Subject: |
06/11: environment: Skip derivation computation when '--profile' is used. |
Date: |
Mon, 25 Oct 2021 14:13:28 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 648a6eb03fddb6c67f0ec685ac74d2c7a82179cd
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 1 18:59:54 2021 +0200
environment: Skip derivation computation when '--profile' is used.
* guix/scripts/environment.scm (guix-environment*): Bypass calls to
'package-derivation' and to 'manifest->derivation' when PROFILE is
true.
---
guix/scripts/environment.scm | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 77956fc..32f376f 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -729,18 +729,21 @@ command-line option processing with 'parse-command-line'."
;; Use the bootstrap Guile when requested.
(parameterize ((%graft? (assoc-ref opts 'graft?))
(%guile-for-build
- (package-derivation
- store
- (if bootstrap?
- %bootstrap-guile
- (default-guile)))))
+ (and (or container? (not profile))
+ (package-derivation
+ store
+ (if bootstrap?
+ %bootstrap-guile
+ (default-guile))))))
(run-with-store store
;; Containers need a Bourne shell at /bin/sh.
(mlet* %store-monad ((bash (environment-bash container?
bootstrap?
system))
- (prof-drv (manifest->derivation
- manifest system bootstrap?))
+ (prof-drv (if profile
+ (return #f)
+ (manifest->derivation
+ manifest system
bootstrap?)))
(profile -> (if profile
(readlink* profile)
(derivation->output-path
prof-drv)))
@@ -750,9 +753,9 @@ command-line option processing with 'parse-command-line'."
;; --search-paths. Additionally, we might need to build
bash for
;; a container.
(mbegin %store-monad
- (built-derivations (if (derivation? bash)
- (list prof-drv bash)
- (list prof-drv)))
+ (built-derivations (append
+ (if prof-drv (list prof-drv) '())
+ (if (derivation? bash) (list bash)
'())))
(mwhen gc-root
(register-gc-root profile gc-root))
- branch master updated (e4276fc -> 4aa41a3), guix-commits, 2021/10/25
- 01/11: packages: Add 'package-development-inputs'., guix-commits, 2021/10/25
- 02/11: profiles: Add 'package->development-manifest'., guix-commits, 2021/10/25
- 03/11: Add 'guix shell'., guix-commits, 2021/10/25
- 04/11: shell: By default load the local 'manifest.scm' or 'guix.scm' file., guix-commits, 2021/10/25
- 08/11: environment: Autoload some modules., guix-commits, 2021/10/25
- 07/11: environment: Do not connect to the daemon when '--profile' is used., guix-commits, 2021/10/25
- 05/11: environment: Add tests for '--profile'., guix-commits, 2021/10/25
- 10/11: shell: Maintain a profile cache., guix-commits, 2021/10/25
- 11/11: news: Add entry about "guix shell"., guix-commits, 2021/10/25
- 06/11: environment: Skip derivation computation when '--profile' is used.,
guix-commits <=
- 09/11: cache: Gracefully handle non-existent cache., guix-commits, 2021/10/25