fix(lib): package!: add :env property

Allows the association of arbitrary envvars or variables with the build
artifacts of a package. If they change, the package is rebuilt on the
next 'doom sync'. This is a temporary measure, which is why this is not
touted as a new feature. It will be replaced in v3.
This commit is contained in:
Henrik Lissner
2025-09-22 22:30:30 -04:00
parent 1bc2af6ce5
commit 87a7efcea6
3 changed files with 41 additions and 3 deletions

View File

@@ -1601,7 +1601,7 @@ For more about modules and flags, see `doom!'."
;;; `doom-package'
(cl-defmacro package!
(name &rest plist &key built-in recipe ignore _type _pin _disable)
(name &rest plist &key built-in recipe ignore _type _pin _disable _env)
"Declares a package and how to install it (if applicable).
This macro is declarative and does not load nor install packages. It is used to
@@ -1638,6 +1638,9 @@ Accepts the following properties:
inform help commands like `doom/help-packages' that this is a built-in
package. If set to 'prefer, the package will not be installed if it is
already provided by Emacs.
:env ALIST
Parameters and envvars to set while the package is building. If these values
change, the package will be rebuilt on next 'doom sync'.
Returns t if package is successfully registered, and nil if it was disabled
elsewhere."