Subject: Re: [bug#66605] [PATCH] etc: gitconfig: Run etc/teams.scm from correct environment.

From: Clément Lassieur <[email-masked]>
Date: Wed, 18 Oct 2023 22:52:03 +0200

Hi Maxim,

Maxim Cournoyer <[email-masked]> writes:

>> * etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
>> etc/teams.scm script so that any user that have git:send-email installed can
>> use it in the Guix checkout without changing their environment.
>
> I'm not sure I understand; why does etc/teams.scm cc-members-header-cmd
> fail in an environment where git:send-email is available?

Because it requires (git) and (guix ui).  So you need ./pre-inst-env for
(guix ui), plus guile, guile-git and guile-gcrypt.  The minimal setup
would be:

    `guix shell guile guile-git guile-gcrypt git git:send-email --pure -- ./pre-inst-env git send-email`

or

    `guix shell guile guile-git guile-gcrypt -- ./pre-inst-env git send-email`

with an impure environment containing git and git:send-email.

But it could be shortened as

    `guix shell git:send-email -D guix --pure -- ./pre-inst-env git send-email`

However, in this case `guix shell git:send-email` is necessary even with
impure environments containing git and git:send-email because `-D guix`
pulls git without pulling git:send-email.

Thanks,
Clément