The assertion message should include the `nixpkgs.config` value, however
it currently includes the entire `nixpkgs.config` _option_.
This means the type, declarations, definitions, etc were all printed.
package-build is also in MELPA. Currently, two packages depend on
it. When building such a package, package-build is added to
EMACSLOADPATH by the setup hook. Previously, package-initialize is
called in the buildPhase of melpaBuild, which may cause package-build
from MELPA to be used instead of the pinned one depending on the
entries of EMACSLOADPATH.
This patch removes the unneeded package-initialize to make sure the
pinned package-build is used.
Accidentally, this patch reduces build time of emacsPackages from 30
minutes to 24 minutes on my machine.
Previously, trivialBuild did not know how to find its elisp
dependencies. This was[1] fixed[2] by basically rewriting part of
package-activate-all in bash.
I think it is better to call package-activate-all (or
package-initialize if Emacs is old) directly. It reduces maintenance
burden a bit. It also improves consistency since elpaBuild and
melpaBuild already do so.
This change provides almost the same functionality as before. It only
breaks elisp packages with non-standard[^3] elisp dependencies.
However, I think those non-standard ones should be fixed instead.
As an example, mu4e used to be a non-standard one and was fixed[4].
This change does not cause more build failures in emacsPackages.
[1]: https://github.com/NixOS/nixpkgs/pull/82604
[2]: bf486f784d
[^3]: Non-standard elisp packages do not meet requirements of
package.el, the builtin package manager of Emacs. Usually, they are
installed to $out/share/emacs/site-lisp/$pname-$version and/or miss a
$pname-pkg.el file.
[4]: https://github.com/NixOS/nixpkgs/pull/253438