···159159 # but this is not fully specified, so let's tie this too much to the currently implemented concept of store paths.
160160 # Similar reasoning applies to the validity of the name part.
161161 # We care more about discerning store path-ness on realistic values. Making it airtight would be fragile and slow.
162162- && match ".{32}-.+" (elemAt components storeDirLength) != null;
162162+ && match ".{32}-.+" (elemAt components storeDirLength) != null
163163+ # alternatively match content‐addressed derivations, which _currently_ do
164164+ # not have a store directory prefix.
165165+ # This is a workaround for https://github.com/NixOS/nix/issues/12361 which
166166+ # was needed during the experimental phase of ca-derivations and should be
167167+ # removed once the issue has been resolved.
168168+ || match "[0-9a-z]{52}" (head components) != null;
163169164170in
165171# No rec! Add dependencies on this file at the top.