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.
This commit is contained in:
Mark H Weaver 2015-03-07 20:42:01 -05:00
parent 68a5d6c770
commit e396976b9b
1 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -231,14 +232,16 @@ an interpreter, a compiler, a debugger, and much more.")
(define (quoted-path input path) (define (quoted-path input path)
(string-append "\"" input path "\"")) (string-append "\"" input path "\""))
;; Patch absolute paths in string literals. Note that this ;; Patch absolute paths in string literals. Note that this
;; occurs in some .sh files too (which contain Lisp code). ;; 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)$") (substitute* (find-files "." "\\.(lisp|sh)$")
(("\"/bin/sh\"") (quoted-path bash "/bin/sh")) (("\"/bin/sh\"") (quoted-path bash "/bin/sh"))
(("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env")) (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env"))
(("\"/bin/cat\"") (quoted-path coreutils "/bin/cat")) (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat"))
(("\"/bin/ed\"") (quoted-path ed "/bin/ed")) (("\"/bin/ed\"") (quoted-path ed "/bin/ed"))
(("\"/bin/echo\"") (quoted-path coreutils "/bin/echo")) (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo"))
(("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))) (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))))
;; This one script has a non-string occurrence of /bin/sh. ;; This one script has a non-string occurrence of /bin/sh.
(substitute* '("tests/foreign.test.sh") (substitute* '("tests/foreign.test.sh")
;; Leave whitespace so we don't match the shebang. ;; Leave whitespace so we don't match the shebang.