From the kind people on #guix, I've heard that "guix build --subsitute-urls" 
should override "guix-daemon --no-subsitutes", but it seems it's not doing so 
for me.

Here's the situation I ran in to:

While doing a "./pre-inst-env guix pull" I got an error about:

  output path 
`/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' should have 
sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', instead has 
`
1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'

So I tried "./pre-inst-env guix build --source libgit2 
--substitute-urls=[https://mirror.hydra.gnu.org";](https://mirror.hydra.gnu.org)
but it redirected me to 
https://codeload.github.com/libgit2/libgit2/tar.gz/v0.26.0
which had the wrong hash.

Attached is the full log of that failed attempt.  This was done while 
guix-daemon was run with the --no-subsitutes option.

Then I killed guix-daemon and restarted it without --no-subsitutes, and did the 
same thing and it worked (log of the success also attached).
sh-4.3$ ./pre-inst-env guix build --source libgit2 
--substitute-urls=https://mirror.hydra.gnu.org
The following derivations will be built:
   /gnu/store/5szrmzmfgxk6pylk5fh9bk8apj4x8axf-libgit2-0.26.0.tar.xz.drv
   /gnu/store/mgh4yjxkxfyqmc7c61vwq4vs8v837602-libgit2-0.26.0.tar.gz.drv
@ build-started 
/gnu/store/mgh4yjxkxfyqmc7c61vwq4vs8v837602-libgit2-0.26.0.tar.gz.drv - 
x86_64-linux 
/var/log/guix/drvs/mg//h4yjxkxfyqmc7c61vwq4vs8v837602-libgit2-0.26.0.tar
.gz.drv.bz2

Starting download of 
/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz
From https://github.com/libgit2/libgit2/archive/v0.26.0.tar.gz...
following redirection to 
`https://codeload.github.com/libgit2/libgit2/tar.gz/v0.26.0'...
 v0.26.0                                     4.2MiB/s 00:01 | 4.5MiB transferred
output path `/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' 
should have sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', 
instead has `
1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'
@ build-failed 
/gnu/store/mgh4yjxkxfyqmc7c61vwq4vs8v837602-libgit2-0.26.0.tar.gz.drv - 1 
output path `/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' 
shou
ld have sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', 
instead has `1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'
cannot build derivation 
`/gnu/store/5szrmzmfgxk6pylk5fh9bk8apj4x8axf-libgit2-0.26.0.tar.xz.drv': 1 
dependencies couldn't be built
guix build: error: build failed: build of 
`/gnu/store/5szrmzmfgxk6pylk5fh9bk8apj4x8axf-libgit2-0.26.0.tar.xz.drv' failed
sh-4.3$ ./pre-inst-env guix build --source libgit2 
--substitute-urls=https://mirror.hydra.gnu.org
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
2.8 MB will be downloaded:
   /gnu/store/s62d5lbr6sb7x0mxhhdwf13in7yi8mbc-libgit2-0.26.0.tar.xz
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
@ substituter-started 
/gnu/store/s62d5lbr6sb7x0mxhhdwf13in7yi8mbc-libgit2-0.26.0.tar.xz 
/gnu/store/vir3lrwqy50pr8fkaf3m091dgbrja2n6-guix-0.13.0/libexec/guix/substitute
Downloading 
https://mirror.hydra.gnu.org/guix/nar/s62d5lbr6sb7x0mxhhdwf13in7yi8mbc-libgit2-0.26.0.tar.xz
 (2.7MiB installed)...
 libgit2-0.26.0.tar.xz  2.7MiB                                                  
                                                2.3MiB/s 00:01 
[####################] 100.0%

@ substituter-succeeded 
/gnu/store/s62d5lbr6sb7x0mxhhdwf13in7yi8mbc-libgit2-0.26.0.tar.xz
/gnu/store/s62d5lbr6sb7x0mxhhdwf13in7yi8mbc-libgit2-0.26.0.tar.xz

Reply via email to