From 2ba2c98d8aa695cce608313833a36c61b0fb3428 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 8 Dec 2017 17:31:22 +0100 Subject: gnu: guile: Move Readline support to a separate 'guile-readline' package. This reduces the closure of Guile from 131 MiB to 116 MiB and removes extra readline/ncurses builds from the bootstrap path. * gnu/packages/guile.scm (guile-2.0)[inputs]: Remove READLINE. (make-guile-readline): New procedure. (guile-readline): New variable. * gnu/system/shadow.scm (default-skeletons): Adjust '.guile' so that it gracefully deals with missing (ice-9 readline). --- gnu/system/shadow.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gnu/system/shadow.scm') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index b66239787e..938de8dd41 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -193,10 +193,14 @@ set debug-file-directory ~/.guix-profile/lib/debug\n"))) (".zlogin" ,zlogin) (".Xdefaults" ,xdefaults) (".guile" ,(plain-file "dot-guile" - (string-append - "(use-modules (ice-9 readline))\n\n" - ";; Enable completion at the REPL.\n" - "(activate-readline)\n"))) + "(cond ((false-if-exception (resolve-interface '(ice-9 readline))) + => + (lambda (module) + ;; Enable completion and input history at the REPL. + ((module-ref module 'activate-readline)))) + (else + (display \"Consider installing the 'guile-readline' package for +convenient interactive line editing and input history.\\n\\n\")))\n")) (".guile-wm" ,guile-wm) (".gdbinit" ,gdbinit)))) -- cgit v1.2.3