From 55bf53fe92fac2b98e117b6f01fddd7db0285529 Mon Sep 17 00:00:00 2001 From: Tomas Volf <~@wolfsden.cz> Date: Wed, 17 Dec 2025 13:47:38 +0100 Subject: [PATCH] monad-repl: Add "graft?" command. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Grafts are not always required when just exploring in the REPL, and they do take time, so this commit adds easy way to disable them. * guix/monad-repl.scm (build-graft): New meta command. * doc/guix.texi (Using Guix Interactively): Document it. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 5 +++++ guix/monad-repl.scm | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 5171b3395f2..a2e2a8e5dfd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13265,6 +13265,11 @@ be a list of keywords with values accepted by procedure @end example @end deffn +@deffn {REPL command} graft? @var{graft?} +Set whether grafts should be performed as part of the build. Equivalent +to @code{--no-grafts} argument to @code{guix build}. +@end deffn + @deffn {REPL command} lower @var{object} Lower @var{object} into a derivation or store file name and return it. @end deffn diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm index f4863c0c5c1..dcb00988fe8 100644 --- a/guix/monad-repl.scm +++ b/guix/monad-repl.scm @@ -149,6 +149,11 @@ Must be a list of keywords with values accepted by procedure (repl-print repl %build-options) (set! %build-options (repl-eval repl opts))) +(define-meta-command ((graft? guix) repl (graft?)) + "build-graft GRAFT? +Set whether grafts should be performed." + (%graft? (repl-eval repl graft?))) + (define-meta-command ((enter-store-monad guix) repl) "enter-store-monad Enter a REPL for values in the store monad."