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.
This commit is contained in:
parent
f150fe6c89
commit
80e6ef0d25
3 changed files with 17 additions and 8 deletions
4
doom.nix
4
doom.nix
|
|
@ -276,14 +276,14 @@ let
|
|||
# Required to avoid Doom erroring out at startup.
|
||||
nativeBuildInputs = [ git ];
|
||||
} ''
|
||||
mkdir $out $out/loader $out/profile
|
||||
mkdir $out $out/loader $out/profile $out/straight
|
||||
export DOOMPROFILELOADFILE=$out/loader/init.el
|
||||
export DOOMLOCALDIR=$(mktemp -d)
|
||||
# Prevent error on Emacs shutdown writing empty build cache.
|
||||
mkdir $DOOMLOCALDIR/straight
|
||||
|
||||
${runtimeShell} ${doomSource}/bin/doomscript ${./build-helpers/build-profile-loader} \
|
||||
-n "${profileName}" -p "$out/profile" -d "${finalDoomDir}"
|
||||
-n "${profileName}" -b "$out" -d "${finalDoomDir}"
|
||||
|
||||
# With DOOMPROFILE set, doom-state-dir and friends are HOME-relative.
|
||||
export HOME=$(mktemp -d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue