about summary refs log tree commit diff
path: root/src/libstore/parsed-derivations.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-03T14·02+0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-03T14·03+0200
commite07ec8d27e08bf23eccab079b044a6f1b37f3ac9 (patch)
tree0dacd79c9a2ff40662de47d2e0515b535e684867 /src/libstore/parsed-derivations.cc
parentcec50290bf5537d574fd94557bd3918f2bea8a30 (diff)
Support allowSubstitutes attribute in structured attribute derivations
Hopefully fixes #3081 (didn't test).
Diffstat (limited to 'src/libstore/parsed-derivations.cc')
-rw-r--r--src/libstore/parsed-derivations.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc
index 17fde00a0167..87be8a24ead6 100644
--- a/src/libstore/parsed-derivations.cc
+++ b/src/libstore/parsed-derivations.cc
@@ -108,4 +108,9 @@ bool ParsedDerivation::willBuildLocally() const
     return getBoolAttr("preferLocalBuild") && canBuildLocally();
 }
 
+bool ParsedDerivation::substitutesAllowed() const
+{
+    return getBoolAttr("allowSubstitutes", true);
+}
+
 }