From 9b5364a3afb03414bd6e3ded2fbfdacabe4e8870 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 11 Jan 2017 17:06:31 +0100 Subject: daemon: Allow check builds of 'builtin:download' derivations. Fixes . Reported by Leo Famulari . * nix/libstore/build.cc (DerivationGoal::runChild): In the 'isBuiltin' case, check whether DRV's output is in 'redirectedOutputs', and pass an 'output' argument to the built-in builder. (DerivationGoal::addHashRewrite): Add 'printMsg' call. * nix/libstore/builtins.hh (derivationBuilder): Add 'output' parameter. * nix/libstore/builtins.cc (builtinDownload): Likewise. Add OUTPUT to ARGV. * guix/scripts/perform-download.scm (perform-download): Add 'output' parameter. (guix-perform-download): Adjust 'match' clauses accordingly. * tests/derivations.scm ("'download' built-in builder, check mode"): New test. --- nix/libstore/builtins.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nix/libstore/builtins.hh') diff --git a/nix/libstore/builtins.hh b/nix/libstore/builtins.hh index 79171fcb6c..396ea14ebc 100644 --- a/nix/libstore/builtins.hh +++ b/nix/libstore/builtins.hh @@ -1,5 +1,5 @@ /* GNU Guix --- Functional package management for GNU - Copyright (C) 2016 Ludovic Courtès + Copyright (C) 2016, 2017 Ludovic Courtès This file is part of GNU Guix. @@ -33,7 +33,8 @@ namespace nix { /* Build DRV, which lives at DRVPATH. */ typedef void (*derivationBuilder) (const Derivation &drv, - const std::string &drvPath); + const std::string &drvPath, + const std::string &output); /* Return the built-in builder called BUILDER, or NULL if none was found. */ -- cgit 1.4.1