mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
Inject load-path when compiling straight packages
This commit is contained in:
@ -424,6 +424,17 @@ everywhere we use it (and internally)."
|
|||||||
cause)
|
cause)
|
||||||
interactive)))
|
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
|
;;; Entry point
|
||||||
|
Reference in New Issue
Block a user