mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-01 12:17:26 -05:00
Merge pull request #326 from thiagokokada/workaround-doom-modeline-issues
Workaround doom-modeline issues
This commit is contained in:
19
default.nix
19
default.nix
@ -75,7 +75,7 @@
|
||||
*/
|
||||
, dependencyOverrides ? { }
|
||||
, lib, pkgs, stdenv, buildEnv, makeWrapper
|
||||
, runCommand, fetchFromGitHub, substituteAll, writeShellScript
|
||||
, runCommand, fetchFromGitHub, writeShellScript
|
||||
, writeShellScriptBin, writeTextDir }:
|
||||
|
||||
assert (lib.assertMsg ((builtins.isPath doomPrivateDir)
|
||||
@ -136,7 +136,7 @@ let
|
||||
emacsPackages.overrideScope' overrides;
|
||||
emacs = emacsPackages.emacsWithPackages extraPackages;
|
||||
emacsLoadFiles = [ ./advice.el ];
|
||||
emacsArgs = [ "--" "install" ];
|
||||
emacsArgs = [ "--" "install" "--no-hooks" "--no-fonts" "--no-env" ];
|
||||
|
||||
# Need to reference a store path here, as byte-compilation will bake-in
|
||||
# absolute path to source files.
|
||||
@ -193,16 +193,13 @@ let
|
||||
src = doomSrc;
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./patches/nix-integration.patch;
|
||||
local = doomLocal;
|
||||
})
|
||||
./patches/nix-integration.patch
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
patchShebangs bin
|
||||
# Remove the windows wrapper for the CLI so the build doesn't fail
|
||||
rm bin/doom.cmd
|
||||
patchShebangs bin
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
@ -220,6 +217,7 @@ let
|
||||
chmod u+w $out/config.el
|
||||
cat $extraConfigPath > $out/config.extra.el
|
||||
cat > $out/config.el << EOF
|
||||
(load "${./workarounds.el}")
|
||||
(load "${doomPrivateDir}/config.el")
|
||||
(load "$out/config.extra.el")
|
||||
EOF
|
||||
@ -229,8 +227,7 @@ let
|
||||
# without installing ~/.emacs.d
|
||||
emacs = let
|
||||
load-config-from-site = writeTextDir "share/emacs/site-lisp/default.el" ''
|
||||
(message "doom-emacs is not placed in `doom-private-dir',
|
||||
loading from `site-lisp'")
|
||||
(message "doom-emacs is not placed in `doom-private-dir', loading from `site-lisp'")
|
||||
${# TODO: remove once Emacs 29+ is released and commonly available
|
||||
lib.optionalString (!isEmacs29) ''
|
||||
(load "${doom-emacs}/early-init.el")
|
||||
@ -271,10 +268,10 @@ in emacs.overrideAttrs (esuper:
|
||||
wrapEmacs() {
|
||||
local -a wrapArgs=(
|
||||
--set NIX_DOOM_EMACS_BINARY $1
|
||||
--set __DEBUG_doom_emacs_DIR ${doom-emacs}
|
||||
--set __DEBUG_doomLocal_DIR ${doomLocal}
|
||||
--set-default DOOMDIR ${doomDir}
|
||||
--set-default DOOMLOCALDIR ${doomLocal}
|
||||
--set-default __DEBUG_doom_emacs_DIR ${doom-emacs}
|
||||
--set-default __DEBUG_doomLocal_DIR ${doomLocal}
|
||||
)
|
||||
${initDirArgs}
|
||||
|
||||
|
18
flake.lock
generated
18
flake.lock
generated
@ -17,23 +17,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"doom-modeline": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1648449595,
|
||||
"narHash": "sha256-HjULFxtNDAJ7PDpy/e2bhoDYgBjwGpBdBoTY135puYA=",
|
||||
"owner": "seagle0128",
|
||||
"repo": "doom-modeline",
|
||||
"rev": "ce9899f00af40edb78f58b9af5c3685d67c8eed2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "seagle0128",
|
||||
"repo": "doom-modeline",
|
||||
"rev": "ce9899f00af40edb78f58b9af5c3685d67c8eed2",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"doom-snippets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -356,7 +339,6 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"doom-emacs": "doom-emacs",
|
||||
"doom-modeline": "doom-modeline",
|
||||
"doom-snippets": "doom-snippets",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"emacs-so-long": "emacs-so-long",
|
||||
|
@ -39,9 +39,6 @@
|
||||
# TODO: change back to master once we get synced back with upstream changes
|
||||
doom-emacs.url = "github:doomemacs/doomemacs/3853dff5e11655e858d0bfae64b70cb12ef685ac";
|
||||
doom-emacs.flake = false;
|
||||
# TODO remove pin once we get synced back with upstream changes
|
||||
doom-modeline.url = "github:seagle0128/doom-modeline/ce9899f00af40edb78f58b9af5c3685d67c8eed2";
|
||||
doom-modeline.flake = false;
|
||||
doom-snippets.url = "github:doomemacs/snippets";
|
||||
doom-snippets.flake = false;
|
||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
|
@ -8,15 +8,6 @@ self: super: {
|
||||
buildPhase = ":";
|
||||
} // args);
|
||||
|
||||
doom-modeline = self.straightBuild {
|
||||
pname = "doom-modeline";
|
||||
propagatedBuildInputs = with self; [
|
||||
all-the-icons
|
||||
compat
|
||||
shrink-path
|
||||
];
|
||||
};
|
||||
|
||||
doom-snippets = self.straightBuild {
|
||||
pname = "doom-snippets";
|
||||
postInstall = ''
|
||||
|
57
workarounds.el
Normal file
57
workarounds.el
Normal file
@ -0,0 +1,57 @@
|
||||
;;; workarounds.el --- Description -*- lexical-binding: t; -*-
|
||||
;;; Re-added functions removed in https://github.com/seagle0128/doom-modeline/commit/b596440ee78b3e7d2debc3d73f4d938d968fb896
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-minimal-modeline ()
|
||||
"Set minimal mode-line."
|
||||
(doom-modeline-set-modeline 'minimal))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-special-modeline ()
|
||||
"Set special mode-line."
|
||||
(doom-modeline-set-modeline 'special))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-project-modeline ()
|
||||
"Set project mode-line."
|
||||
(doom-modeline-set-modeline 'project))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-dashboard-modeline ()
|
||||
"Set dashboard mode-line."
|
||||
(doom-modeline-set-modeline 'dashboard))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-vcs-modeline ()
|
||||
"Set vcs mode-line."
|
||||
(doom-modeline-set-modeline 'vcs))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-info-modeline ()
|
||||
"Set Info mode-line."
|
||||
(doom-modeline-set-modeline 'info))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-package-modeline ()
|
||||
"Set package mode-line."
|
||||
(doom-modeline-set-modeline 'package))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-media-modeline ()
|
||||
"Set media mode-line."
|
||||
(doom-modeline-set-modeline 'media))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-message-modeline ()
|
||||
"Set message mode-line."
|
||||
(doom-modeline-set-modeline 'message))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-pdf-modeline ()
|
||||
"Set pdf mode-line."
|
||||
(doom-modeline-set-modeline 'pdf))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-modeline-set-org-src-modeline ()
|
||||
"Set org-src mode-line."
|
||||
(doom-modeline-set-modeline 'org-src))
|
Reference in New Issue
Block a user