1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

Add EvalState::coerceToStorePath() helper

This is useful whenever we want to evaluate something to a store path
(e.g. in get-drvs.cc).

Extracted from the lazy-trees branch (where we can require that a
store path must come from a store source tree accessor).
This commit is contained in:
Eelco Dolstra 2022-03-02 10:57:19 +01:00
parent 3e3d0711d4
commit b55d79728c
13 changed files with 123 additions and 101 deletions

View file

@ -272,6 +272,9 @@ public:
path. Nothing is copied to the store. */
Path coerceToPath(const Pos & pos, Value & v, PathSet & context);
/* Like coerceToPath, but the result must be a store path. */
StorePath coerceToStorePath(const Pos & pos, Value & v, PathSet & context);
public:
/* The base environment, containing the builtin functions and