mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* toString: don't copy paths. So toString can be used to pass
non-store paths to a builder.
This commit is contained in:
parent
7de5fe2fc2
commit
cf705eaf78
1 changed files with 4 additions and 3 deletions
|
@ -324,12 +324,13 @@ static Expr primDirOf(EvalState & state, const ATermVector & args)
|
|||
}
|
||||
|
||||
|
||||
/* Convert the argument to a string. */
|
||||
/* Convert the argument to a string. Paths are *not* copied to the
|
||||
store, so `toString /foo/bar' yields `"/foo/bar"', not
|
||||
`"/nix/store/whatever..."'. */
|
||||
static Expr primToString(EvalState & state, const ATermVector & args)
|
||||
{
|
||||
PathSet context;
|
||||
string s = coerceToString(state, args[0], context);
|
||||
/* !!! do lists etc */
|
||||
string s = coerceToString(state, args[0], context, true, false);
|
||||
return makeStr(s, context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue