summary refs log tree commit diff
path: root/gnu/system/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system/image.scm')
-rw-r--r--gnu/system/image.scm22
1 files changed, 9 insertions, 13 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 1bda25fd7f..26ffa028fe 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -524,15 +524,15 @@ it can be used for bootloading."
   "Return the derivation of IMAGE.  It can be a raw disk-image or an ISO9660
 image, depending on IMAGE format."
   (define substitutable? (image-substitutable? image))
-
-  (let* ((os (operating-system-for-image image))
-         (image* (image-with-os image os))
-         (target (image-target image))
-         (register-closures? (has-guix-service-type? os))
-         (bootcfg (operating-system-bootcfg os))
-         (bootloader (bootloader-configuration-bootloader
-                      (operating-system-bootloader os))))
-    (with-parameters ((%current-target-system target))
+  (define target (image-target image))
+
+  (with-parameters ((%current-target-system target))
+    (let* ((os (operating-system-for-image image))
+           (image* (image-with-os image os))
+           (register-closures? (has-guix-service-type? os))
+           (bootcfg (operating-system-bootcfg os))
+           (bootloader (bootloader-configuration-bootloader
+                        (operating-system-bootloader os))))
       (case (image-format image)
         ((disk-image)
          (system-disk-image image*
@@ -573,8 +573,4 @@ addition of the <image> record."
         (else
          efi-disk-image)))))
 
-;;; Local Variables:
-;;; eval: (put 'maybe-with-target 'scheme-indent-function 1)
-;;; End:
-
 ;;; image.scm ends here