guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with a confusing error: url-fetch, hash, invalid keyword #vu8


From: Robert Vollmert
Subject: Re: help with a confusing error: url-fetch, hash, invalid keyword #vu8
Date: Mon, 18 Nov 2019 22:06:09 +0100

On 18. Nov 2019, at 21:40, John Soo <address@hidden> wrote:
> 
> Hi Robert,
> 
> Interesting. Looks alright to me. Also I did just package ormolu myself and 
> everything worked alright. One thing to try is using `guix repl` to reproduce 
> the error. Can you open one up and see what happens?

Actually that helped, thanks! Here’s what I did (mostly so I don’t need to 
figure that out again):

1. made a proper module out of the file ormolu.scm
2. ran `guix repl` in the directory with ormolu.scm

scheme@(guix-user)> ,load /path/to/ormolu.scm
scheme@(guix-user)> ghc-ormolu
$1 = #<package ghc-ormolu@0.0.1.0 /home/rob/blog-test/ormolu.scm:9 300ba50>
scheme@(guix-user)> (package-source ghc-ormolu)
$2 = #<origin 
"https://hackage.haskell.org/package/ormolu/ormolu-0.0.1.0.tar.gz"; 
mbkimdo73ovmqpmg6zxqm46joztju3n3mw4ubeudg3d22ismsxoa () 318b420>
scheme@(guix-user)> (origin-sha256 (package-source ghc-ormolu))
$3 = #vu8(96 84 134 13 223 219 170 200 61 134 246 111 6 115 201 118 102 154 109 
187 101 185 64 146 131 54 199 173 34 76 149 220)
scheme@(guix-user)> ,use (gnu packages haskell)
scheme@(guix-user)> (package-source ghc)
$4 = #<origin "https://www.haskell.org/ghc/dist/8.4.3/ghc-8.4.3-src.tar.xz"; 
vzd27wuylayn5careqzflkrxitp3sid4xgak65bzgkmlfnrbmdla () 2f20420>
scheme@(guix-user)> (origin-sha256 (package-source ghc))
$5 = #vu8(174 71 175 218 152 88 48 222 136 17 36 50 85 170 55 68 223 185 32 124 
185 128 175 116 57 50 152 178 182 33 96 214)

So far so good, they look similar.

scheme@(guix-user)> (origin-method (package-source ghc))
$6 = #<procedure url-fetch (url hash-algo hash #:optional name #:key system 
guile)>
scheme@(guix-user)> (origin-method (package-source ghc-ormolu))
$7 = #<procedure url-fetch (url file #:key timeout verify-certificate? mirrors 
content-addressed-mirrors hashes print-build-trace?)>

Aha! It turns out the error was in importing (guix build download) as opposed 
to (guix download).

I’d added that import due to the “helpful”

$ guix build -f ormolu.scm
ice-9/eval.scm:223:20: In procedure proc:
error: url-fetch: unbound variable
hint: Did you forget `(use-modules (guix build download))'?

Sigh.

Anyway, fixed for now, thank you!

Cheers
Rob






reply via email to

[Prev in Thread] Current Thread [Next in Thread]