From fc6126f5798f87c81ee590fe0b24219e93d86e43 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 13 Jun 2018 00:08:23 +0200 Subject: [PATCH] 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. --- emacs.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/emacs.nix b/emacs.nix index a3e89d37f..4507ea164 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 ] )