Inject load-path when compiling straight packages
This commit is contained in:
parent
cb09f1778b
commit
eacbc5e36f
1 changed files with 11 additions and 0 deletions
|
@ -424,6 +424,17 @@ everywhere we use it (and internally)."
|
|||
cause)
|
||||
interactive)))
|
||||
|
||||
(defadvice! doom--straight-inject-load-path-a (orig-fn &rest args)
|
||||
"Straight builds packages in an isolated Emacs child process, which "
|
||||
:override #'straight--build-compile
|
||||
(let* ((package (plist-get recipe :package))
|
||||
(dir (straight--build-dir package)))
|
||||
(call-process (concat invocation-directory invocation-name)
|
||||
nil straight-byte-compilation-buffer nil
|
||||
"-Q" "--batch"
|
||||
"--eval" (prin1-to-string `(setq load-path (cons ,dir ',load-path)))
|
||||
"--eval" (format "(byte-recompile-directory %S 0 'force)" dir))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Entry point
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue