mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-07 12:47:32 -05:00
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
47 lines
2.0 KiB
EmacsLisp
47 lines
2.0 KiB
EmacsLisp
;;; -*- lexical-binding: t; -*-
|
|
|
|
;;; 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.
|
|
(setq package-check-signature nil)
|
|
|
|
;;; For gccEmacs compatibility
|
|
(with-eval-after-load "comp"
|
|
;; The advice for 'kill-emacs would result in eln files being written before
|
|
;; doom would set up proper load paths
|
|
(add-to-list 'comp-never-optimize-functions 'kill-emacs))
|
|
|
|
(defun nix-straight-inhibit-kill-emacs (arg)
|
|
(message "[nix-doom-emacs] Inhibiting (kill-emacs)"))
|
|
|
|
(advice-add 'nix-straight-get-used-packages
|
|
:around (lambda (orig-fn &rest r)
|
|
(message "[nix-doom-emacs] Advising doom installer to gather packages to install...")
|
|
(advice-add 'doom-autoloads-reload
|
|
:override (lambda (&optional file force-p)
|
|
(message "[nix-doom-emacs] Skipping generating autoloads...")))
|
|
(advice-add 'doom--print
|
|
:override (lambda (output)
|
|
(message output)))
|
|
(advice-add 'kill-emacs
|
|
:override #'nix-straight-inhibit-kill-emacs)
|
|
(apply orig-fn r)
|
|
(advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs)))
|
|
|
|
(advice-add 'y-or-n-p
|
|
:override (lambda (q)
|
|
(message "%s \n[nix-doom-emacs] --> answering NO" q)
|
|
nil))
|
|
|
|
;;; org is not installed from git, so no fixup is needed
|
|
(advice-add '+org-fix-package-h
|
|
:override (lambda (&rest r)))
|
|
|
|
;; just use straight provided by nix
|
|
(advice-add 'doom-initialize-core-packages
|
|
:override (lambda (&rest r)
|
|
(require 'straight)
|
|
(straight--make-build-cache-available)))
|