about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-21T15·19+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-21T15·19+0200
commit9f9080e2c019f188ba679a7a89284d7eaf629710 (patch)
treedac5d9672e2b4c139c2e97d7766911b62f8b069b /src/libstore
parenteac5841970737b799c55ec78f6ace6d80762ff04 (diff)
nix-store -l: Fetch build logs from the Internet
If a build log is not available locally, then ‘nix-store -l’ will now
try to download it from the servers listed in the ‘log-servers’ option
in nix.conf. For instance, if you have:

  log-servers = http://hydra.nixos.org/log

then it will try to get logs from http://hydra.nixos.org/log/<base
name of the store path>. So you can do things like:

  $ nix-store -l $(which xterm)

and get a log even if xterm wasn't built locally.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/globals.cc1
-rw-r--r--src/libstore/globals.hh3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 739199d48ee7..180344e336b0 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -147,6 +147,7 @@ void Settings::update()
     get(envKeepDerivations, "env-keep-derivations");
     get(sshSubstituterHosts, "ssh-substituter-hosts");
     get(useSshSubstituter, "use-ssh-substituter");
+    get(logServers, "log-servers");
 
     string subs = getEnv("NIX_SUBSTITUTERS", "default");
     if (subs == "default") {
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 711c3652947f..65a6c388b8a6 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -197,6 +197,9 @@ struct Settings {
     /* Whether to show a stack trace if Nix evaluation fails. */
     bool showTrace;
 
+    /* A list of URL prefixes that can return Nix build logs. */
+    Strings logServers;
+
 private:
     SettingsMap settings, overrides;