From 1102e37e8dc6520e98b71b3611ed494858502aec Mon Sep 17 00:00:00 2001 From: ckie Date: Sun, 11 Sep 2022 15:26:32 +0300 Subject: [PATCH] default.nix#doomSrc: load burned in $out at $out/bin/doom --- default.nix | 2 ++ patches/cli-early-init-load.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 patches/cli-early-init-load.patch diff --git a/default.nix b/default.nix index 3db5fa5..799cf25 100644 --- a/default.nix +++ b/default.nix @@ -88,10 +88,12 @@ let phases = [ "unpackPhase" "patchPhase" "installPhase" ]; patches = [ ./patches/fix-paths.patch + ./patches/cli-early-init-load.patch ]; installPhase = '' mkdir -p $out cp -r * $out + substituteAllInPlace $out/bin/doom ''; }; diff --git a/patches/cli-early-init-load.patch b/patches/cli-early-init-load.patch new file mode 100644 index 0000000..2a84a4e --- /dev/null +++ b/patches/cli-early-init-load.patch @@ -0,0 +1,29 @@ +From 1a2407483dcf196f4bdd8ea4f24721c249878f25 Mon Sep 17 00:00:00 2001 +From: ckie +Date: Sun, 11 Sep 2022 14:41:48 +0300 +Subject: [PATCH] nix-doom-emacs(cli): don't load early-init automatically + +--- + bin/doom | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bin/doom b/bin/doom +index e8a77f66b..0fecba97c 100755 +--- a/bin/doom ++++ b/bin/doom +@@ -78,9 +78,9 @@ + ;; universal defaults, and autoloads for doom-*-initialize functions. + (condition-case e + (let ((load-prefer-newer t)) +- (load (expand-file-name +- "../early-init" (file-name-directory (file-truename load-file-name))) +- nil 'nomessage)) ++ (load "@out@/early-init.el" nil 'nomessage) ++ (load "@out@/lisp/doom.el" nil 'nomessage) ++ (load "@out@/lisp/doom-cli.el" nil 'nomessage)) + ;; Prevent ugly backtraces for trivial errors + (user-error (message "Error: %s" (cadr e)) + (kill-emacs 2))) +-- +2.37.1 +