File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 22
33source common.sh
44
5+ # Regression test for #11503.
6+ mkdir -p " $TEST_ROOT /directory"
7+ cat > " $TEST_ROOT /directory/default.nix" << EOF
8+ let
9+ root = ./.;
10+ filter = path: type:
11+ let
12+ rootStr = builtins.toString ./.;
13+ in
14+ if builtins.substring 0 (builtins.stringLength rootStr) (builtins.toString path) == rootStr then true
15+ else builtins.throw "root path\n\$ {rootStr}\nnot prefix of path\n\$ {builtins.toString path}";
16+ in
17+ builtins.filterSource filter root
18+ EOF
19+
20+ result=" $( nix-store --add-fixed --recursive sha256 $TEST_ROOT /directory) "
21+ nix-instantiate --eval " $result "
22+ nix-instantiate --eval " $result " --store " $TEST_ROOT /2nd-store"
23+ nix-store --add-fixed --recursive sha256 " $TEST_ROOT /directory" --store " $TEST_ROOT /2nd-store"
24+ nix-instantiate --eval " $result " --store " $TEST_ROOT /2nd-store"
25+
26+ # Misc tests.
527echo example > " $TEST_ROOT " /example.txt
628mkdir -p " $TEST_ROOT /x"
729
You can’t perform that action at this time.
0 commit comments