me
/
guix
Archived
1
0
Fork 0

build-systems/emacs: No longer skip patching of files containing NULs.

This follows the fix to <https://bugs.gnu.org/30116>.

* guix/build/emacs-build-system.scm (patch-el-files)
[file-contains-nul-char]: Remove nested procedure.
[el-file]: Do no filter out files containing NUL characters.
master
Maxim Cournoyer 2021-01-08 09:02:05 -05:00
parent 485ac28235
commit 0715793373
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 1 additions and 15 deletions

View File

@ -105,23 +105,9 @@ environment variable\n" source-directory)))
"Substitute the absolute \"/bin/\" directory with the right location in the "Substitute the absolute \"/bin/\" directory with the right location in the
store in '.el' files." store in '.el' files."
(define (file-contains-nul-char? file)
(call-with-input-file file
(lambda (in)
(let loop ((line (read-line in 'concat)))
(cond
((eof-object? line) #f)
((string-index line #\nul) #t)
(else (loop (read-line in 'concat))))))
#:binary #t))
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(site-lisp (string-append out %install-dir)) (site-lisp (string-append out %install-dir))
;; (ice-9 regex) uses libc's regexp routines, which cannot deal with (el-files (find-files (getcwd) "\\.el$")))
;; strings containing NULs. Filter out such files. TODO: Remove
;; this workaround when <https://bugs.gnu.org/30116> is fixed.
(el-files (remove file-contains-nul-char?
(find-files (getcwd) "\\.el$"))))
(define (substitute-program-names) (define (substitute-program-names)
(substitute* el-files (substitute* el-files
(("\"/bin/([^.]\\S*)\"" _ cmd-name) (("\"/bin/([^.]\\S*)\"" _ cmd-name)