about summary refs log tree commit diff
path: root/emacs.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-06-12T22·08+0200
committerVincent Ambo <mail@tazj.in>2018-06-12T22·08+0200
commitfc6126f5798f87c81ee590fe0b24219e93d86e43 (patch)
treea03ad961fd77e87e87cb169e3a17049413251ed6 /emacs.nix
parentad5fff55a28686764f5040c67fd016f2444375f6 (diff)
feat(emacs): Install prescient & ivy-prescient
These packages are not in nixpkgs yet (will most likely be added after
the next MELPA import), so they're added here manually.

As both originate from the same source they're added to the same
derivation here by using a custom recipe.
Diffstat (limited to 'emacs.nix')
-rw-r--r--emacs.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/emacs.nix b/emacs.nix
index a3e89d37fc..4507ea1646 100644
--- a/emacs.nix
+++ b/emacs.nix
@@ -71,6 +71,23 @@ eglot = with pkgs; emacsPackagesNg.melpaBuild rec {
   };
 };
 
+# prescient & prescient-ivy provide better filtering in ivy/counsel
+prescient = with pkgs; emacsPackagesNg.melpaBuild {
+  pname = "prescient";
+  version = "20180611";
+
+  src = fetchFromGitHub {
+    owner  = "raxod502";
+    repo   = "prescient.el";
+    rev    = "19a2c6b392ca6130dbbcf70cba57ee34d64fe50c";
+    sha256 = "136q785lyhpgyaiysyq4pw11l83sa9h3q57v6papx813gf7rb7v7";
+  };
+
+  recipeFile = writeText "prescient-recipe" ''
+    (prescient :files ("prescient.el" "ivy-prescient.el"))
+  '';
+};
+
 in emacsWithPackages(epkgs:
   # Pinned packages (from unstable):
   (with pkgs; with lib; attrValues pinnedEmacs) ++
@@ -129,5 +146,5 @@ in emacsWithPackages(epkgs:
   ]) ++
 
   # Custom packaged Emacs packages:
-  [ sly sly-company nix-mode eglot pkgs.notmuch ]
+  [ sly sly-company nix-mode eglot prescient pkgs.notmuch ]
 )