Commit Graph

18 Commits

Author SHA1 Message Date
4717e4e835 catch up to upstream; it builds again!
Fixes #170.
Fixes #183.
2022-07-01 18:37:29 +03:00
271f69afc2 start fixing CI; this gets a bit further into the build 2022-07-01 16:31:03 +03:00
6b3bfba4c8 advice: disable doom-cli--ci-deploy-hooks 2021-12-10 15:10:20 +02:00
a52ca48dba advice.el: make it compatible with newer doom revisions
doom redefines `(message)` to use `(doom--print)` under the hood,
so the previous  advice caused an infinite recursion.

See: 4b5cf7d46f

Fixes: #233
2021-06-03 19:40:34 +02:00
7e434d3115 In emacs 28+ the 'comp-never-optimize-function was renamed to 'native-comp-never-optimize-functions.
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=31ca1c3e81b26357692c4c2428744f7f2f153596
2021-06-03 19:15:22 +02:00
6429948d05 advice.el: manually call (straight--make-build-cache-available)
Excerpt from build log:

> x There was an unexpected error
>   Message: Wrong type argument
>   Data: (wrong-type-argument . hash-table-p)
>   Backtrace:
>     (gethash auto-minor-mode nil)
>     (straight--get-dependencies auto-minor-mode)
>     (cons name (straight--get-dependencies name))
>     (let ((--dolist-tail-- (cons name (straight--get-dependencies name)))) (wh
>     (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (wit
>     (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled
>     (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-r
>     (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name
>     (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl
>     (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((packa
> ! Extended backtrace logged to /nix/store/56740akcqrwqji0ll3sn26z8cpq8c8sk-straight-emacs-env/doom.error.log
> builder for '/nix/store/z2pf5dl4n2kiwfmqb233zj0srkwyn5vp-straight-emacs-env.drv' failed with exit code 255
> cannot build derivation '/nix/store/ykmx8a4p0cn23ngpma5db35fzz1y50w4-emacs-with-packages-27.1.drv': 1 dependencies couldn't be built
> error: build of '/nix/store/ykmx8a4p0cn23ngpma5db35fzz1y50w4-emacs-with-packages-27.1.drv' failed

Issue has been introduced here:

> commit 2c646df0279091eb1ad32196ac93ff172c067997
> Author: Henrik Lissner <henrik@lissner.net>
> Date:   Fri Dec 11 02:12:56 2020 -0500
>
>     Initialize more straight state in doom-initialize-packages
>
>     May address #3172 and some issues with certain files failing to
>     byte-compile because certain dependencies were missing at compile-time

Fixes: #109
2020-12-16 17:38:21 +01:00
23cf6b9884 support gccEmacs
If built with gccEmacs, in `straight--native-compile-package` step tries
to access $HOME because `comp-eln-load-path` contains
"~/.emacs.d/eln-cache/". It errors on this as it is set to a readonly canary value of
`/homeless-shellter` in the nix build sandbox.

The workaround is twofold:
 * Ignore `kill-emacs` from optimization. It would result in eln file
   being written before doom sets up the load path outside of HOME.
 * The above solution doesn't help in the actual build phase because the
   worker processes compiling packages does not inherit this value but
   it is set in them at a later time. This causes the build to fail
   before `comp-eln-load-path` would be successfully overridden. Having
   a writable $HOME does not seem to produce any build output there
   hence the override and the check in `postInstall` to verify that the
   directory is indeed empty.

The runtime value of `comp-eln-load-path` also had to be changed because
it is by default is located under the volatile `doom-cache-dir` which is
not a part of the derivation so the build time generated `.eln` files
couldn't be loaded from that.

References: #57
2020-09-27 12:37:17 +02:00
314de52ee4 Prevent doom to kill emacs before dumping package list
New behavior is introduced here:
> commit e632871a115528a9c1ce90d7d2147873009716eb
> Author: Henrik Lissner <henrik@lissner.net>
> Date:   Mon Aug 24 00:36:52 2020 -0400
>
>     core-cli: backport more refactors from rewrite
>
>     Still a long way to go, but this introduces a few niceties for
>     debugging CLI failures:
>
>     + The (extended) output of the last bin/doom command is now logged to
>       ~/.emacs.d/.local/doom.log
>     + If an error occurs, short backtraces are displayed whether or not you
>       have debug mode on. The full backtrace is written to
>       ~/.emacs.d/.local/doom.error.log.
>     + bin/doom now aborts with a warning if:
>       - The script itself or its parent directory is a symlink. It's fine if
>         ~/.emacs.d is symlinked though.
>       - Running bin/doom as root when your DOOMDIR isn't in /root/.
>       - If you're sporting Emacs 26.1 (now handled in the elisp side rather
>         than the /bin/sh shebang preamble).
>     + If a 'doom sync' was aborted prematurely, you'll be warned that Doom
>       was left in an inconsistent state and that you must run `doom sync`
>       again.
>
>     May address #3746

The above commit introduces an explicit call to `(kill-emacs)` at the
end of doom cli's main function. This conflicts with `nix-straight.el`'s
package collection as it would run after doom is initialized.

The commit disables `(kill-emacs)` method while package collection is in
progress.
2020-08-30 19:12:42 +02:00
edea767bd1 Skip Emacs's own package verification and let Nix do it for us
having gnupg around the build triggers emacs to use it for package signature
verification. this would not work anyway because the build sandbox does not
have a properly configured user home and environment.

Fixes: #33
2020-08-15 18:54:46 +02:00
9df96bd3c5 Updating doom-emacs and compatibility shim 2020-05-28 22:54:18 +02:00
7add1505c0 Ensure that doom's customizations to straight.el take effect
`nix-straight.el` used to require `straight.el` on its own before `doom`
itself was loaded. This had an unfortunate side-effect that
`straight-fix-org` was set to nil after it has been loaded so
`org-version` and `org-git-version` functions were already overloaded.
This was no problem for `org-mode` itself as it has its own overload of
the above mentioned functions, but other libraries such as `elfeed` may
also use these which causes problems.

`nix-straight.el` is updated to a version where it does not preload
`straight` and an advice is provided to `doom` so it loads our version
of `straight` when it supposed to.

References: https://github.com/vlaci/nix-doom-emacs/issues/5
2020-03-16 19:15:20 +01:00
28aaf07321 doom-emacs: support newer revisions
workaround breakage introduced in

    commit 6f7bdc801a0b4d1a50f25b3c6d7d74858789a540
    Author: Henrik Lissner <henrik@lissner.net>
    Date:   Mon Dec 16 16:49:34 2019 -0500

        Make print! et co always respect standard-output
2019-12-21 14:22:42 +01:00
f2423d9e54 Updating doom and dependencies 2019-11-23 10:41:20 +01:00
1b540d189c updating doom emacs to upstream 2019-11-10 17:41:02 +01:00
d648dfc477 adding a prefix to logs emitted by the adjusted installer 2019-11-10 17:41:02 +01:00
8e36b53b3e Forcing no to all questions doom install would ask
Newer doom versions (after 873fc5c0db4876d9e1f347fa6cbd2a3a1933df69) has
a rewritten cli interface. I could not figure out how to pass `--no-env`
and `--no-fonts` (should check later if it is a bug in doom)
2019-11-10 17:41:02 +01:00
bdbf14a95b advice.el: removing unneeded advices 2019-11-10 17:41:02 +01:00
c6ae77570d Nix expression to install and configure doom-emacs 2019-10-23 22:15:54 +02:00