catch up to upstream; it builds again!

Fixes #170.
Fixes #183.
This commit is contained in:
ckie
2022-07-01 18:37:29 +03:00
parent 271f69afc2
commit 4717e4e835
7 changed files with 72 additions and 49 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.DS_Store
.idea
*.log
tmp/
result

View File

@ -19,23 +19,18 @@
) )
(defun nix-straight-inhibit-kill-emacs (arg) (defun nix-straight-inhibit-kill-emacs (arg)
(message "[nix-doom-emacs] Inhibiting (kill-emacs)")) (message "[nix-doom-emacs] Inhibiting (kill-emacs)"))
(advice-add 'nix-straight-get-used-packages (advice-add 'nix-straight-get-used-packages
:around (lambda (orig-fn &rest r) :around (lambda (ns-fn &rest r)
(message "[nix-doom-emacs] Advising doom installer to gather packages to install...") (message "[nix-doom-emacs] Advising doom to keep it alive...")
(advice-add 'doom-autoloads-reload (advice-add 'doom-autoloads-reload
:override (lambda (&optional file force-p) :override (lambda (&optional file force-p)
(message "[nix-doom-emacs] Skipping generating autoloads..."))) (message "[nix-doom-emacs] Skipping generating autoloads...")))
(advice-add 'doom-print (advice-add 'kill-emacs
:around (lambda (orig-print &rest args) :override #'nix-straight-inhibit-kill-emacs)
(setq standard-output #'external-debugging-output) (apply ns-fn r)
(apply orig-print args) (advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs)))
(setq standard-output 't)))
(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 (advice-add 'y-or-n-p
:override (lambda (q) :override (lambda (q)

View File

@ -208,7 +208,7 @@ let
loading from `site-lisp'") loading from `site-lisp'")
(when (> emacs-major-version 26) (when (> emacs-major-version 26)
(load "${doom-emacs}/early-init.el")) (load "${doom-emacs}/early-init.el"))
(load "${doom-emacs}/init.el") (load "${doom-emacs}/core/core-start.el")
''; '';
in (emacsPackages.emacsWithPackages (epkgs: [ load-config-from-site ])); in (emacsPackages.emacsWithPackages (epkgs: [ load-config-from-site ]));

42
flake.lock generated
View File

@ -3,11 +3,11 @@
"doom-emacs": { "doom-emacs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1654347726, "lastModified": 1656519163,
"narHash": "sha256-B4N+UQ0SvnCH0Hqc62Wl1KS6WcTBGLag0BoH3UZGbgo=", "narHash": "sha256-iNg3DnQJB6iIWLBsFGcloFHwwQUgrJeIQeNJHD7nwIo=",
"owner": "doomemacs", "owner": "doomemacs",
"repo": "doomemacs", "repo": "doomemacs",
"rev": "bea3cc161c0a803dcf574f32ee555dccf565a5ce", "rev": "c2f8476c8641fcc9a1371d873ed3b5924952a059",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
"doom-snippets": { "doom-snippets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1651768501, "lastModified": 1655900328,
"narHash": "sha256-55mHNFfn3N8k4aWgswX9buATsOhQTJ0L05UaUNNMgDg=", "narHash": "sha256-fEYwFxW2sdzNK14DrS92OCGy8KDPZKewrHljnE/RlzQ=",
"owner": "doomemacs", "owner": "doomemacs",
"repo": "snippets", "repo": "snippets",
"rev": "f74b11b1e0fe8481e20f3065e355efe627e635de", "rev": "6b2bd5a77c536ed414794ecf71d37a60ebd4663e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,11 +36,11 @@
"emacs-overlay": { "emacs-overlay": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1655408680, "lastModified": 1656667522,
"narHash": "sha256-E6s17Wg3NExV3cxFnVzTEHjcRyBBwvbx6acNEttU40A=", "narHash": "sha256-20rsPIbX4pihuiBQ0pb/0WrdijUjiHSjgOz1UXhGf68=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "270d5e914b4c0425a4982cf585c91d6760e78777", "rev": "46492f286aefae3a4993d3c65f182618f98956e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -131,11 +131,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1656065134,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -164,11 +164,11 @@
"nix-straight": { "nix-straight": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1643475817, "lastModified": 1656684255,
"narHash": "sha256-NpExq5nbPbj/ppkBX3SnETEJuOne1MKJxen8vVHsDFg=", "narHash": "sha256-ZefQiv4Ipu2VkLjs1oyelTLU7kBVJgkcQd+yBpJU0yo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-straight.el", "repo": "nix-straight.el",
"rev": "08d75e5651cb52f8a07e03408ed19e04bee07505", "rev": "fb8dd5c44cde70abd13380766e40af7a63888942",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -179,11 +179,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1655390681, "lastModified": 1656490020,
"narHash": "sha256-SXGZ7jJWsySMlNEpbxi8nq3QYDbtcAl+QHwsXlWq2g0=", "narHash": "sha256-xonV1ITvAtwtoM58Iaz77mrkkj3NQKvP2QOPYZNiNvs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "29769d2a1390d294469bcc6518f17931953545e1", "rev": "23488b5815ef60b3084a874f71fdae2dff52e1f7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -227,11 +227,11 @@
"org": { "org": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1655383862, "lastModified": 1656574173,
"narHash": "sha256-WZLa8ly+WjLVIhiKf0m1hwJ3c1BJVwBZgr9AHAJ6zQw=", "narHash": "sha256-Qbsa1b/S26ZudQ0XUtV1YB1pVVd7d9ZIo3UFYTQhe5o=",
"owner": "emacs-straight", "owner": "emacs-straight",
"repo": "org-mode", "repo": "org-mode",
"rev": "e9da29b6fafe63abbc2774e9d485ac13d2811b65", "rev": "381a2ae4dd439b5f246873ae6630c1e303c35287",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,12 +1,12 @@
From e1a22ff755ee961d4981134b8bcbfabedcf67bee Mon Sep 17 00:00:00 2001 From aa6b52ddbf17b9abc4ad9f30f3d430445b2b6923 Mon Sep 17 00:00:00 2001
From: ckie <git-525ff67@ckie.dev> From: ckie <git-525ff67@ckie.dev>
Date: Fri, 1 Jul 2022 16:09:11 +0300 Date: Fri, 1 Jul 2022 18:34:52 +0300
Subject: [PATCH] Nix integration Subject: [PATCH] Nix integration
--- ---
core/core-cli-lib.el | 2 +- core/core-cli-lib.el | 2 +-
core/core.el | 8 +++++--- core/core.el | 18 ++++++------------
2 files changed, 6 insertions(+), 4 deletions(-) 2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el
index 5881bb564..8d5a9381d 100644 index 5881bb564..8d5a9381d 100644
@ -22,7 +22,7 @@ index 5881bb564..8d5a9381d 100644
Must have two arguments, one for session id and the other for log type.") Must have two arguments, one for session id and the other for log type.")
diff --git a/core/core.el b/core/core.el diff --git a/core/core.el b/core/core.el
index 07254e602..cb80b0991 100644 index 07254e602..23d26843a 100644
--- a/core/core.el --- a/core/core.el
+++ b/core/core.el +++ b/core/core.el
@@ -143,7 +143,7 @@ envvar will enable this at startup.") @@ -143,7 +143,7 @@ envvar will enable this at startup.")
@ -30,7 +30,7 @@ index 07254e602..cb80b0991 100644
(if-let (localdir (getenv-internal "DOOMLOCALDIR")) (if-let (localdir (getenv-internal "DOOMLOCALDIR"))
(expand-file-name (file-name-as-directory localdir)) (expand-file-name (file-name-as-directory localdir))
- (concat doom-emacs-dir ".local/")) - (concat doom-emacs-dir ".local/"))
+ (concat doom-emacs-dir "@local@")) + "@local@/")
"Root directory for local storage. "Root directory for local storage.
Use this as a storage location for this system's installation of Doom Emacs. Use this as a storage location for this system's installation of Doom Emacs.
@ -40,7 +40,7 @@ index 07254e602..cb80b0991 100644
;; DEPRECATED ;; DEPRECATED
-(defconst doom-etc-dir (concat doom-local-dir "etc/") -(defconst doom-etc-dir (concat doom-local-dir "etc/")
+; nix-doom-emacs: This doesn't meet XDG but backwards compatibility is a thing. +; nix-doom-emacs: This doesn't meet XDG but backwards compatibility is a thing.
+(defconst doom-etc-dir (concat doom-local-dir "~/.local/doom") +(defconst doom-etc-dir "~/.local/doom"
"Directory for non-volatile local storage. "Directory for non-volatile local storage.
Use this for files that don't change much, like server binaries, external Use this for files that don't change much, like server binaries, external
@ -48,11 +48,28 @@ index 07254e602..cb80b0991 100644
;; DEPRECATED ;; DEPRECATED
-(defconst doom-cache-dir (concat doom-local-dir "cache/") -(defconst doom-cache-dir (concat doom-local-dir "cache/")
+(defconst doom-cache-dir (concat doom-local-dir "~/.cache/doom") +(defconst doom-cache-dir "~/.cache/doom"
"Directory for volatile local storage. "Directory for volatile local storage.
Use this for files that change often, like cache files. Must end with a slash.") Use this for files that change often, like cache files. Must end with a slash.")
@@ -238,6 +239,7 @@ users).") @@ -167,15 +168,7 @@ Use this for files that change often, like cache files. Must end with a slash.")
(defconst doom-docs-dir (concat doom-emacs-dir "docs/")
"Where Doom's documentation files are stored. Must end with a slash.")
-(defconst doom-private-dir
- (if-let (doomdir (getenv-internal "DOOMDIR"))
- (expand-file-name (file-name-as-directory doomdir))
- (or (let ((xdgdir
- (expand-file-name "doom/"
- (or (getenv-internal "XDG_CONFIG_HOME")
- "~/.config"))))
- (if (file-directory-p xdgdir) xdgdir))
- "~/.doom.d/"))
+(defconst doom-private-dir (expand-file-name (file-name-as-directory (getenv-internal "DOOMDIR")))
"Where your private configuration is placed.
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
@@ -238,6 +231,7 @@ users).")
;; Don't store eln files in ~/.emacs.d/eln-cache (where they can easily be ;; Don't store eln files in ~/.emacs.d/eln-cache (where they can easily be
;; deleted by 'doom upgrade'). ;; deleted by 'doom upgrade').
(add-to-list 'native-comp-eln-load-path (concat doom-cache-dir "eln/")) (add-to-list 'native-comp-eln-load-path (concat doom-cache-dir "eln/"))

1
result
View File

@ -1 +0,0 @@
/nix/store/46rxb7v3yqisakm0sd0a7w28gxwnfs5g-emacs-with-packages-28.1

View File

@ -0,0 +1,7 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.callPackage (import ../default.nix) {
doomPrivateDir = ./doom.d;
bundledPackages = true;
dependencyOverrides.nix-straight = ../../nix-straight.el;
}