backtrace for origin url-fetch with file:///

  • Open
  • quality assurance status badge
One participant
  • Simon Tournier
Submitted by
Simon Tournier
Simon Tournier wrote on 19 Oct 2023 11:36
(no subject)
(address .

Trying to answer to this message [1], I notice something unexpected for
me. I read from the manual:

Toggle snippet (16 lines)
-- Procedure: url-fetch url hash-algo hash [name] [#:executable? #f]
Return a fixed-output derivation that fetches data from URL (a
string, or a list of strings denoting alternate URLs), which is
expected to have hash HASH of type HASH-ALGO (a symbol). By
default, the file name is the base name of URL; optionally, NAME
can specify a different file name. When EXECUTABLE? is true, make
the downloaded file executable.

When one of the URL starts with ‘mirror://’, then its host part is
interpreted as the name of a mirror scheme, taken from

Alternatively, when URL starts with ‘file://’, return the
corresponding file name in the store.

Therefore, I do:

Toggle snippet (23 lines)
(define-module (pkg)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages pdf)
#:use-module (gnu packages gnome))

(define-public zathura-custom
(inherit zathura)
(name "zathura-custom")
(version "4.0")
(method url-fetch)

And then:

Toggle snippet (30 lines)
$ guix build -L /tmp/zathura-custom zathura-custom -S -d
12 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
2323:7 11 (run-guix . _)
2286:10 10 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/status.scm:
839:4 8 (call-with-status-report _ _)
In ice-9/boot-9.scm:
1752:10 7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
659:37 6 (thunk)
1298:8 5 (call-with-build-handler #<procedure 7f31d1cb85d0 at guix/ui.scm:1219:2 (continue store things mode)> _)
In guix/scripts/build.scm:
797:43 4 (_)
In srfi/srfi-1.scm:
586:17 3 (map1 ("/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"))
In guix/derivations.scm:
136:0 2 (%derivation-file-name-procedure "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz")
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"


$ guix hash /tmp/zathura-custom/zathura-mine.tar.xz

Starting download of /tmp/guix-file.d3GzTC


1: [TIL] guix doesn't check hash when uri starts with file:///
Rodrigo Morales <>
Wed, 20 Sep 2023 19:18:57 +0000
Simon Tournier wrote on 19 Oct 2023 11:54
control message for bug #66633
(address .
retitle 66633 backtrace for origin url-fetch with file:///
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to

To respond to this issue using the mumi CLI, first switch to it
mumi current 66633
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch