Files
nix/tests/functional/lang/eval-okay-path.nix
Robert Hensing 0068d58b18 tests: builtins.path: add explicit directory hash test
Add a test case that explicitly demonstrates NAR hashing of a directory
without using a filter. Add comments to clarify what each test case is
testing (NAR vs flat hashing).
2025-12-29 22:16:54 +01:00

24 lines
614 B
Nix

[
# NAR hash of directory with filter
(builtins.path {
path = ./.;
filter = path: _: baseNameOf path == "data";
recursive = true;
sha256 = "1yhm3gwvg5a41yylymgblsclk95fs6jy72w0wv925mmidlhcq4sw";
name = "output";
})
# Flat hash of file
(builtins.path {
path = ./data;
recursive = false;
sha256 = "0k4lwj58f2w5yh92ilrwy9917pycipbrdrr13vbb3yd02j09vfxm";
name = "output";
})
# NAR hash of directory (recursive = true is the default)
(builtins.path {
path = ./dir1;
sha256 = "02vlkcjkl1rvy081n6d40qi73biv2w4b9x9biklay4ncgk77zr1f";
name = "output";
})
]