From e396976b9b61c1db08c35059a2d46d72a4e93479 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 7 Mar 2015 20:42:01 -0500 Subject: gnu: sbcl: Use ISO-8859-1 to patch unix tool paths. * gnu/packages/lisp.scm (sbcl)[arguments]: Use ISO-8859-1 to patch unix tool paths in string literals. --- gnu/packages/lisp.scm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 76c826cc6e..f0599a95c6 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer +;;; Copyright © 2015 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -231,14 +232,16 @@ (define-public sbcl (define (quoted-path input path) (string-append "\"" input path "\"")) ;; Patch absolute paths in string literals. Note that this - ;; occurs in some .sh files too (which contain Lisp code). - (substitute* (find-files "." "\\.(lisp|sh)$") - (("\"/bin/sh\"") (quoted-path bash "/bin/sh")) - (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env")) - (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat")) - (("\"/bin/ed\"") (quoted-path ed "/bin/ed")) - (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo")) - (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))) + ;; occurs in some .sh files too (which contain Lisp code). Use + ;; ISO-8859-1 because some of the files are ISO-8859-1 encoded. + (with-fluids ((%default-port-encoding #f)) + (substitute* (find-files "." "\\.(lisp|sh)$") + (("\"/bin/sh\"") (quoted-path bash "/bin/sh")) + (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env")) + (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat")) + (("\"/bin/ed\"") (quoted-path ed "/bin/ed")) + (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo")) + (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname")))) ;; This one script has a non-string occurrence of /bin/sh. (substitute* '("tests/foreign.test.sh") ;; Leave whitespace so we don't match the shebang. -- cgit v1.2.3