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)
(message "[nix-doom-emacs] Inhibiting (kill-emacs)"))
(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
:around (lambda (orig-print &rest args)
(setq standard-output #'external-debugging-output)
(apply orig-print args)
(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 'nix-straight-get-used-packages
:around (lambda (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)))
(advice-add 'y-or-n-p
:override (lambda (q)

View File

@ -208,7 +208,7 @@ let
loading from `site-lisp'")
(when (> emacs-major-version 26)
(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 ]));

42
flake.lock generated
View File

@ -3,11 +3,11 @@
"doom-emacs": {
"flake": false,
"locked": {
"lastModified": 1654347726,
"narHash": "sha256-B4N+UQ0SvnCH0Hqc62Wl1KS6WcTBGLag0BoH3UZGbgo=",
"lastModified": 1656519163,
"narHash": "sha256-iNg3DnQJB6iIWLBsFGcloFHwwQUgrJeIQeNJHD7nwIo=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "bea3cc161c0a803dcf574f32ee555dccf565a5ce",
"rev": "c2f8476c8641fcc9a1371d873ed3b5924952a059",
"type": "github"
},
"original": {
@ -20,11 +20,11 @@
"doom-snippets": {
"flake": false,
"locked": {
"lastModified": 1651768501,
"narHash": "sha256-55mHNFfn3N8k4aWgswX9buATsOhQTJ0L05UaUNNMgDg=",
"lastModified": 1655900328,
"narHash": "sha256-fEYwFxW2sdzNK14DrS92OCGy8KDPZKewrHljnE/RlzQ=",
"owner": "doomemacs",
"repo": "snippets",
"rev": "f74b11b1e0fe8481e20f3065e355efe627e635de",
"rev": "6b2bd5a77c536ed414794ecf71d37a60ebd4663e",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
"emacs-overlay": {
"flake": false,
"locked": {
"lastModified": 1655408680,
"narHash": "sha256-E6s17Wg3NExV3cxFnVzTEHjcRyBBwvbx6acNEttU40A=",
"lastModified": 1656667522,
"narHash": "sha256-20rsPIbX4pihuiBQ0pb/0WrdijUjiHSjgOz1UXhGf68=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "270d5e914b4c0425a4982cf585c91d6760e78777",
"rev": "46492f286aefae3a4993d3c65f182618f98956e9",
"type": "github"
},
"original": {
@ -131,11 +131,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"lastModified": 1656065134,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github"
},
"original": {
@ -164,11 +164,11 @@
"nix-straight": {
"flake": false,
"locked": {
"lastModified": 1643475817,
"narHash": "sha256-NpExq5nbPbj/ppkBX3SnETEJuOne1MKJxen8vVHsDFg=",
"lastModified": 1656684255,
"narHash": "sha256-ZefQiv4Ipu2VkLjs1oyelTLU7kBVJgkcQd+yBpJU0yo=",
"owner": "nix-community",
"repo": "nix-straight.el",
"rev": "08d75e5651cb52f8a07e03408ed19e04bee07505",
"rev": "fb8dd5c44cde70abd13380766e40af7a63888942",
"type": "github"
},
"original": {
@ -179,11 +179,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1655390681,
"narHash": "sha256-SXGZ7jJWsySMlNEpbxi8nq3QYDbtcAl+QHwsXlWq2g0=",
"lastModified": 1656490020,
"narHash": "sha256-xonV1ITvAtwtoM58Iaz77mrkkj3NQKvP2QOPYZNiNvs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "29769d2a1390d294469bcc6518f17931953545e1",
"rev": "23488b5815ef60b3084a874f71fdae2dff52e1f7",
"type": "github"
},
"original": {
@ -227,11 +227,11 @@
"org": {
"flake": false,
"locked": {
"lastModified": 1655383862,
"narHash": "sha256-WZLa8ly+WjLVIhiKf0m1hwJ3c1BJVwBZgr9AHAJ6zQw=",
"lastModified": 1656574173,
"narHash": "sha256-Qbsa1b/S26ZudQ0XUtV1YB1pVVd7d9ZIo3UFYTQhe5o=",
"owner": "emacs-straight",
"repo": "org-mode",
"rev": "e9da29b6fafe63abbc2774e9d485ac13d2811b65",
"rev": "381a2ae4dd439b5f246873ae6630c1e303c35287",
"type": "github"
},
"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>
Date: Fri, 1 Jul 2022 16:09:11 +0300
Date: Fri, 1 Jul 2022 18:34:52 +0300
Subject: [PATCH] Nix integration
---
core/core-cli-lib.el | 2 +-
core/core.el | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
core/core-cli-lib.el | 2 +-
core/core.el | 18 ++++++------------
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el
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.")
diff --git a/core/core.el b/core/core.el
index 07254e602..cb80b0991 100644
index 07254e602..23d26843a 100644
--- a/core/core.el
+++ b/core/core.el
@@ -143,7 +143,7 @@ envvar will enable this at startup.")
@ -30,7 +30,7 @@ index 07254e602..cb80b0991 100644
(if-let (localdir (getenv-internal "DOOMLOCALDIR"))
(expand-file-name (file-name-as-directory localdir))
- (concat doom-emacs-dir ".local/"))
+ (concat doom-emacs-dir "@local@"))
+ "@local@/")
"Root directory for local storage.
Use this as a storage location for this system's installation of Doom Emacs.
@ -40,7 +40,7 @@ index 07254e602..cb80b0991 100644
;; DEPRECATED
-(defconst doom-etc-dir (concat doom-local-dir "etc/")
+; 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.
Use this for files that don't change much, like server binaries, external
@ -48,11 +48,28 @@ index 07254e602..cb80b0991 100644
;; DEPRECATED
-(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.
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
;; deleted by 'doom upgrade').
(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;
}