aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-03-08 08:46:12 -0500
committerShea Levy <shea@shealevy.com>2017-03-08 08:46:12 -0500
commit93f863be9626e5455458abf9e449586270e98163 (patch)
treedd56f2d5ef593755bed49cbb1609e8b47980b719 /src/libstore
parent121a407eecd4a176adbfbacf49735b3dfc303e79 (diff)
Add option to disable import-from-derivation completely, even if the drv is already realized
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/libstore/globals.hh3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index fcd634729..df537a512 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -70,6 +70,7 @@ Settings::Settings()
enableImportNative = false;
netrcFile = fmt("%s/%s", nixConfDir, "netrc");
caFile = getEnv("NIX_SSL_CERT_FILE", getEnv("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt"));
+ enableImportFromDerivation = true;
}
@@ -185,6 +186,7 @@ void Settings::update()
_get(keepGoing, "keep-going");
_get(keepFailed, "keep-failed");
_get(netrcFile, "netrc-file");
+ _get(enableImportFromDerivation, "allow-import-from-derivation");
}
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 1e6b7c083..7a9a9f6c0 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -198,6 +198,9 @@ struct Settings {
/* Path to the SSL CA file used */
Path caFile;
+ /* Whether we allow import-from-derivation */
+ bool enableImportFromDerivation;
+
private:
SettingsMap settings, overrides;