This unsets DOOMPROFILE from inside the profile loader, which should
result in Doom behaving as if we were not using profiles at all.
I'm marking this experimental in part because it feels like a hack, and
in part because this is not sufficient to fix `doom doctor`.
Add an (empty) straight.el build cache to the generated profile, and
load it when Doom calls `doom-initialize-core-packages` (which normally
does so by side effect).
Unfortunately requires adding to pre-init: Doom overrides
`straight-base-dir`, and we need to override that override.
Partially fixes package help.
I somehow managed to lowercase build-profile and build-profile-loader
when I split them out of cli2.el. Undo this.
The only load-bearing capitalization was DOOMDIR in the profile loader.
Everything else was comments and docstrings.
Our cli.el ended up in the profile used at runtime. Although we could
have fixed overwriting a user's cli.el by appending to it, that still
would have leaked our build commands into the build.
This approach should be equivalent and reduces our profile modifications
to replacing packages.el (which is kind of the point) and prepending to
init.el (unfortunate, but seemingly necessary).