about summary refs log tree commit diff
path: root/tools/emacs/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-15T22·59+0000
committerGitHub <noreply@github.com>2019-12-15T22·59+0000
commite8b184adcc56e2ce6c0cbb86d45344e4f1ac98af (patch)
tree8f9573801796c6524ad253bed9a19401b6b336e7 /tools/emacs/default.nix
parent00c9060c2f0ec581db8841aa34fd92c0e9953693 (diff)
parent458163910b4ab08c885e076e5f3b9ecf1b3521af (diff)
merge(PR#11): Move bits of Emacs configuration into local packages r/156
As requested by @wpcarro, some bits of my Emacs configuration are now in separate local packages (located at `//depot/tools/emacs-pkgs/`).

Specifically this change introduces:

* `tools.emacs-pkgs.dottime`: A package to render time in the modeline as [dottime](https://dotti.me)
* `tools.emacs-pkgs.term-switcher`: A package to quickly switch between and open new terminal instances in EXWM using ivy

My Emacs configuration is updated to accomodate these refactorings.
Diffstat (limited to 'tools/emacs/default.nix')
-rw-r--r--tools/emacs/default.nix26
1 files changed, 4 insertions, 22 deletions
diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix
index 0589b274e242..02ffb3660581 100644
--- a/tools/emacs/default.nix
+++ b/tools/emacs/default.nix
@@ -5,29 +5,12 @@
 
 with pkgs;
 with third_party.emacsPackagesNg;
+with third_party.emacs;
 
 let
+  localPackages = pkgs.tools.emacs-pkgs;
   emacsWithPackages = (third_party.emacsPackagesNgGen third_party.emacs26).emacsWithPackages;
 
-  carpMode = melpaBuild {
-    pname = "carp-mode";
-    ename = "carp-mode";
-    version = "3.0";
-    recipe = builtins.toFile "recipe" ''
-      (carp-mode :fetcher github
-                 :repo "carp-lang/carp"
-                 :files ("emacs/*.el"))
-    '';
-
-    packageRequires = [ clojure-mode ];
-    src = third_party.fetchFromGitHub {
-      owner = "carp-lang";
-      repo = "carp";
-      rev = "6954642cadee730885717201c3180c7acfb1bfa9";
-      sha256 = "1pz4x2qkwjbz789bwc6nkacrjpzlxawxhl2nv0xdp731y7q7xyk9";
-    };
-  };
-
   tazjinsEmacs = (emacsWithPackages(epkgs:
   # Actual ELPA packages (the enlightened!)
   (with epkgs.elpaPackages; [
@@ -82,7 +65,6 @@ let
     rainbow-delimiters
     restclient
     sly
-    smartparens
     string-edit
     swiper
     telephone-line
@@ -99,7 +81,7 @@ let
   ]) ++
 
   # Custom packages
-  [ carpMode ]
+  [ carp-mode localPackages.dottime localPackages.term-switcher ]
   ));
 in third_party.writeShellScriptBin "tazjins-emacs" ''
   exec ${tazjinsEmacs}/bin/emacs \
@@ -108,5 +90,5 @@ in third_party.writeShellScriptBin "tazjins-emacs" ''
     --no-site-lisp \
     --no-init-file \
     --directory ${./config} \
-    --eval "(require 'init)"
+    --eval "(require 'init)" $@
 ''