2018-06-15 13:56:47 +02:00
|
|
|
# Derivation for Emacs pre-configured with packages that I need.
|
2018-08-10 22:16:34 +02:00
|
|
|
|
2018-04-22 13:18:20 +02:00
|
|
|
{ pkgs }:
|
2018-03-04 00:07:38 +01:00
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
with pkgs.unstable; with emacsPackagesNg;
|
|
|
|
let emacsWithPackages = (emacsPackagesNgGen emacs).emacsWithPackages;
|
2018-03-04 00:07:38 +01:00
|
|
|
|
2018-03-06 12:09:03 +01:00
|
|
|
# The nix-mode in the official repositories is old and annoying to
|
|
|
|
# work with, pin it to something newer instead:
|
2018-06-15 13:56:47 +02:00
|
|
|
nix-mode = emacsPackagesNg.melpaBuild {
|
2018-03-06 12:09:03 +01:00
|
|
|
pname = "nix-mode";
|
|
|
|
version = "20180306";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nix-mode";
|
|
|
|
rev = "0ac0271f6c8acdbfddfdbb1211a1972ae562ec17";
|
|
|
|
sha256 = "157vy4xkvaqd76km47sh41wykbjmfrzvg40jxgppnalq9pjxfinp";
|
|
|
|
};
|
|
|
|
|
|
|
|
recipeFile = writeText "nix-mode-recipe" ''
|
|
|
|
(nix-mode :repo "NixOS/nix-mode" :fetcher github
|
|
|
|
:files (:defaults (:exclude "nix-mode-mmm.el")))
|
|
|
|
'';
|
|
|
|
};
|
2018-03-04 00:07:38 +01:00
|
|
|
|
2018-07-29 16:56:11 +02:00
|
|
|
jsonrpc = emacsPackagesNg.elpaBuild rec {
|
|
|
|
pname = "jsonrpc";
|
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://elpa.gnu.org/packages/jsonrpc-${version}.el";
|
|
|
|
sha256 = "06lmmn7j2ilkvwibbpgnd8p6d63fjjnxd2ma8f4jw6vrz1f7lwvs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
eglot = emacsPackagesNg.melpaBuild rec {
|
2018-06-03 22:35:34 +02:00
|
|
|
pname = "eglot";
|
2018-07-29 16:46:45 +02:00
|
|
|
version = "1.1";
|
2018-06-03 22:35:34 +02:00
|
|
|
|
2018-07-29 16:56:11 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://elpa.gnu.org/packages/eglot-${version}.tar";
|
|
|
|
sha256 = "01h4wh87lrd9l50y20gjjkgg760v8ixvbcb3q8jykl29989zw62y";
|
2018-06-03 22:35:34 +02:00
|
|
|
};
|
2018-07-29 16:56:11 +02:00
|
|
|
|
|
|
|
packageRequires = [ jsonrpc ];
|
2018-06-03 22:35:34 +02:00
|
|
|
};
|
|
|
|
|
2018-06-16 16:37:17 +02:00
|
|
|
# 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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-06-29 13:06:52 +02:00
|
|
|
counsel-notmuch = melpaBuild {
|
|
|
|
pname = "counsel-notmuch";
|
|
|
|
version = "20171223";
|
|
|
|
|
|
|
|
packageRequires = [
|
|
|
|
newIvy.ivy
|
|
|
|
pkgs.notmuch
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fuxialexander";
|
|
|
|
repo = "counsel-notmuch";
|
|
|
|
rev = "ac1aaead81c6860d7b8324cc1c00bcd52de5e9ca";
|
|
|
|
sha256 = "19frcrz6bx7d7v1hkg0xv7zmbk2sydlsdzn1s96cqzjk1illchkz";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
# prescient & ivy-prescient provide better filtering in ivy/counsel,
|
|
|
|
# but they are not in nixpkgs yet:
|
|
|
|
prescientSource = fetchFromGitHub {
|
|
|
|
owner = "raxod502";
|
|
|
|
repo = "prescient.el";
|
|
|
|
rev = "27c94636489d5b062970a0f7e9041ca186b6b659";
|
|
|
|
sha256 = "05jk8cms48dhpbaimmx3akmnq32fgbc0q4dja7lvpvssmq398cn7";
|
|
|
|
};
|
2018-06-13 00:08:23 +02:00
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
prescient = emacsPackagesNg.melpaBuild {
|
|
|
|
pname = "prescient";
|
|
|
|
version = "1.0";
|
|
|
|
src = prescientSource;
|
2018-06-13 00:08:23 +02:00
|
|
|
|
|
|
|
recipeFile = writeText "prescient-recipe" ''
|
2018-06-15 13:56:47 +02:00
|
|
|
(prescient :files ("prescient.el"))
|
2018-06-13 00:08:23 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
ivy-prescient = emacsPackagesNg.melpaBuild {
|
|
|
|
pname = "ivy-prescient";
|
|
|
|
version = "1.0";
|
|
|
|
src = prescientSource;
|
2018-06-16 16:37:17 +02:00
|
|
|
packageRequires = [ prescient newIvy.ivy ];
|
2018-04-22 13:18:20 +02:00
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
recipeFile = writeText "ivy-prescient-recipe" ''
|
|
|
|
(ivy-prescient :files ("ivy-prescient.el"))
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-06-28 11:01:30 +02:00
|
|
|
sly = emacsPackagesNg.melpaBuild {
|
|
|
|
pname = "sly";
|
|
|
|
version = "20180613";
|
|
|
|
packageRequires = [ elpaPackages.company ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joaotavora";
|
|
|
|
repo = "sly";
|
|
|
|
rev = "a05b45f1564a86a9d49707c9c570da6c3a56b6e5";
|
|
|
|
sha256 = "1c9xzppxlnak1px0dv0ljpp4izfj4377lncvrcb1jaiyh8z8ry48";
|
|
|
|
};
|
|
|
|
|
|
|
|
recipeFile = writeText "sly-recipe" ''
|
|
|
|
(sly :files ("*.el"
|
|
|
|
("lib" "lib/*")
|
|
|
|
("contrib" "contrib/*")))
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-08-05 16:13:22 +02:00
|
|
|
# EXWM pinned to a newer version than what is released due to a
|
|
|
|
# potential fix for ch11ng/exwm#425.
|
|
|
|
exwm = emacsPackagesNg.exwm.overrideAttrs(_: {
|
|
|
|
version = "master";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ch11ng";
|
|
|
|
repo = "exwm";
|
|
|
|
rev = "aebcb0344f18b1aa284a432811175fde2d2feae5";
|
|
|
|
sha256 = "0niwbzim029lg71y5rrg607zfiw1zmhk7zcyk5874gbrkfmyr52b";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2018-06-15 13:56:47 +02:00
|
|
|
in emacsWithPackages(epkgs:
|
2018-03-04 00:07:38 +01:00
|
|
|
# Actual ELPA packages (the enlightened!)
|
|
|
|
(with epkgs.elpaPackages; [
|
|
|
|
ace-window
|
|
|
|
adjust-parens
|
|
|
|
avy
|
|
|
|
company
|
|
|
|
pinentry
|
|
|
|
rainbow-mode
|
|
|
|
undo-tree
|
|
|
|
which-key
|
|
|
|
]) ++
|
|
|
|
|
2018-05-01 16:06:28 +02:00
|
|
|
# MELPA packages:
|
|
|
|
(with epkgs.melpaPackages; [
|
2018-07-03 18:58:22 +02:00
|
|
|
alchemist
|
2018-03-04 00:07:38 +01:00
|
|
|
browse-kill-ring
|
|
|
|
cargo
|
|
|
|
dash
|
|
|
|
dash-functional
|
|
|
|
dockerfile-mode
|
2018-05-01 16:06:28 +02:00
|
|
|
edit-server
|
2018-07-14 16:18:21 +02:00
|
|
|
elixir-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
erlang
|
|
|
|
go-mode
|
|
|
|
gruber-darker-theme
|
|
|
|
haskell-mode
|
|
|
|
ht
|
2018-06-19 15:21:34 +02:00
|
|
|
hydra
|
2018-03-04 00:07:38 +01:00
|
|
|
idle-highlight-mode
|
2018-06-08 00:13:27 +02:00
|
|
|
jq-mode
|
2018-05-01 16:06:28 +02:00
|
|
|
kotlin-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
magit
|
2018-06-15 13:56:47 +02:00
|
|
|
markdown-mode
|
|
|
|
markdown-toc
|
2018-03-04 00:07:38 +01:00
|
|
|
multi-term
|
|
|
|
multiple-cursors
|
2018-04-23 15:33:05 +02:00
|
|
|
nginx-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
paredit
|
|
|
|
password-store
|
2018-05-01 16:06:28 +02:00
|
|
|
pg
|
2018-03-04 00:07:38 +01:00
|
|
|
rainbow-delimiters
|
2018-05-01 16:06:28 +02:00
|
|
|
restclient
|
2018-03-04 00:07:38 +01:00
|
|
|
rust-mode
|
|
|
|
s
|
2018-05-07 14:43:35 +02:00
|
|
|
smartparens
|
2018-03-04 00:07:38 +01:00
|
|
|
string-edit
|
2018-06-15 00:12:06 +02:00
|
|
|
telephone-line
|
2018-06-15 13:56:47 +02:00
|
|
|
terraform-mode
|
2018-03-17 21:47:27 +01:00
|
|
|
toml-mode
|
2018-06-22 10:32:01 +02:00
|
|
|
use-package
|
2018-03-04 00:07:38 +01:00
|
|
|
uuidgen
|
2018-05-23 12:17:20 +02:00
|
|
|
web-mode
|
2018-06-06 23:32:55 +02:00
|
|
|
websocket
|
2018-05-01 16:06:28 +02:00
|
|
|
yaml-mode
|
2018-03-04 01:53:41 +01:00
|
|
|
]) ++
|
|
|
|
|
2018-08-10 22:16:34 +02:00
|
|
|
# Stable packages
|
|
|
|
(with epkgs.melpaStablePackages; [
|
|
|
|
intero
|
|
|
|
]) ++
|
|
|
|
|
2018-06-16 16:37:17 +02:00
|
|
|
# Use custom updated ivy packages
|
|
|
|
(lib.attrValues newIvy) ++
|
|
|
|
|
2018-03-04 01:53:41 +01:00
|
|
|
# Custom packaged Emacs packages:
|
2018-08-05 16:13:22 +02:00
|
|
|
[ nix-mode eglot prescient ivy-prescient counsel-notmuch pkgs.notmuch sly exwm ]
|
2018-03-04 00:07:38 +01:00
|
|
|
)
|