From 10c87717bd70c9d7e47a13753dc2756a97f00e35 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Jul 2012 16:25:10 +0200 Subject: utils: Introduce `substitute*', for easier sed-like syntax. * guix/build/utils.scm (let-matches, substitute*): New macros. * distro/base.scm (guile-1.8): Use `substitute*' instead of `substitute'. Remove the #:modules argument. --- distro/base.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'distro') diff --git a/distro/base.scm b/distro/base.scm index b11a7f2116..7bcac56730 100644 --- a/distro/base.scm +++ b/distro/base.scm @@ -120,10 +120,7 @@ code.") (base32 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")))) (build-system gnu-build-system) - (arguments '(#:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 regex)) - #:configure-flags '("--disable-error-on-warning") + (arguments '(#:configure-flags '("--disable-error-on-warning") #:patches (list (assoc-ref %build-inputs "patch/snarf")) ;; Insert a phase before `configure' to patch things up. @@ -134,13 +131,12 @@ code.") ;; Add a call to `lt_dladdsearchdir' so that ;; `libguile-readline.so' & co. are in the ;; loader's search path. - (substitute "libguile/dynl.c" - "lt_dlinit.*$" - (lambda (m p) - (format p - " ~a~% //lt_dladdsearchdir(\"~a/lib\");~%" - (match:substring m 0) - (assoc-ref outputs "out"))))) + (substitute* "libguile/dynl.c" + ("lt_dlinit.*$" match) + (format #f + " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" + match + (assoc-ref outputs "out")))) %standard-phases))) (inputs `(("patch/snarf" ,(search-path %load-path "distro/guile-1.8-cpp-4.5.patch")) -- cgit v1.2.3