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.
This commit is contained in:
Marien Zwart 2024-05-26 14:42:07 +10:00
parent a4338aad5c
commit 3f2a482afd
No known key found for this signature in database
3 changed files with 61 additions and 5 deletions

View file

@ -56,6 +56,24 @@ let
inherit (lib) optionalAttrs optionalString;
inherit (import ./fetch-overrides.nix) extraPins extraUrls;
# This doesn't belong here: it does not depend on doomDir (only on doomSource).
# But this is where all my doomscript execution lives.
# TODO: consider splitting off doomdir execution to a separate helper.
doomDirWithAllPackages = runCommandLocal "doom-full-init"
{
env = {
EMACS = lib.getExe emacs;
# Enable this to troubleshoot failures at this step.
#DEBUG = "1";
};
# We set DOOMLOCALDIR somewhere harmless below to stop Doom from trying to
# create it somewhere read-only.
} ''
mkdir $out
export DOOMLOCALDIR=$(mktemp -d)
${runtimeShell} ${doomSource}/bin/doomscript ${./build-helpers/full-init} -o $out
'';
# Step 1: determine which Emacs packages to pull in.
#
# Inputs: Doom, original DOOMDIR (only init.el and packages.el are used).
@ -412,5 +430,5 @@ let
'';
in
{
inherit doomEmacs emacsWithDoom;
inherit doomDirWithAllPackages doomEmacs emacsWithDoom;
}