mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00: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:
parent
9d0e2002a5
commit
95f2123135
3 changed files with 142 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue