Fix phpactor leaking /build/ into init.elc
Fixes doom-full build.
This commit is contained in:
parent
f7591a18bc
commit
367bce4bd1
3 changed files with 36 additions and 17 deletions
18
README.md
18
README.md
|
|
@ -94,23 +94,7 @@ I am open to suggestions for how this should work:
|
|||
- If we try to use home-manager, I would expect to hit the same problems
|
||||
and/or collisions on activation, but I have not experimented with this.
|
||||
|
||||
### `php` module without `+lsp` breaks the build
|
||||
|
||||
Enabling the `php` module without enabling the `+lsp` flag currently breaks the
|
||||
build with:
|
||||
|
||||
```
|
||||
> Doom profile contains a forbidden reference to /build/
|
||||
```
|
||||
|
||||
This is triggered by
|
||||
[emacs-php](https://github.com/emacs-php/phpactor.el/blob/8733fef84b458457c1bfd188cfb861fc3150ee1c/phpactor.el#L71-L72)
|
||||
determining the location of the user's Emacs directory at byte-compile time. I
|
||||
do not know why it does this yet (it seems undesirable).
|
||||
|
||||
Upstream recommends migrating to LSP.
|
||||
|
||||
### Other flag-controlled packages may be broken
|
||||
### Flag-controlled packages may be broken
|
||||
|
||||
Doom supports listing all packages (including ones pulled in by modules that are
|
||||
not currently enabled). Unstraightened uses this to build-test them. However,
|
||||
|
|
|
|||
|
|
@ -145,6 +145,12 @@
|
|||
done
|
||||
'';
|
||||
};
|
||||
# Fix /build/ leaking into byte-compiled files (patch accepted upstream).
|
||||
phpactor = esuper.phpactor.overrideAttrs (attrs: {
|
||||
patches = (attrs.patches or [ ]) ++ [
|
||||
./elisp-patches/0001-Do-not-call-locate-user-emacs-file-when-compiling.patch
|
||||
];
|
||||
});
|
||||
# Make it byte-compile properly.
|
||||
code-review = esuper.code-review.overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ git ];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
From 9d0a3eb98982c38bfe1e1872498538b103ad06cd Mon Sep 17 00:00:00 2001
|
||||
From: Marien Zwart <marienz@google.com>
|
||||
Date: Sun, 7 Apr 2024 17:46:36 +1000
|
||||
Subject: [PATCH] Do not call locate-user-emacs-file when compiling
|
||||
|
||||
The default value of phpactor-install-directory is relative to the
|
||||
user's user-emacs-directory. Using eval-when-compile here hardcodes the
|
||||
wrong directory if a separate build user is used.
|
||||
---
|
||||
phpactor.el | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/phpactor.el b/phpactor.el
|
||||
index 7e7c036..96de425 100644
|
||||
--- a/phpactor.el
|
||||
+++ b/phpactor.el
|
||||
@@ -68,8 +68,7 @@
|
||||
|
||||
;;;###autoload
|
||||
(defcustom phpactor-install-directory
|
||||
- (eval-when-compile
|
||||
- (expand-file-name (locate-user-emacs-file "phpactor/")))
|
||||
+ (expand-file-name (locate-user-emacs-file "phpactor/"))
|
||||
"Directory for setup Phactor. (default `~/.emacs.d/phpactor/')."
|
||||
:type 'directory)
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue