aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-12 15:08:38 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-27 23:21:53 +0200
commit240a9c69a6064544a616acc521c993542c364948 (patch)
treee7835f3782941b6a2dc35c3c361216a0ea0d393a /nix/libstore
parentdc0f74e5fc26977a3ee6c4f2aa74a141f4359982 (diff)
downloadpatches-240a9c69a6064544a616acc521c993542c364948.tar
patches-240a9c69a6064544a616acc521c993542c364948.tar.gz
perform-download: Optionally report a "download-progress" trace.
* guix/scripts/perform-download.scm (perform-download): Add #:print-build-trace? and pass it to 'url-fetch'. (guix-perform-download): Define 'print-build-trace?' and pass it to 'perform-download'. * guix/build/download.scm (ftp-fetch): Add #:print-build-trace? and honor it. (url-fetch): Likewise. * nix/libstore/builtins.cc (builtinDownload): Set _NIX_OPTIONS environment variable.
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/builtins.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc
index a5ebb47737..1f52511c80 100644
--- a/nix/libstore/builtins.cc
+++ b/nix/libstore/builtins.cc
@@ -1,5 +1,5 @@
/* GNU Guix --- Functional package management for GNU
- Copyright (C) 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+ Copyright (C) 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
This file is part of GNU Guix.
@@ -47,6 +47,9 @@ static void builtinDownload(const Derivation &drv,
content-addressed mirrors) works correctly. */
setenv("NIX_STORE", settings.nixStore.c_str(), 1);
+ /* Tell it about options such as "print-extended-build-trace". */
+ setenv("_NIX_OPTIONS", settings.pack().c_str(), 1);
+
/* XXX: Hack our way to use the 'download' script from 'LIBEXECDIR/guix'
or just 'LIBEXECDIR', depending on whether we're running uninstalled or
not. */