fix(emacs): Fix ivy & prescient integration by manually pinning ivy
In the previous configuration the dependency on `ivy-pass` added a second version of ivy to the load-path. It is fixed by manually pinning ivy and its related packages and using those to build ivy-pass. This configuration should be temporary until the next time the MELPA package set is updated in nixpkgs. This caused the symptoms in raxod502/prescient.el#10
This commit is contained in:
parent
8cc7d8da79
commit
2e2e8379e9
2 changed files with 44 additions and 7 deletions
50
emacs.nix
50
emacs.nix
|
@ -39,6 +39,46 @@ eglot = emacsPackagesNg.melpaBuild rec {
|
|||
};
|
||||
};
|
||||
|
||||
# ivy has not been updated in unstable for a while:
|
||||
ivySource = fetchFromGitHub {
|
||||
owner = "abo-abo";
|
||||
repo = "swiper";
|
||||
rev = "6f2939485d33e9b28022d3b6912a50669dcdd596";
|
||||
sha256 = "1f2i6hkcbiqdw7fr9vabsm32a0gy647llzki6b97yv8vwa0klh2q";
|
||||
};
|
||||
|
||||
withIvySources = pname: recipe: emacsPackagesNg.melpaBuild {
|
||||
inherit pname;
|
||||
version = "20180616";
|
||||
recipeFile = builtins.toFile "${pname}-recipe" recipe;
|
||||
src = ivySource;
|
||||
};
|
||||
|
||||
newIvy.ivy = withIvySources "ivy" ''
|
||||
(ivy :files (:defaults
|
||||
(:exclude "swiper.el" "counsel.el" "ivy-hydra.el")
|
||||
"doc/ivy-help.org"))
|
||||
'';
|
||||
|
||||
newIvy.counsel = withIvySources "counsel" ''
|
||||
(counsel :files ("counsel.el"))
|
||||
'';
|
||||
|
||||
newIvy.swiper = withIvySources "swiper" ''
|
||||
(swiper :files ("swiper.el"))
|
||||
'';
|
||||
|
||||
newIvy.ivy-pass = melpaBuild {
|
||||
pname = "ivy-pass";
|
||||
version = "20170812";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ecraven";
|
||||
repo = "ivy-pass";
|
||||
rev = "5b523de1151f2109fdd6a8114d0af12eef83d3c5";
|
||||
sha256 = "18crb4zh2pjf0cmv3b913m9vfng27girjwfqc3mk7vqd1r5a49yk";
|
||||
};
|
||||
};
|
||||
|
||||
# prescient & ivy-prescient provide better filtering in ivy/counsel,
|
||||
# but they are not in nixpkgs yet:
|
||||
prescientSource = fetchFromGitHub {
|
||||
|
@ -62,7 +102,7 @@ ivy-prescient = emacsPackagesNg.melpaBuild {
|
|||
pname = "ivy-prescient";
|
||||
version = "1.0";
|
||||
src = prescientSource;
|
||||
packageRequires = [ prescient ivy ];
|
||||
packageRequires = [ prescient newIvy.ivy ];
|
||||
|
||||
recipeFile = writeText "ivy-prescient-recipe" ''
|
||||
(ivy-prescient :files ("ivy-prescient.el"))
|
||||
|
@ -86,8 +126,6 @@ in emacsWithPackages(epkgs:
|
|||
(with epkgs.melpaPackages; [
|
||||
browse-kill-ring
|
||||
cargo
|
||||
counsel
|
||||
counsel-tramp
|
||||
dash
|
||||
dash-functional
|
||||
dockerfile-mode
|
||||
|
@ -99,8 +137,6 @@ in emacsWithPackages(epkgs:
|
|||
haskell-mode
|
||||
ht
|
||||
idle-highlight-mode
|
||||
ivy
|
||||
ivy-pass
|
||||
jq-mode
|
||||
kotlin-mode
|
||||
magit
|
||||
|
@ -118,7 +154,6 @@ in emacsWithPackages(epkgs:
|
|||
s
|
||||
smartparens
|
||||
string-edit
|
||||
swiper
|
||||
telephone-line
|
||||
terraform-mode
|
||||
toml-mode
|
||||
|
@ -128,6 +163,9 @@ in emacsWithPackages(epkgs:
|
|||
yaml-mode
|
||||
]) ++
|
||||
|
||||
# Use custom updated ivy packages
|
||||
(lib.attrValues newIvy) ++
|
||||
|
||||
# Custom packaged Emacs packages:
|
||||
[ nix-mode eglot prescient ivy-prescient pkgs.notmuch ]
|
||||
)
|
||||
|
|
|
@ -42,7 +42,6 @@ in {
|
|||
|
||||
kontemplate = unstable.kontemplate;
|
||||
mq-cli = unstable.mq-cli;
|
||||
emacs = unstable.emacs; # emacs 26.1
|
||||
vlc = unstable.vlc; # VLC 3.0!
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue