summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-01 22:22:18 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 19:02:33 +0200
commit3c96158438e3a813fb98f0eba78ee5c3ae93f065 (patch)
tree18d9ed384861f6dcb96b07751d1b8a6e115bbc8e
parent99499a2037b886925bc73dd81340bbf9c02c95c7 (diff)
downloadguix-3c96158438e3a813fb98f0eba78ee5c3ae93f065.tar.gz
environment: Autoload some modules.
This further speeds up the 'guix environment -p PROFILE' case.

* guix/scripts/environment.scm: Autoload a bunch of modules.
-rw-r--r--guix/scripts/environment.scm19
1 files changed, 11 insertions, 8 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index e23d52df39..05a43659da 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -34,15 +34,18 @@
   #:use-module (guix scripts)
   #:use-module (guix scripts build)
   #:use-module (guix transformations)
-  #:use-module (gnu build linux-container)
-  #:use-module (gnu build accounts)
-  #:use-module ((guix build syscalls) #:select (set-network-interface-up))
-  #:use-module (gnu system linux-container)
+  #:autoload   (gnu build linux-container) (call-with-container %namespaces
+                                            user-namespace-supported?
+                                            unprivileged-user-namespace-supported?
+                                            setgroups-supported?)
+  #:autoload   (gnu build accounts) (password-entry group-entry
+                                     password-entry-name password-entry-directory
+                                     write-passwd write-group)
+  #:autoload   (guix build syscalls) (set-network-interface-up)
   #:use-module (gnu system file-systems)
-  #:use-module (gnu packages)
-  #:use-module (gnu packages bash)
-  #:use-module ((gnu packages bootstrap)
-                #:select (bootstrap-executable %bootstrap-guile))
+  #:autoload   (gnu packages) (specification->package+output)
+  #:autoload   (gnu packages bash) (bash)
+  #:autoload   (gnu packages bootstrap) (bootstrap-executable %bootstrap-guile)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)