mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Get --readonly-mode to work again.
This commit is contained in:
parent
32aac8748a
commit
6d493751c3
1 changed files with 11 additions and 0 deletions
|
@ -100,8 +100,14 @@ static Path copyAtom(EvalState & state, const Path & srcPath)
|
|||
|
||||
Path drvPath = writeTerm(unparseStoreExpr(ne), "c");
|
||||
|
||||
/* !!! can we get rid of drvRoots? */
|
||||
state.drvRoots[drvPath] = ne.closure.roots;
|
||||
|
||||
/* Optimisation, but required in read-only mode! because in that
|
||||
case we don't actually write store expressions, so we can't
|
||||
read them later. */
|
||||
state.drvHashes[drvPath] = hashDerivationModulo(state, ne);
|
||||
|
||||
printMsg(lvlChatty, format("copied `%1%' -> closure `%2%'")
|
||||
% srcPath % drvPath);
|
||||
return drvPath;
|
||||
|
@ -326,6 +332,11 @@ static Expr primDerivation(EvalState & state, const ATermVector & _args)
|
|||
printMsg(lvlChatty, format("instantiated `%1%' -> `%2%'")
|
||||
% drvName % drvPath);
|
||||
|
||||
/* Optimisation, but required in read-only mode! because in that
|
||||
case we don't actually write store expressions, so we can't
|
||||
read them later. */
|
||||
state.drvHashes[drvPath] = hashDerivationModulo(state, ne);
|
||||
|
||||
/* !!! assumes a single output */
|
||||
attrs.set("outPath", makeAttrRHS(makePath(toATerm(outPath)), makeNoPos()));
|
||||
attrs.set("drvPath", makeAttrRHS(makePath(toATerm(drvPath)), makeNoPos()));
|
||||
|
|
Loading…
Reference in a new issue