aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/filter-source.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/filter-source.nix')
-rw-r--r--tests/functional/filter-source.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/filter-source.nix b/tests/functional/filter-source.nix
new file mode 100644
index 000000000..907163639
--- /dev/null
+++ b/tests/functional/filter-source.nix
@@ -0,0 +1,12 @@
+with import ./config.nix;
+
+mkDerivation {
+ name = "filter";
+ builder = builtins.toFile "builder" "ln -s $input $out";
+ input =
+ let filter = path: type:
+ type != "symlink"
+ && baseNameOf path != "foo"
+ && !((import ./lang/lib.nix).hasSuffix ".bak" (baseNameOf path));
+ in builtins.filterSource filter ((builtins.getEnv "TEST_ROOT") + "/filterin");
+}