Subject: Re: bug#30370: guix system init can't find guix-register

From: Diego Nicola Barbato <[email-masked]>
Date: Sun, 11 Feb 2018 18:32:38 +0100

Hello,

[email-masked] (Ludovic Courtès) writes:

> Diego Nicola Barbato <[email-masked]> skribis:
>
>> But I also tried running
>> "grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig ~/.config/guix/latest" which
>> returned this:
>> /home/diego/.config/guix/latest/guix/config.scm:  "/gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin")
>
> Bingo!  This string is inherit from the (guix config) of your initial
> installation, the one you used to run ‘guix pull’.
>
> I would call this a ‘guix pull’ bug.

I think this is a bug in the ‘build’ procedure defined in build-self.scm
which is used by guix pull’ and which uses the (guix build pull) module
to generate a new config.scm.  It uses the value for %sbindir defined in
(guix config) which causes it to be passed on unchanged.
My guess is that (find-best-packages-by-name "guix" #f) should be used
to determine the correct guix instead, which is how the values for the
dependencies (libgcrypt, zlib, ...) are determined, and that this should
be used to get the sbin directory with ‘string-append’.
WDYT?

Greetings

Diego