diff options
author | Eric Bavier <bavier@member.fsf.org> | 2016-01-19 18:01:07 -0600 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2016-01-19 18:01:07 -0600 |
commit | 252ddedd4b3af9a1b947258994e0ae1aa4fa81d3 (patch) | |
tree | 0d4f2a1286751148b43e8bf8391d20aff4a0fec5 /guix/build/haskell-build-system.scm | |
parent | afe9f409491a055e5d058c8f747e80d1506391e5 (diff) |
build-system/haskell: Fix package.conf parsing.
* guix/build/haskell-build-system.scm (register)[conf-depends]: Properly
react to EOF while reading GHC package conf files.
Diffstat (limited to 'guix/build/haskell-build-system.scm')
-rw-r--r-- | guix/build/haskell-build-system.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index 8e2aee381d..3afc37e16d 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -192,7 +192,8 @@ given Haskell package." (let loop ((collecting #f) (deps '())) (let* ((line (read-line port)) - (field (and=> (regexp-exec field-rx line) + (field (and=> (and (not (eof-object? line)) + (regexp-exec field-rx line)) (cut match:substring <> 1)))) (cond ((and=> field (cut string=? <> "depends")) @@ -200,7 +201,7 @@ given Haskell package." ;; so drop those characters. A line may list more than one .conf. (let ((d (string-tokenize (string-drop line 8)))) (loop #t (append d deps)))) - ((and collecting field) + ((or (eof-object? line) (and collecting field)) (begin (close-port port) (reverse! deps))) |