Fix macOS sandbox build
Fix macOS sandbox build

Since c4c3c15c19bc448a4797e5d9577539cc14890618 (#4251) building Nix for
macOS with sandboxing fails:
```
getting status of /nix/var/nix/profiles/per-user/root/channels/nixpkgs: Operation not permitted
```

This happens, because `EvalSettings::getDefaultNixPath` tries to access
paths outside the sandbox. Since the state-dir is not required for
doc generation, it is set to the dummy folder. This needs to be done
for all nix invocations during doc generation, as
`EvalSettings::getDefaultNixPath` is called unconditionally.

rycee/nix,rycee/nix,rycee/nix,rycee/nix,NixOS/nix,NixOS/nix,NixOS/nix,rycee/nix,NixOS/nix,NixOS/nix