Commit graph

36 commits

Author SHA1 Message Date
Marien Zwart
a784fcdbe9
Install doomscript in emacsWithDoom 2024-04-28 16:50:58 +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
2babb2ed6a
Chain-load user init.el instead of embedding it
Mostly to avoid sticking our copyright header on top of the user's
init.el.
2024-04-28 15:23:31 +10:00
Marien Zwart
727bcf40e4
Add LICENSE (and license headers) 2024-04-28 12:26:05 +10:00
Marien Zwart
0b1947effc
Install doomscript
Convenient for testing our build helpers.
2024-04-27 21:41:50 +10:00
Marien Zwart
7d16c1db5e
Whitespace/comment tweaks 2024-04-27 21:34:44 +10:00
Marien Zwart
c09022717d
Pull fetch overrides out of doom.nix
No reason, they just felt out of place.
2024-04-27 21:28:39 +10:00
Marien Zwart
d9aad25bec
Add emacsWithDoom to overlay 2024-04-27 16:14:28 +10:00
Marien Zwart
1399755050
Require init.el exists
Although a completely empty DOOMDIR seems to work (at least for build
purposes), I doubt Doom actually supports this. And it requires some
extra checks on our side as well.

Just check in a trivial DOOMDIR and use that instead.
2024-04-27 14:53:17 +10:00
Marien Zwart
f8fcb9f904
Drop obsolete temp dir creation
Since we're writing the straight.el build cache to the profile now, the
build process using $DOOMLOCALDIR/straight would be a bug. Stop creating
it.
2024-04-27 14:31:24 +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
7ccd40f8b0
Add a TODO about doom doctor support 2024-04-25 22:49:58 +10:00
Marien Zwart
7c5144178b
Remove unused import 2024-04-25 17:51:24 +10:00
Marien Zwart
7d4248f310
Pass profile name as env var, not argument
Fixes `emacs --batch`: Doom does not process the --profile argument when
non-interactive, causing Emacs to complain about the unrecognized option.
2024-04-25 17:11:07 +10:00
Marien Zwart
9e9c822ec2
Fix build of doom-minimal / doom-full
This broke a while back without me noticing. I should set up proper
tests...
2024-04-25 17:00:39 +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
Marien Zwart
8a36d1e188
Set doom-local-dir
Although not used much with doomProfile set, the default (.local in the
Doom source tree) will not work.

Currently straight-base-dir ends up relative to this, although that may
change.
2024-04-08 21:43:54 +10:00
Marien Zwart
b7b306da0c
Propagate dependencies for generated packages
Fixes corfu-terminal, which was not pulling in its popon dependency
correctly.
2024-04-08 21:18:10 +10:00
Marien Zwart
4f0f6fc607
Disable doom-initialize-core-packages at runtime
...by moving the existing hack from the CLI to init.el.

It's not really necessary to do this as early as init.el, but I'm coming
around to using init.el modifications as an alternative to using Doom's
profile loader. So we might as well do this in the same place.

This is not sufficient to make doom/help-packages work, but gets us one
step closer...
2024-04-08 21:11:36 +10:00
Marien Zwart
b6cd4a3794
Fix yasnippet startup warning 2024-04-07 21:00:19 +10:00
Marien Zwart
0719e304b4
Make doomDir mandatory but possibly empty
Having this empty only really makes sense for minimal/full test builds.

Also, /var/empty was not doing what it looks like (it's not accessible
from inside the build sandbox). Use nixpkgs's emptyDirectory instead.
2024-04-07 14:12:53 +10:00
Marien Zwart
bacffdb146
Specify url for corfu-terminal
We need to override the assumed emacs-straight mirror for this one...
2024-04-07 00:15:10 +11:00
Marien Zwart
db3fa5674f
Include package name in recipe derivation name 2024-04-06 22:25:48 +11:00
Marien Zwart
679b76adda
Drop stray debug trace 2024-04-06 22:23:58 +11:00
Marien Zwart
fa30695cf3
Fix common-lisp module
dd95f8fb3d
adds an unpinned dependency on sly-stepper, which is not in MELPA (nor
separately packaged in nixpkgs).

Pin it ourselves.
2024-04-05 23:34:52 +11:00
Marien Zwart
701298497c
Write some documentation
Motivated by noticing phpactor breaks the build, and not having anywhere
obvious to write down why...
2024-04-01 00:01:13 +11:00
Marien Zwart
14686461b2
Load package.el autoloads from Doom profile
This should get us to the point of being usable.
2024-03-31 21:58:59 +11:00
Marien Zwart
9d2bf9c263
Symlink instead of copy user DOOMDIR 2024-03-31 20:46:53 +11:00
Marien Zwart
17eecff29e
Verify no build directories leak into the profile 2024-03-31 20:44:24 +11:00
Marien Zwart
0f80026223
Pass profile dirs as args instead of profiles.el
Writing profiles.el was borderline unreadable.
`doom-profiles-autodetect` was effectively just reading in the entire
file: accepting the paths we want in the profile as individual args and
putting them together on the Emacs side is easy enough.

Accidentally fixes a bug: `user-emacs-directory` should end in a
directory separator. We now get the right value for free by using the
path we're running Doom CLI out of.
2024-03-31 17:28:34 +11:00
Marien Zwart
ffe2eae6cb
Make output binary name configurable 2024-03-31 16:51:00 +11:00
Marien Zwart
03eaf7517f
Pull commentary into separate documentation 2024-03-31 16:47:48 +11:00
Marien Zwart
ca42470bc7
Tweak profile directory layout
doom-profile-data-dir is for the current profile, naming it
"profiles" (plural) made no sense.

Also move the loader into its own subdir so it's more obvious what the
two init.29.elc files are.
2024-03-31 15:44:27 +11:00
Marien Zwart
6c260297ee
Rename package.nix to doom.nix 2024-03-31 15:39:43 +11:00
Renamed from package.nix (Browse further)