2018-03-04 00:07:38 +01:00
|
|
|
# Derivation for Emacs configured with the packages that I need:
|
2018-04-22 13:18:20 +02:00
|
|
|
{ pkgs }:
|
2018-03-04 00:07:38 +01:00
|
|
|
|
|
|
|
let emacsWithPackages = with pkgs; (emacsPackagesNgGen emacs).emacsWithPackages;
|
2018-03-04 01:53:41 +01:00
|
|
|
sly = with pkgs; emacsPackagesNg.melpaBuild {
|
|
|
|
pname = "sly";
|
|
|
|
version = "20180221.1414";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joaotavora";
|
|
|
|
repo = "sly";
|
|
|
|
rev = "486bfbe95612bcdc0960c490207970a188e0fbb9";
|
|
|
|
sha256 = "0ib4q4k3h3qn88pymyjjmlmnpizdn1mfg5gpk5a715nqsgxlg09l";
|
|
|
|
};
|
|
|
|
|
|
|
|
recipeFile = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/melpa/melpa/23b9e64887a290fca7c7ab2718f627f8d728575f/recipes/sly";
|
|
|
|
sha256 = "1pmyqjk8fdlzwvrlx8h6fq0savksfny78fhmr8r7b07pi20y6n9l";
|
|
|
|
name = "sly";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Building sly-company requires quite some dancing because
|
|
|
|
# company-mode is required at build time.
|
|
|
|
trivialBuildWithCompany = with pkgs; callPackage <nixos/pkgs/build-support/emacs/trivial.nix> {
|
|
|
|
emacs = with pkgs; emacsWithPackages(epkgs: [ epkgs.elpaPackages.company ]);
|
|
|
|
};
|
|
|
|
|
|
|
|
sly-company = with pkgs; trivialBuildWithCompany {
|
|
|
|
pname = "sly-company";
|
|
|
|
version = "master";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joaotavora";
|
|
|
|
repo = "sly-company";
|
|
|
|
rev = "dfe18218e4b2ee9874394b50f82f5172f41c462c";
|
|
|
|
sha256 = "1bj8w2wfq944cnhsk5xx41mfrjv89scrg4w98kqgda5drkpdf8a7";
|
|
|
|
};
|
|
|
|
};
|
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:
|
|
|
|
nix-mode = with pkgs; emacsPackagesNg.melpaBuild {
|
|
|
|
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-06-03 22:35:34 +02:00
|
|
|
# The default Rust language server mode is not really usable, install
|
|
|
|
# `eglot` instead and hope for the best.
|
|
|
|
eglot = with pkgs; emacsPackagesNg.melpaBuild rec {
|
|
|
|
pname = "eglot";
|
|
|
|
version = "0.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joaotavora";
|
|
|
|
repo = "eglot";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1avsry84sp3s2vr2iz9dphm579xgw8pqlwffl75gn5akykgazwdx";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-03-04 00:07:38 +01:00
|
|
|
in emacsWithPackages(epkgs:
|
2018-05-01 16:06:28 +02:00
|
|
|
# Pinned packages (from unstable):
|
|
|
|
(with pkgs; with lib; attrValues pinnedEmacs) ++
|
2018-04-22 13:18:20 +02:00
|
|
|
|
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-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
|
|
|
|
elm-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
erlang
|
2018-05-01 16:06:28 +02:00
|
|
|
flx
|
2018-03-04 00:07:38 +01:00
|
|
|
flycheck
|
|
|
|
go-mode
|
|
|
|
gruber-darker-theme
|
|
|
|
haskell-mode
|
|
|
|
ht
|
|
|
|
idle-highlight-mode
|
2018-05-01 16:06:28 +02:00
|
|
|
kotlin-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
magit
|
|
|
|
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
|
|
|
|
racket-mode
|
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
|
|
|
|
smart-mode-line
|
2018-05-07 14:43:35 +02:00
|
|
|
smartparens
|
2018-03-04 00:07:38 +01:00
|
|
|
string-edit
|
|
|
|
terraform-mode
|
2018-03-17 21:47:27 +01:00
|
|
|
toml-mode
|
2018-03-04 00:07:38 +01:00
|
|
|
uuidgen
|
2018-05-23 12:17:20 +02:00
|
|
|
web-mode
|
2018-05-01 16:06:28 +02:00
|
|
|
yaml-mode
|
2018-03-04 01:53:41 +01:00
|
|
|
]) ++
|
|
|
|
|
|
|
|
# Custom packaged Emacs packages:
|
2018-06-03 22:35:34 +02:00
|
|
|
[ sly sly-company nix-mode eglot pkgs.notmuch ]
|
2018-03-04 00:07:38 +01:00
|
|
|
)
|