nix-community / nix-doom-emacs

doom-emacs packaged for Nix [maintainers=@thiagokokada]
MIT License
224 stars 43 forks source link

Installation hangs when using pkgs.emacsPgtk #409

Open svenihoney opened 1 year ago

svenihoney commented 1 year ago

I try to install to an unstable NixOS system. Installation works fine with the default emacs-28 package. Since I would like to use the pgtk version due to native wayland support, I added the pgtk package as an option. With it, the installation does stall.

I use the following snippet to install doom-emacs successfully:

{pkgs, ...}: {
  programs.doom-emacs = {
    enable = true;

    doomPrivateDir = ./doom.d;
    # emacsPackage = pkgs.emacsPgtk;
  };
}

As soon as I remove the comment, the installation stalls at the message

[1/0/1 built] building emacs-straight-packages.json (installPhase): [nix-doom-emacs] Inhibiting (kill-emacs)
Pacman99 commented 1 year ago

I'm having this issue with the latest pgtk also, I'm using the build here https://hydra.nix-community.org/build/4091521#tabs-details

FlorianFranzen commented 1 year ago

Running into the same issue, even when using emacsUnstable (29.0.90, with pgtk). Breakage happened somewhere between c843e0a9 and ebac6712 on emacs master for me.

So it is probably best to just stay on the currently pinned version.

ulysses4ever commented 1 year ago

Same here. @FlorianFranzen how do I pin the emacs version?

ulysses4ever commented 1 year ago

Also, it looks like emacs-overlay was pinned in this project: https://github.com/nix-community/nix-doom-emacs/commit/c283bcf19b64aba8c50d5618cb58457967f6cdb7

Suyashtnt commented 1 year ago

Any updates on the situation? I'm also stuck

strobe commented 1 year ago

having same issue on 23.05 but with pkgs.emacsGit

fr33zing commented 1 year ago

A month ago I used to get the inhibiting forever issue, but now I get this:

error: builder for '/nix/store/gcmrm4zy418dfdl6ijn0f3mmg5mzn6i6-emacs-irony-20220110.849.drv' failed with exit code 2;
       last 10 log lines:
       >
       > Total Test time (real) =   1.15 sec
       >
       > The following tests FAILED:
       >     1 - check-irony-el (Failed)
       > Errors while running CTest
       > make[3]: *** [test/CMakeFiles/check.dir/build.make:70: test/CMakeFiles/check] Error 8
       > make[2]: *** [CMakeFiles/Makefile2:1022: test/CMakeFiles/check.dir/all] Error 2
       > make[1]: *** [CMakeFiles/Makefile2:1029: test/CMakeFiles/check.dir/rule] Error 2
       > make: *** [Makefile:608: check] Error 2
       For full logs, run 'nix log /nix/store/gcmrm4zy418dfdl6ijn0f3mmg5mzn6i6-emacs-irony-20220110.849.drv'.
error: 1 dependencies of derivation '/nix/store/cnh6s4w15bzs48rlr21icp6y9nk5a6s0-install-repo.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x68bkja0gbgbl9zc447s2my0fmx84ffc-straight-emacs-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/08krr089zwnsvdidx0q2035jfkiwc76g-emacs-pgtk-with-packages-20230213.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zr96c48kp3fjp5153h6bk0sy05ygrxd5-editor.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fp2l72xvvjqsmvkkr6kqvpmb7l9c4hh7-emacs-pgtk-with-packages-with-packages-20230213.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n8ffvyszih0np0vdvn69daq15kj02cf3-emacs.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/drxhf3wqvjjlpijlrciql00qa8lkf9ad-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/v9fk72pdqh81jjjsfpwpyf7faba6bwry-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/lfalnrffv8fwqhdv9n3l97k98p97ivni-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5xllk44axqq8cy2nqnmbk7cz2il89hq8-unit-home-manager-redacted.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l8gc4axrcmwcww7k9m5kwrri48br5a45-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h8dj316kvjmzbdvl88zcx9nbzznw66nm-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/msvgbhqav1cc5nrxrl2wx99fqa9wf8ff-nixos-system-x670e-23.11.20230617.04af42f.drv' failed to build
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
Test project /build/source/server/test
    Start 1: check-irony-el
    Start 2: check-irony-iotask-el
    Start 3: check-irony-cdb-json-el
1/3 Test #3: check-irony-cdb-json-el ..........   Passed    0.14 sec
2/3 Test #1: check-irony-el ...................***Failed    0.14 sec
Loading /build/source/server/test/elisp/test-config.el (source)...
Package cl is deprecated
../../../irony-iotask.el: Warning: Case 'value will match `quote'.  If that's intended, write (value quote) instead.  Otherwise, don't quote `value'.
../../../irony-iotask.el: Warning: Case 'error will match `quote'.  If that's intended, write (error quote) instead.  Otherwise, don't quote `error'.
../../../irony.el: Warning: Use keywords rather than deprecated positional arguments to `define-minor-mode'
Test `irony/split-command-line/with-quotes' redefined

Error: error ("Test `irony/split-command-line/with-quotes' redefined")
  debug-early-backtrace()
  debug-early(error (error "Test `irony/split-command-line/with-quotes' redefined"))
  error("Test `%s' redefined" irony/split-command-line/with-quotes)
  ert-set-test(irony/split-command-line/with-quotes #s(ert-test :name irony/split-command-line/with-quotes :documentation "Test if files are removed from the arguments list.\n\nhttps://github.com/Sarcasm/irony-mode/issues/101" :body (lambda nil (let ((cmd-line "g++ -DFOO=\\\"\\\"")) (let* ((fn-47 #'equal) (args-48 (condition-case err>
  load-with-code-conversion("/build/source/server/test/elisp/irony.el" "/build/source/server/test/elisp/irony.el" nil t)
  command-line-1(("-l" "package" "--eval" "(package-initialize)" "--eval" "(unless (require 'cl-lib nil t) (package-refresh-contents) (package-install 'cl-lib))" "-l" "/build/source/server/test/elisp/irony.el" "-f" "ert-run-tests-batch-and-exit"))
  command-line()
  normal-top-level()

3/3 Test #2: check-irony-iotask-el ............   Passed    1.15 sec

67% tests passed, 1 tests failed out of 3

Total Test time (real) =   1.15 sec

The following tests FAILED:
          1 - check-irony-el (Failed)
Errors while running CTest
make[3]: *** [test/CMakeFiles/check.dir/build.make:70: test/CMakeFiles/check] Error 8
make[2]: *** [CMakeFiles/Makefile2:1022: test/CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1029: test/CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:608: check] Error 2
FlorianFranzen commented 1 year ago

I am still facing this problem trying to use a recent unstable emacs with pgtk enabled. I used the USR2 signal to force emacs to the following build output:

@nix { "action": "setPhase", "phase": "installPhase" }
installing
[nix-doom-emacs] Advising doom to keep it alive...
Loading /nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-src/bin/doom...
Debugger entered--Lisp error: (void-variable native-comp-deferred-compilation-deny-list)
  add-to-list(native-comp-deferred-compilation-deny-list "/emacs-jupyter.*\\.el\\'" nil nil)
  apply(add-to-list (native-comp-deferred-compilation-deny-list "/emacs-jupyter.*\\.el\\'"))
  #f(compiled-function (&rest args2) #<bytecode -0x14e28b8651152eff>)("/emacs-jupyter.*\\.el\\'")
  mapc(#f(compiled-function (&rest args2) #<bytecode -0x14e28b8651152eff>) ("/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))
  (closure (t) nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'")))()
  eval-after-load(comp (closure (t) nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))
  (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'")))))
  (progn (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))) (setq native-comp-eln-load-path (delete (file-name-concat doom-emacs-dir "eln-cache/") native-comp-eln-load-path)))
  (if (featurep 'native-compile) (progn (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial ... ...) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))) (setq native-comp-eln-load-path (delete (file-name-concat doom-emacs-dir "eln-cache/") native-comp-eln-load-path))))
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-packages)
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-cli-lib)
  (progn (require 'doom-cli-lib))
  (if noninteractive (progn (require 'doom-cli-lib)))
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s...")
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-cli "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s...")
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil nil)
  load("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil nil t)
  (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let ((pkg (if ... ... recipe))) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if (member pkg nix-straight--packages) nix-straight--packages (setq nix-straight--packages (cons pkg nix-straight--packages)))))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)
  (closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages))("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  apply((closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) ("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-..."))
  (closure (t) (ns-fn &rest r) (message "[nix-doom-emacs] Advising doom to keep it alive...") (advice-add 'doom-autoloads-reload :override #'(lambda (&optional file force-p) (message "[nix-doom-emacs] Skipping generating autoloads..."))) (advice-add 'kill-emacs :override #'nix-straight-inhibit-kill-emacs) (apply ns-fn r) (advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs))((closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  apply((closure (t) (ns-fn &rest r) (message "[nix-doom-emacs] Advising doom to keep it alive...") (advice-add 'doom-autoloads-reload :override #'(lambda (&optional file force-p) (message "[nix-doom-emacs] Skipping generating autoloads..."))) (advice-add 'kill-emacs :override #'nix-straight-inhibit-kill-emacs) (apply ns-fn r) (advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs)) (closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) ("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-..."))
  nix-straight-get-used-packages("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  command-line-1(("--directory=/nix/store/cr8vp5pw0l8q1r2gwsn2yzwbk54..." "--load=/nix/store/bq8zfm7wx30qlj400ddixmfraz5az4lm..." "--load=/nix/store/6fjl3dj431j2kxpl3w919wng02ynxlgq..." "--eval=(nix-straight-get-used-packages \"/nix/store..." "--" "install" "--no-hooks" "--no-fonts" "--no-env"))
  command-line()
  normal-top-level()

[nix-doom-emacs] Inhibiting (kill-emacs)

Debugger entered--entering a function:
* clear-minibuffer-message()
  recursive-edit()
  debug(error (void-variable native-comp-deferred-compilation-deny-list))
  add-to-list(native-comp-deferred-compilation-deny-list "/emacs-jupyter.*\\.el\\'" nil nil)
  apply(add-to-list (native-comp-deferred-compilation-deny-list "/emacs-jupyter.*\\.el\\'"))
  #f(compiled-function (&rest args2) #<bytecode -0x14e28b8651152eff>)("/emacs-jupyter.*\\.el\\'")
  mapc(#f(compiled-function (&rest args2) #<bytecode -0x14e28b8651152eff>) ("/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))
  (closure (t) nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'")))()
  eval-after-load(comp (closure (t) nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))
  (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'")))))
  (progn (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))) (setq native-comp-eln-load-path (delete (file-name-concat doom-emacs-dir "eln-cache/") native-comp-eln-load-path)))
  (if (featurep 'native-compile) (progn (progn (eval-after-load 'comp #'(lambda nil (mapc (doom-partial ... ...) (list "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'"))))) (setq native-comp-eln-load-path (delete (file-name-concat doom-emacs-dir "eln-cache/") native-comp-eln-load-path))))
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-packages)
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-cli-lib)
  (progn (require 'doom-cli-lib))
  (if noninteractive (progn (require 'doom-cli-lib)))
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s...")
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil t)
  require(doom-cli "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s...")
  load-with-code-conversion("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil nil)
  load("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." nil nil t)
  (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let ((pkg (if ... ... recipe))) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if (member pkg nix-straight--packages) nix-straight--packages (setq nix-straight--packages (cons pkg nix-straight--packages)))))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)
  (closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages))("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  apply((closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) ("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-..."))
  (closure (t) (ns-fn &rest r) (message "[nix-doom-emacs] Advising doom to keep it alive...") (advice-add 'doom-autoloads-reload :override #'(lambda (&optional file force-p) (message "[nix-doom-emacs] Skipping generating autoloads..."))) (advice-add 'kill-emacs :override #'nix-straight-inhibit-kill-emacs) (apply ns-fn r) (advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs))((closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) "/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  apply((closure (t) (ns-fn &rest r) (message "[nix-doom-emacs] Advising doom to keep it alive...") (advice-add 'doom-autoloads-reload :override #'(lambda (&optional file force-p) (message "[nix-doom-emacs] Skipping generating autoloads..."))) (advice-add 'kill-emacs :override #'nix-straight-inhibit-kill-emacs) (apply ns-fn r) (advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs)) (closure (t) (init-file output-file) (let ((nix-straight--packages nil)) (advice-add 'straight-use-package :override #'(lambda (recipe &rest r) (let (...) (message "[nix-straight.el] Collecting package '%s' from rec..." pkg recipe) (if ... nix-straight--packages ...)))) (load init-file nil nil t) (let ((json-pkgs (if (null nix-straight--packages) "[]" (json-encode nix-straight--packages)))) (write-region json-pkgs nil output-file)) nix-straight--packages)) ("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-..."))
  nix-straight-get-used-packages("/nix/store/lc77ydx16jcg1zpb8bnhj95272djacgn-doom-s..." "/nix/store/q0w92z3r47i1jzzqhnywk83ykg9jny34-emacs-...")
  command-line-1(("--directory=/nix/store/cr8vp5pw0l8q1r2gwsn2yzwbk54..." "--load=/nix/store/bq8zfm7wx30qlj400ddixmfraz5az4lm..." "--load=/nix/store/6fjl3dj431j2kxpl3w919wng02ynxlgq..." "--eval=(nix-straight-get-used-packages \"/nix/store..." "--" "install" "--no-hooks" "--no-fonts" "--no-env"))
  command-line()
  normal-top-level()

[nix-doom-emacs] Inhibiting (kill-emacs)

Quit

So there is a good chance the underlying cause, at least in my case, is related to doomemacs/doomemacs#5592

FlorianFranzen commented 1 year ago

Could also just be that the option got renamed and it hangs because of that, i.e. similar to radian-software/straight.el#1059, then again doom should have fixed that a while ago already in doomemacs/doomemacs#7090, but we do not include that fix yet.

librephoenix commented 1 year ago

This probably isn't an elegant fix, but I made a quick patch of nix-straight.el, just putting the aforementioned patch from doomemacs/doomemacs#7090 into the top of it. Rebuilding nix-doom-emacs with that patch works, except strangely, with the cc module from init.el activated, there's a compilation error with irony:

error: builder for '/nix/store/mfxrsmdnkx7mcmwy8rc37la3zrwslb47-emacs-irony-20220110.849.drv' failed with exit code 2;
       last 10 log lines:
       >
       > Total Test time (real) =   1.35 sec
       >
       > The following tests FAILED:
       >     1 - check-irony-el (Failed)
       > Errors while running CTest
       > make[3]: *** [test/CMakeFiles/check.dir/build.make:70: test/CMakeFiles/check] Error 8
       > make[2]: *** [CMakeFiles/Makefile2:1022: test/CMakeFiles/check.dir/all] Error 2
       > make[1]: *** [CMakeFiles/Makefile2:1029: test/CMakeFiles/check.dir/rule] Error 2
       > make: *** [Makefile:608: check] Error 2
       For full logs, run 'nix log /nix/store/mfxrsmdnkx7mcmwy8rc37la3zrwslb47-emacs-irony-20220110.849.drv'.
error: 1 dependencies of derivation '/nix/store/fyac0qkwrscki6wfzil1zxhz8x14z17d-install-repo.drv' failed to build
error: 1 dependencies of derivation '/nix/store/68vjbvwlbgmy18dnb2lg569kjrxlmny1-straight-emacs-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nfcj5a3jmdchyggyrb8zxapryyhayggh-emacs-pgtk-with-packages-29.1-rc1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/059yx2jbfiwj2c3p3qdy2jwv2r9iawrl-emacs-pgtk-with-packages-with-packages-29.1-rc1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k85rpb2rlwy8wii925zh12p2nl8x4rbc-emacs.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4lf7z1qrx30z180n05wl0956svn1385v-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zwwvlccc8q4vp8yky3qcmcw368zml4m1-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p5w7g0dydz05igwlj60kwk0hydyf7av1-home-manager-generation.drv' failed to build

but I don't know if that is relevant here. It seems to work otherwise.

If this is any use to anyone for the time being, I have this patch bundled here which I am using/testing.

Flake input would be: nix-doom-emacs.url = "github:librephoenix/nix-doom-emacs?ref=pgtk-patch";

and I've only tested it so far with the pkgs.emacs29-pgtk package.

skiletro commented 1 year ago

@librephoenix Unsure if this is the right place to put it, but this patch stopped working after a recent update requiring a version argument

librephoenix commented 1 year ago

@skiletro Had that problem a few weeks ago since I'm running unstable.

Since I couldn't figure out how to fix it the "proper" way, I added a nixpkgs patch to my flake here. It essentially undoes 35ccb9d, which requires the version and throws the error. It's a kind of hacky fix, but it seems to work for now.

I can't find the tutorial I used to patch nixpkgs in my flake, but here's my flake and the patch for reference:

The important parts of the flake boil down to:

    # create patched nixpkgs
    nixpkgs-patched = (import nixpkgs { inherit system; }).applyPatches {
      name = "nixpkgs-patched";
      src = nixpkgs;
      patches = [ ./patches/emacs-no-version-check.patch ];
    };

    # configure pkgs
    pkgs = import nixpkgs-patched {
      inherit system;
      config = { allowUnfree = true; };
    };

Hope this helps. Happy hacking!

codingkoi commented 1 year ago

@librephoenix It looks like the upstream nix-straight.el repo has a fix for the "version" issue.

Combining your changes with the latest version of theirs, I got the build working with pkgs.emacs29 which wasn't working before (it was hanging on the "Inhibiting" message).

Here's the branch on my fork that fixes it: https://github.com/codingkoi/nix-straight.el/tree/codingkoi/apply-librephoenixs-fix (:warning: I not planning to maintain this fork in the long term.)

And you can use it by changing flake inputs similar to the following:

{
  inputs = {
    # ... other inputs
    nix-straight = {
      url = "github:codingkoi/nix-straight.el?ref=codingkoi/apply-librephoenixs-fix";
      flake = false;
    };
    nix-doom-emacs = {
      url = "github:nix-community/nix-doom-emacs";
      inputs = {
        nix-straight.follows = "nix-straight";
        # ... whatever other follows you might want to set like nixpkgs or emacs-overlay
      };
    };
  };
  outputs = {...};
}

I'm not sure if the upstream repo would want to accept your change, since it might be specific to nix-doom-emacs being pinned to an older version of Doom Emacs, but you might consider it, since it was your solution.

ckiee commented 1 year ago

I'll gladly merge the native-comp-deferred-compilation-deny-list patch if it's submitted as a PR, eventually.

mrdev023 commented 6 months ago

Same issue just with

programs.doom-emacs = {
      enable = true;
      doomPrivateDir = ./doom.d;
    };
danielgomez3 commented 5 months ago

Still experiencing this issue, hoping there's a fix! Using as a home-manager flake:

doom-emacs = {
   enable = false;
   doomPrivateDir = ./doom.d; 
};