1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{ filterin }:
with import ./config.nix;
mkDerivation {
name = "filter";
builder = builtins.toFile "builder" "ln -s $input $out";
input =
builtins.path {
path = filterin;
filter = path: type:
type != "symlink"
&& (builtins.substring 0 (builtins.stringLength filterin) (builtins.toString path) == filterin)
&& baseNameOf path != "foo"
&& !(hasSuffix ".bak" (baseNameOf path));
};
}
|