1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 06:11:46 +02:00

Add builtins.filterPath

This is like builtins.{filterSource,path}, but returns a virtual path
that applies the filter lazily, rather than copying the result to the
Nix store. Thus filterPath can be composed.
This commit is contained in:
Eelco Dolstra 2022-12-19 13:45:06 +01:00
parent 15d2e0e63b
commit b48e64162a
6 changed files with 263 additions and 21 deletions

View file

@ -525,6 +525,13 @@ public:
*/
[[nodiscard]] StringMap realiseContext(const PathSet & context);
/* Call the binary path filter predicate used builtins.path etc. */
bool callPathFilter(
Value * filterFun,
const SourcePath & path,
std::string_view pathArg,
PosIdx pos);
private:
unsigned long nrEnvs = 0;