Closed utdemir closed 3 years ago
Good call, thanks for trying this out!
All the directories have to explicitly be added, by the way, otherwise builtins.path
won't recurse into them.
nix-filter {
root = ./.;
include = with nix-filter; [
(and
(or_ (inDirectory "src") (inDirectory "test"))
(or_ isDirectory (matchExt "hs")))
];
}
Thanks, I haven't thought of that! I'm looking forward to the issue you linked to have it more convenient.
or
, when used alone, seems to be a keyword. So, it's not possible to use the builtinor
matcher inside a with statement:fails with:
Although there is a workaround of using
nix-filter.or
, it would be nice to provide an alias, so something like above is possible. The first name I'd reach in this case would probably beor_
.I do not know why this isn't the case with
and
.