mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Add test for builtins.path
This commit is contained in:
parent
0744f7f83b
commit
0bdd6cf6ea
2 changed files with 26 additions and 6 deletions
14
tests/path.nix
Normal file
14
tests/path.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
with import ./config.nix;
|
||||
|
||||
mkDerivation {
|
||||
name = "filter";
|
||||
builder = builtins.toFile "builder" "ln -s $input $out";
|
||||
input =
|
||||
builtins.path {
|
||||
path = ((builtins.getEnv "TEST_ROOT") + "/filterin");
|
||||
filter = path: type:
|
||||
type != "symlink"
|
||||
&& baseNameOf path != "foo"
|
||||
&& !((import ./lang/lib.nix).hasSuffix ".bak" (baseNameOf path));
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue