diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-09-28T12·31+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-09-28T12·32+0200 |
commit | 7ae7a38c9a7d0a5679e65c8213cd7b58dfdc1c52 (patch) | |
tree | 892fc56a42bc96e497a9bdc1ec4ad4278510e6f7 /src/libstore/derivations.cc | |
parent | 99d4bb2d4cd94e0234e8cfb12887db155d98ac50 (diff) |
Move structured attrs handling into a separate class
This is primarily because Derivation::{can,will}BuildLocally() depends on attributes like preferLocalBuild and requiredSystemFeatures, but it can't handle them properly because it doesn't have access to the structured attributes.
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 1e187ec5e954..3961126fff9c 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -36,12 +36,6 @@ Path BasicDerivation::findOutput(const string & id) const } -bool BasicDerivation::willBuildLocally() const -{ - return get(env, "preferLocalBuild") == "1" && canBuildLocally(); -} - - bool BasicDerivation::substitutesAllowed() const { return get(env, "allowSubstitutes", "1") == "1"; @@ -54,14 +48,6 @@ bool BasicDerivation::isBuiltin() const } -bool BasicDerivation::canBuildLocally() const -{ - return platform == settings.thisSystem - || settings.extraPlatforms.get().count(platform) > 0 - || isBuiltin(); -} - - Path writeDerivation(ref<Store> store, const Derivation & drv, const string & name, RepairFlag repair) { |