#include "derivations.hh" #include "store-api.hh" #include "globals.hh" #include "util.hh" #include "misc.hh" namespace nix { void DerivationOutput::parseHashInfo(bool & recursive, HashType & hashType, Hash & hash) const { recursive = false; string algo = hashAlgo; if (string(algo, 0, 2) == "r:") { recursive = true; algo = string(algo, 2); } hashType = parseHashType(algo); if (hashType == htUnknown) throw Error(format("unknown hash algorithm `%1%'") % algo); hash = parseHash(hashType, this->hash); } Path writeDerivation(StoreAPI & store, const Derivation & drv, const string & name, bool repair) { PathSet references; references.insert(drv.inputSrcs.begin(), drv.inputSrcs.end()); foreach (DerivationInputs::const_iterator, i, drv.inputDrvs) references.insert(i->first); /* Note that the outputs of a derivation are *not* references (that can be missing (of course) and should not neces
aboutsummaryrefslogtreecommitdiff |