Subject: guix import hackage failures

From: Paul van der Walt <[email-masked]>
Date: Wed, 04 Nov 2015 16:00:26 +0100

Hello bug-guix,

I have found that the command `guix import hackage foo` sometimes fails.
I will try to provide a few examples.

-------------8<----------------------------------------------------------
$ guix import hackage xmonad-contrib

Starting download of /tmp/guix-file.Bt94ZV
>From http://hackage.haskell.org/package/xmonad-contrib/xmonad-contrib.cabal...
 xmonad-contrib.cabal                         355KiB/s 00:00 | 13KiB transferred
Syntax error: unexpected token : true (at line 75, column 7)
Syntax error: unexpected end of input
guix import: error: failed to download cabal file for package '
FORMAT: error with call: (format #<output: file /dev/pts/1> "~:[~*~;guix ~a: ~]~afailed to download cabal file for package '~a<==='~%" import import error:  ===>)
        missing argument(s)
Backtrace:
In ice-9/boot-9.scm:
 157: 15 [catch #t #<catch-closure d75420> ...]
In unknown file:
   ?: 14 [apply-smob/1 #<catch-closure d75420>]
In ice-9/boot-9.scm:
  63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 12 [eval # #]
In ice-9/boot-9.scm:
2401: 11 [save-module-excursion #<procedure e60940 at ice-9/boot-9.scm:4045:3 ()>]
4050: 10 [#<procedure e60940 at ice-9/boot-9.scm:4045:3 ()>]
1724: 9 [%start-stack load-stack #<procedure e29960 at ice-9/boot-9.scm:4041:10 ()>]
1729: 8 [#<procedure e6f270 ()>]
In unknown file:
   ?: 7 [primitive-load "/gnu/store/1pvqvwcck48izizrl17hygbb9r7bzi44-guix-0.8.3.abbe2c6/bin/.guix-real"]
In guix/ui.scm:
1173: 6 [run-guix-command import "hackage" "xmonad-contrib"]
In guix/scripts/import.scm:
 110: 5 [guix-import "hackage" "xmonad-contrib"]
In guix/scripts/import/hackage.scm:
 137: 4 [guix-import-hackage "xmonad-contrib"]
In ice-9/format.scm:
1593: 3 [format #<output: file /dev/pts/1> ...]
 766: 2 [format:format-work "~:[~*~;guix ~a: ~]~afailed to download cabal file for package '~a'~%" ...]
 200: 1 [tilde-dispatch]
In unknown file:
   ?: 0 [scm-error misc-error #f "~A" ("error in format") #f]

ERROR: In procedure scm-error:
ERROR: error in format
-------------8<----------------------------------------------------------

Of course, the errors will all be relatively similar since they seem to
be parsing errors.  Packages which fail include:

* base-compat
* base-orphans
* clock
* fast-logger
* fgl
* generic-deriving
* happy
* hscolour
* nats
* ObjectName
* old-locale
* QuickCheck
* SDL
* setenv
* split
* StateVar
* streaming-commons
* syb
* tagged
* transformers-base
* wai
* xmonad
* xmonad-contrib
* xmonad-extras
* zip-archive
* zlib

Cheers,
p.