Content-addressed nix-darwin fails to build correct setup-hook

It’s my semiannual attempt to use content-addressed Nix!

This time the failure is:

> nix log /nix/store/vmmb1bw1j1xwzqmxngk2j2hk43rvpaz3-gnum4-1.4.19.drv
/nix/store/xxiy7v1ncs8vmbh4gyqgx0w81hfb5qc2-bootstrap-stage1-clang-wrapper-boot/nix-support/setup-hook: line 61: export: `NIX_@wrapperName@_TARGET_HOST_@suffixSalt@=1': not a valid identifier
/nix/store/jb1pc4zgixsh55xvcr6dw9zzjdwp3d5y-bootstrap-stage1-stdenv-darwin/setup: line 866: pop_var_context: head of shell_variables not a function context
/nix/store/jb1pc4zgixsh55xvcr6dw9zzjdwp3d5y-bootstrap-stage1-stdenv-darwin/setup: line 873: pop_var_context: head of shell_variables not a function context

This is while building the #patrick output of my flake, after uncommenting the commented-out contentAddressedByDefault line.

The file which contains the invalid identifier (setup-hook) appears to be a concatenation of nixpkgs/pkgs/by-name/ap/apple-sdk/setup-hooks/role.bash at 271ad8a6123201357e397df692314026ac87f89c · NixOS/nixpkgs · GitHub and nixpkgs/pkgs/build-support/cc-wrapper/setup-hook.sh at 271ad8a6123201357e397df692314026ac87f89c · NixOS/nixpkgs · GitHub .

Any ideas from anyone who happens to know about this already, while I spend some time on-and-off working out where this is coming from?