mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Move some Store functions from derivations.cc to store-api.cc
This further continues with the dependency inverstion. Also I just went ahead and exposed `parseDerivation`: it seems like the more proper building block, and not a bad thing to expose if we are trying to be less wedded to drv files on disk anywas.
This commit is contained in:
parent
7130f0a3a6
commit
18493fd9c4
5 changed files with 38 additions and 45 deletions
|
@ -103,7 +103,7 @@ static void prim_scopedImport(EvalState & state, const Pos & pos, Value * * args
|
|||
|
||||
// FIXME
|
||||
if (state.store->isStorePath(path) && state.store->isValidPath(state.store->parseStorePath(path)) && isDerivation(path)) {
|
||||
Derivation drv = readDerivation(*state.store, realPath);
|
||||
Derivation drv = state.store->readDerivation(state.store->parseStorePath(path));
|
||||
Value & w = *state.allocValue();
|
||||
state.mkAttrs(w, 3 + drv.outputs.size());
|
||||
Value * v2 = state.allocAttr(w, state.sDrvPath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue