From 7ca533c7237622d70b423033c4506217d9ce4014 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 11 Jun 2020 22:52:12 +0200 Subject: image: Make 'find-image' non-monadic. * gnu/system/image.scm (find-image): Make non-monadic. Add 'target' parameter. * gnu/tests/install.scm (run-install): Update caller, passing (%current-target-system). * guix/scripts/system.scm (perform-action): Likewise. --- gnu/system/image.scm | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 6c4573509d..be8b6e67f7 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -556,20 +557,17 @@ image, depending on IMAGE format." #:grub-mkrescue-environment '(("MKRESCUE_SED_MODE" . "mbr_only"))))))) -(define (find-image file-system-type) - "Find and return an image that could match the given FILE-SYSTEM-TYPE. This -is useful to adapt to interfaces written before the addition of the -record." - (mlet %store-monad ((target (current-target-system))) - (mbegin %store-monad - (return - (match file-system-type - ("iso9660" iso9660-image) - (_ (cond - ((and target - (hurd-triplet? target)) - hurd-disk-image) - (else - efi-disk-image)))))))) +(define (find-image file-system-type target) + "Find and return an image built that could match the given FILE-SYSTEM-TYPE, +built for TARGET. This is useful to adapt to interfaces written before the +addition of the record." + (match file-system-type + ("iso9660" iso9660-image) + (_ (cond + ((and target + (hurd-triplet? target)) + hurd-disk-image) + (else + efi-disk-image))))) ;;; image.scm ends here -- cgit v1.2.3