Commit graph

339 commits

Author SHA1 Message Date
Marien Zwart
862177c24f
Add more documentation 2024-04-27 17:59:26 +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
c59e95e5d9
nix flake update 2024-04-27 13:17:21 +10:00
Marien Zwart
708e180792
Make Doom search config with ripgrep, not git
Doom's package help uses `git grep` to search for files in Doom
configuring a package, which does not work for us because our Doom
install does not live in a Git checkout. Unfortunately this breaks
package help completely because of error handling problems.

Add advice to use ripgrep instead, which fixes package help.

I don't like doing this: I've sent the same fix upstream, if it's not
accepted there I may just make Doom in the Nix store be a Git checkout.
2024-04-27 13:12:47 +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
f150fe6c89
Expose doomEmacs as an overlay
Exposing it as a package was (at least according to `nix flake check`)
incorrect.

This means we now use the user's nixpkgs's `pkgs.callPackage` instead of
our own, but I think that's ok.
2024-04-25 23:27:49 +10:00
Marien Zwart
7ccd40f8b0
Add a TODO about doom doctor support 2024-04-25 22:49:58 +10:00
Marien Zwart
cd68c073ed
Add some more documentation 2024-04-25 22:49:42 +10:00
Marien Zwart
300ccb8da3
Add some more documentation 2024-04-25 22:24:16 +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
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
6c394ec081
nix flake update 2024-04-25 15:14:49 +10:00
Marien Zwart
c9fa965a4d
Add a TODO / known issue 2024-04-25 15:14:21 +10:00
Marien Zwart
805ac42f5b
nix flake update 2024-04-19 21:13:08 +10:00
Marien Zwart
b74b2c0daf
nix flake update 2024-04-18 00:24:10 +10:00
Marien Zwart
c8ec8ec8f3
nix flake update 2024-04-16 20:10:46 +10:00
Marien Zwart
2928998ecc
nix flake update 2024-04-14 10:28:16 +10:00
Marien Zwart
af5d4604ae
nix flake update 2024-04-09 17:53:56 +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
4ec01fc08c
nix flake update 2024-04-08 20:12:36 +10:00
Marien Zwart
6136bc10ab
Make org aware of its release version
This fixes version checks against Org, like the one elfeed runs after
loading Org.
2024-04-07 22:04:45 +10:00
Marien Zwart
b6cd4a3794
Fix yasnippet startup warning 2024-04-07 21:00:19 +10:00
Marien Zwart
d05ecd9b19
Fix autoloads load order
Trying to start doom-example after enabling `scheme +guile` confirmed we
have at least one package (geiser-guile) that requires its dependency's
autoloads are loaded before its own are.

Fix it by assuming `package-activated-list` is in reverse order of
activation. That behavior is (as far as I could find) not documented,
but sufficiently obvious it seems safe enough to rely on it.
2024-04-07 20:40:12 +10:00
Marien Zwart
9fea22f0c5
Include package-activated-list in profile
This seemed reasonable before, and I'm currently debugging a load order
problem for which having this is useful.
2024-04-07 20:38:44 +10:00
Marien Zwart
367bce4bd1
Fix phpactor leaking /build/ into init.elc
Fixes doom-full build.
2024-04-07 18:56:32 +10:00
Marien Zwart
f7591a18bc
Enable more module flags in doom-example 2024-04-07 17:38:11 +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
3f61282923
nix flake update 2024-04-07 13:35:59 +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
68aa201f9b
Supply doomSource 2024-04-06 23:52:19 +11:00
Marien Zwart
03769febeb
Drop flake-parts
It's not really doing much for me, and it might be getting in the way of
my attempt at exposing a non-package in the `packages` flake output.
2024-04-06 23:41:35 +11:00
Marien Zwart
dbeda09006
First cut at making it usable from flakes 2024-04-06 22:48:59 +11:00
Marien Zwart
016e4a712f
nix flake update 2024-04-06 22:47:51 +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
8704e5f3ba
Fix defadvice signature 2024-04-01 21:59:09 +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
bd7d541c21
nix flake update 2024-03-31 20:47:54 +11:00
Marien Zwart
9d2bf9c263
Symlink instead of copy user DOOMDIR 2024-03-31 20:46:53 +11:00