From 7add1505c0f07ba75bc718142a776701024814aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Mon, 16 Mar 2020 19:03:01 +0100 Subject: [PATCH 1/2] Ensure that doom's customizations to straight.el take effect `nix-straight.el` used to require `straight.el` on its own before `doom` itself was loaded. This had an unfortunate side-effect that `straight-fix-org` was set to nil after it has been loaded so `org-version` and `org-git-version` functions were already overloaded. This was no problem for `org-mode` itself as it has its own overload of the above mentioned functions, but other libraries such as `elfeed` may also use these which causes problems. `nix-straight.el` is updated to a version where it does not preload `straight` and an advice is provided to `doom` so it loads our version of `straight` when it supposed to. References: https://github.com/vlaci/nix-doom-emacs/issues/5 --- advice.el | 4 ++++ nix/sources.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/advice.el b/advice.el index ebc9a10..ece0c4f 100644 --- a/advice.el +++ b/advice.el @@ -17,3 +17,7 @@ ;;; 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-ensure-straight + :override (lambda (&rest r) (require 'straight))) diff --git a/nix/sources.json b/nix/sources.json index 01ab760..f7abed8 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -84,15 +84,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nix-straight.el": { - "branch": "v1.2.0", + "branch": "v2.0.0", "description": null, "homepage": null, "owner": "vlaci", "repo": "nix-straight.el", - "rev": "446f3d70f1816305130f307c0cf2bc8db77ed698", - "sha256": "1p4yp46kwhii8w9yf882fca9r3addn91wg6f4mv62wnkfm0i6q0f", + "rev": "b0ac8033a448c609645b4d9b5ff5f90de608f326", + "sha256": "1vgdjfyz8964mixwfcv30lmkjfgsmsw8vl23x1964izr2cfh2dy6", "type": "tarball", - "url": "https://github.com/vlaci/nix-straight.el/archive/446f3d70f1816305130f307c0cf2bc8db77ed698.tar.gz", + "url": "https://github.com/vlaci/nix-straight.el/archive/b0ac8033a448c609645b4d9b5ff5f90de608f326.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "org-mode": { From 4502c277596ea4f7cfdc0a6b77aba1d68faedab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Mon, 16 Mar 2020 19:12:24 +0100 Subject: [PATCH 2/2] Fix git command shim References: https://github.com/vlaci/nix-doom-emacs/issues/5 --- default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index abf9cf5..6c7bce1 100644 --- a/default.nix +++ b/default.nix @@ -49,7 +49,7 @@ , runCommand , fetchFromGitHub , substituteAll -, writeScriptBin +, writeShellScriptBin , writeTextDir }: let @@ -163,8 +163,9 @@ let # I don't know why but byte-compilation somehow triggers Emacs to look for # the git executable. It does not seem to be executed though... - git = writeScriptBin "git" '' - >&2 echo Executing git is not allowed; command line: "$@" + git = writeShellScriptBin "git" '' + >&2 echo "Executing git is not allowed; command line:" "$@" + exit 127 ''; in (straight-env.emacsEnv { inherit packages;