mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
daemon: Add “git-download” built-in builder.
The new builder makes it possible to break cycles that occurs when the
fixed-output derivation for the source of a dependency of ‘git’ would
itself depend on ‘git’.
* guix/scripts/perform-download.scm (perform-git-download): New
procedure.
(perform-download): Move fixed-output derivation check to…
(guix-perform-download): … here. Invoke ‘perform-download’ or
‘perform-git-download’ depending on what ‘derivation-builder’ returns.
* nix/libstore/builtins.cc (builtins): Add “git-download”.
* tests/derivations.scm ("built-in-builders"): Update.
("'git-download' built-in builder")
("'git-download' built-in builder, invalid hash")
("'git-download' built-in builder, invalid commit")
("'git-download' built-in builder, not found"): New tests.
This commit is contained in:
committed by
Ludovic Courtès
parent
9d0e2002a5
commit
95f2123135
@@ -1,5 +1,5 @@
|
||||
/* GNU Guix --- Functional package management for GNU
|
||||
Copyright (C) 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
Copyright (C) 2016-2019, 2023 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
This file is part of GNU Guix.
|
||||
|
||||
@@ -58,7 +58,8 @@ static void builtinDownload(const Derivation &drv,
|
||||
|
||||
static const std::map<std::string, derivationBuilder> builtins =
|
||||
{
|
||||
{ "download", builtinDownload }
|
||||
{ "download", builtinDownload },
|
||||
{ "git-download", builtinDownload }
|
||||
};
|
||||
|
||||
derivationBuilder lookupBuiltinBuilder(const std::string & name)
|
||||
|
||||
Reference in New Issue
Block a user