[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67250: builtin:git-download capability detection not working for the
From: |
Simon Tournier |
Subject: |
bug#67250: builtin:git-download capability detection not working for the bordeaux build farm |
Date: |
Tue, 28 Nov 2023 15:10:41 +0100 |
Hi,
On Wed, 22 Nov 2023 at 11:19, Ludovic Courtès <ludo@gnu.org> wrote:
> As in:
>
> (open-connection
> #:assume-available-builtin-builders '("download"))
Instead, why not check in ’git-fetch’? Currently, the test is done
against the local daemon, right?
--8<---------------cut here---------------start------------->8---
(define* (git-fetch ref hash-algo hash
#:optional name
#:key (system (%current-system))
guile git)
"Return a fixed-output derivation that fetches REF, a <git-reference>
object. The output is expected to have recursive hash HASH of type
HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
(mlet %store-monad ((builtins (built-in-builders*)))
(if (member "git-download" builtins)
(git-fetch/built-in ref hash-algo hash name
#:system system)
(git-fetch/in-band ref hash-algo hash name
#:system system
#:guile guile
#:git git))))
--8<---------------cut here---------------end--------------->8---
For example, why not a test as:
(if (and SOMETHING
(member "git-download" builtins))
And this SOMETHING could be a global variable, as
%assume-builtin-builder, set to true by default and turn to false with
an environment variable, as GUIX_ASSUME_BUILTIN.
Cheers,
simon