From e4b0666f8eee3fc48f37c0cd3fd194c27652173c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Jan 2007 08:54:51 +0000 Subject: * builtins.filterSource: pass the type of the file ("regular", "directory", "symlink") as the second argument to the filter predicate. --- tests/filter-source.nix.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/filter-source.nix.in') diff --git a/tests/filter-source.nix.in b/tests/filter-source.nix.in index 2b5c23d31765..8493835c2b93 100644 --- a/tests/filter-source.nix.in +++ b/tests/filter-source.nix.in @@ -3,5 +3,7 @@ derivation { system = "@system@"; builder = "@shell@"; args = ["-e" "-x" (builtins.toFile "builder" "PATH=@testPath@; ln -s $input $out")]; - input = builtins.filterSource (path: baseNameOf (toString path) != "foo") ./test-tmp/filterin; + input = + let filter = path: type: type != "symlink" && baseNameOf (toString path) != "foo"; + in builtins.filterSource filter ./test-tmp/filterin; } -- cgit 1.4.1