Subject: bug#53210: [WIP PATCH 4/4] gnu: package-management: Memoize current-guix.

From: Josselin Poiret <[email-masked]>
Date: Mon, 14 Feb 2022 10:29:08 +0100

* gnu/packages/package-management.scm (current-guix): Memoize.
---
 gnu/packages/package-management.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index fe906fd440..a7b98bbb1a 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -125,6 +125,7 @@ (define-module (gnu packages package-management)
   #:use-module (guix git-download)
   #:autoload (guix git) (git-checkout)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix memoization)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (ice-9 match)
@@ -611,7 +612,7 @@ (define-public current-guix-package
   (make-parameter #f))
 
 (define-public current-guix
-  (lambda ()
+  (mlambda ()
     "Return a package representing Guix built from the currently used one.
 This works by either looking up profile or build metadata, and building from
 the current Guix channel.  If that metadata is missing, assume we are running
-- 
2.34.0