Subject: bug#35863: closed (fixed by patch)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 30 Jun 2019 21:13:02 +0000

Your bug report

#35863: `guix import hackage random` fails due to mysterious CRLF-related trouble

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35863: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35863
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: fixed by patch
From: Robert Vollmert <[email-masked]>
To: [email-masked]
Date: Sun, 30 Jun 2019 23:12:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

This was fixed by

commit 3149c002644b927e0245d237cdda3a6aeca00e4a
Author: Robert Vollmert <[email-masked]>
Date:   Sun Jun 16 16:18:29 2019 +0200

    utils: canonical-newline-port: Fix handling of carriage return at buffer end.

Subject: `guix import hackage random` fails due to mysterious CRLF-related trouble
From: Robert Vollmert <[email-masked]>
To: [email-masked]
Date: Thu, 23 May 2019 11:44:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

$ curl http://hackage.haskell.org/package/random-1.1/random.cabal > random.cabal
$ guix import hackage -s < random.cabal
 (at line 49, column 0)d token : 
Syntax error: unexpected end of input
guix import: error: failed to import cabal file from standard input
$ tr -d '\r'  < random.cabal | guix import hackage -s
(package …)

There’s nothing obviously wrong in the cabal file around line 49. The file seems
to have consistent CRLF line endings and doesn’t seem to have any non-ASCII
characters. (I can see that `canonical-newline-port` might well be buggy around
UTF8.)