Commit graph

15 commits

Author SHA1 Message Date
Marien Zwart
f48edf8b34
Test against init.el with all module flags enabled
Detect module flags by walking package.el files.

This still does not build all dependencies, because some are enabled
only if some flag or other module is disabled. But this should be close.
2024-05-27 20:11:06 +10:00
Marien Zwart
313b9ef400
Remove "full" build flag
No longer used.
2024-05-27 20:10:59 +10:00
Marien Zwart
3f2a482afd
Test with a generated init.el with all modules
...not yet with all flags, but that's the next step.

This surfaced several problems not caught by the existing "full" build,
because that did not enable dependencies conditionally enabled if a
second module is enabled.

There are a small number of dependencies only enabled if a second module
is *not* enabled, which I intend to add some manual tests for.
2024-05-27 20:08:17 +10:00
Marien Zwart
61839cf1ab
Set DOOMDIR in the wrapper, not the profile loader
Both approaches are about equivalent, but since I'm trying to make the
profile loader optional and there's no way I can make the wrapper
optional, let's move this around...
2024-04-28 17:44:19 +10:00
Marien Zwart
603c36e90c
Simplify setting straight-base-dir
Instead of passing the path down from the profile loader to init.el,
just substitute the path into init.el.

This requires moving DOOMDIR generation into the same derivation as
profile build to avoid a circular dependency.
2024-04-28 17:33:43 +10:00
Marien Zwart
e602ad8bed
Add hack to use non-profile paths
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`.
2024-04-28 16:39:50 +10:00
Marien Zwart
727bcf40e4
Add LICENSE (and license headers) 2024-04-28 12:26:05 +10:00
Marien Zwart
68d5ec704b
Add script to check for byte-compile failures
Just a manual check for now.
2024-04-27 21:25:29 +10:00
Marien Zwart
54c396f24b
Drop unnecessary TODO
Info already works: Doom has `Info-directory-list` in
`doom-autoloads-cached-vars`, which seems to be all that's required.
2024-04-27 20:15:03 +10:00
Marien Zwart
45568feecf
Tweak comment, dropping stale TODO
Buliding an empty autoloads file is harmless. Removing it would only
have been useful if I was able to skip straight.el initialization
entirely: now that I'm storing its build cache it no longer helps.
2024-04-27 20:02:15 +10:00
Marien Zwart
974aaf2160
Refactor some elisp out of doom.nix
Just for readability, no functional change.
2024-04-27 14:21:34 +10:00
Marien Zwart
80e6ef0d25
Provide straight--build-cache
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.
2024-04-27 13:06:46 +10:00
Marien Zwart
7fe4e9e170
Restore capitalization
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.
2024-04-25 20:33:33 +10:00
Marien Zwart
bc288fad83
Use doomscript instead of cli.el for profile build
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).
2024-04-25 16:23:55 +10:00
Marien Zwart
e41bb2e0e5
Use doomscript instead of cli.el for dumping
Removes the need to build a stage1 DOOMDIR, we can just use the user's
DOOMDIR directly.

The same approach should work for the next stage, removing the need to
leave our cli.el in the final DOOMDIR.
2024-04-25 16:09:42 +10:00