Should we implement builtins.filterSource as builtins.path ?

#372
Opened by raitobezarius at 2024-01-20T20·17+00

It is trivial that:

builtins.filterSource = filter: path: builtins.path { inherit filter path; };

Should we do like derivationStrict and implement this as a Nixlang builtin?

  1. I think we did implement builtins.derivation like this because we could just lift that .nix code from the Nix codebase, and we'd leave it up to benchmarks if it makes sense to RIIR.

    Considering you already wrote the code for both in Rust, not sure about using Nix for it. Should probably also be benchmarked. If it's no change in perf, but way less code, I'd be in favor.

    flokli at 2024-01-22T09·07+00