about summary refs log tree commit diff
path: root/tests/filter-source.nix
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-03-17T17·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-03-17T17·11+0000
commit51e7e32c3bf7c2fb5045b0655c2edc1fbf347455 (patch)
tree21337c26d0106fa92b5f82854f623640b24dc34e /tests/filter-source.nix
parent2d5114452d8a8f73c858f9beb6bfaafe35e7bf9a (diff)
* Refactoring: renamed *.nix.in to *.nix.
Diffstat (limited to 'tests/filter-source.nix')
-rw-r--r--tests/filter-source.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/filter-source.nix b/tests/filter-source.nix
new file mode 100644
index 000000000000..a620f0fda5c4
--- /dev/null
+++ b/tests/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 ./test-tmp/filterin;
+}