refactor(emacs): Use unstable channel directly in emacs module
Stores the unstable channel in the global package set to make it available in the emacs module. All emacs-related packages are now taken from the unstable channel. Related changes: * prescient is now built directly from git * sly has been (temporarily) removed because the MELPA recipe is failing Unfortunately the version bumps to prescient and ivy (& its related packages) don't seem to help with raxod502/prescient.el#10
This commit is contained in:
parent
24314a61d6
commit
b1d45f5b76
2 changed files with 45 additions and 73 deletions
99
emacs.nix
99
emacs.nix
|
@ -1,46 +1,14 @@
|
||||||
# Derivation for Emacs configured with the packages that I need:
|
# Derivation for Emacs pre-configured with packages that I need.
|
||||||
|
#
|
||||||
|
# * TODO 2018-06-15: sly removed due to build error in unstable
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
let emacsWithPackages = with pkgs; (emacsPackagesNgGen emacs).emacsWithPackages;
|
with pkgs.unstable; with emacsPackagesNg;
|
||||||
sly = with pkgs; emacsPackagesNg.melpaBuild {
|
let emacsWithPackages = (emacsPackagesNgGen emacs).emacsWithPackages;
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# The nix-mode in the official repositories is old and annoying to
|
# The nix-mode in the official repositories is old and annoying to
|
||||||
# work with, pin it to something newer instead:
|
# work with, pin it to something newer instead:
|
||||||
nix-mode = with pkgs; emacsPackagesNg.melpaBuild {
|
nix-mode = emacsPackagesNg.melpaBuild {
|
||||||
pname = "nix-mode";
|
pname = "nix-mode";
|
||||||
version = "20180306";
|
version = "20180306";
|
||||||
|
|
||||||
|
@ -59,7 +27,7 @@ nix-mode = with pkgs; emacsPackagesNg.melpaBuild {
|
||||||
|
|
||||||
# The default Rust language server mode is not really usable, install
|
# The default Rust language server mode is not really usable, install
|
||||||
# `eglot` instead and hope for the best.
|
# `eglot` instead and hope for the best.
|
||||||
eglot = with pkgs; emacsPackagesNg.melpaBuild rec {
|
eglot = emacsPackagesNg.melpaBuild rec {
|
||||||
pname = "eglot";
|
pname = "eglot";
|
||||||
version = "0.8";
|
version = "0.8";
|
||||||
|
|
||||||
|
@ -71,27 +39,37 @@ eglot = with pkgs; emacsPackagesNg.melpaBuild rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# prescient & prescient-ivy provide better filtering in ivy/counsel
|
# prescient & ivy-prescient provide better filtering in ivy/counsel,
|
||||||
prescient = with pkgs; emacsPackagesNg.melpaBuild {
|
# but they are not in nixpkgs yet:
|
||||||
pname = "prescient";
|
prescientSource = fetchFromGitHub {
|
||||||
version = "20180611";
|
owner = "raxod502";
|
||||||
|
repo = "prescient.el";
|
||||||
|
rev = "27c94636489d5b062970a0f7e9041ca186b6b659";
|
||||||
|
sha256 = "05jk8cms48dhpbaimmx3akmnq32fgbc0q4dja7lvpvssmq398cn7";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
prescient = emacsPackagesNg.melpaBuild {
|
||||||
owner = "raxod502";
|
pname = "prescient";
|
||||||
repo = "prescient.el";
|
version = "1.0";
|
||||||
rev = "19a2c6b392ca6130dbbcf70cba57ee34d64fe50c";
|
src = prescientSource;
|
||||||
sha256 = "136q785lyhpgyaiysyq4pw11l83sa9h3q57v6papx813gf7rb7v7";
|
|
||||||
};
|
|
||||||
|
|
||||||
recipeFile = writeText "prescient-recipe" ''
|
recipeFile = writeText "prescient-recipe" ''
|
||||||
(prescient :files ("prescient.el" "ivy-prescient.el"))
|
(prescient :files ("prescient.el"))
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
ivy-prescient = emacsPackagesNg.melpaBuild {
|
||||||
|
pname = "ivy-prescient";
|
||||||
|
version = "1.0";
|
||||||
|
src = prescientSource;
|
||||||
|
packageRequires = [ prescient ivy ];
|
||||||
|
|
||||||
|
recipeFile = writeText "ivy-prescient-recipe" ''
|
||||||
|
(ivy-prescient :files ("ivy-prescient.el"))
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in emacsWithPackages(epkgs:
|
in emacsWithPackages(epkgs:
|
||||||
# Pinned packages (from unstable):
|
|
||||||
(with pkgs; with lib; attrValues pinnedEmacs) ++
|
|
||||||
|
|
||||||
# Actual ELPA packages (the enlightened!)
|
# Actual ELPA packages (the enlightened!)
|
||||||
(with epkgs.elpaPackages; [
|
(with epkgs.elpaPackages; [
|
||||||
ace-window
|
ace-window
|
||||||
|
@ -108,36 +86,41 @@ in emacsWithPackages(epkgs:
|
||||||
(with epkgs.melpaPackages; [
|
(with epkgs.melpaPackages; [
|
||||||
browse-kill-ring
|
browse-kill-ring
|
||||||
cargo
|
cargo
|
||||||
|
counsel
|
||||||
|
counsel-tramp
|
||||||
dash
|
dash
|
||||||
dash-functional
|
dash-functional
|
||||||
dockerfile-mode
|
dockerfile-mode
|
||||||
edit-server
|
edit-server
|
||||||
elm-mode
|
|
||||||
erlang
|
erlang
|
||||||
flx
|
exwm
|
||||||
go-mode
|
go-mode
|
||||||
gruber-darker-theme
|
gruber-darker-theme
|
||||||
haskell-mode
|
haskell-mode
|
||||||
ht
|
ht
|
||||||
idle-highlight-mode
|
idle-highlight-mode
|
||||||
|
ivy
|
||||||
|
ivy-pass
|
||||||
jq-mode
|
jq-mode
|
||||||
kotlin-mode
|
kotlin-mode
|
||||||
magit
|
magit
|
||||||
|
markdown-mode
|
||||||
|
markdown-toc
|
||||||
multi-term
|
multi-term
|
||||||
multiple-cursors
|
multiple-cursors
|
||||||
nginx-mode
|
nginx-mode
|
||||||
paredit
|
paredit
|
||||||
password-store
|
password-store
|
||||||
pg
|
pg
|
||||||
racket-mode
|
|
||||||
rainbow-delimiters
|
rainbow-delimiters
|
||||||
restclient
|
restclient
|
||||||
rust-mode
|
rust-mode
|
||||||
s
|
s
|
||||||
smartparens
|
smartparens
|
||||||
string-edit
|
string-edit
|
||||||
terraform-mode
|
swiper
|
||||||
telephone-line
|
telephone-line
|
||||||
|
terraform-mode
|
||||||
toml-mode
|
toml-mode
|
||||||
uuidgen
|
uuidgen
|
||||||
web-mode
|
web-mode
|
||||||
|
@ -146,5 +129,5 @@ in emacsWithPackages(epkgs:
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# Custom packaged Emacs packages:
|
# Custom packaged Emacs packages:
|
||||||
[ sly sly-company nix-mode eglot prescient pkgs.notmuch ]
|
[ nix-mode eglot prescient ivy-prescient pkgs.notmuch ]
|
||||||
)
|
)
|
||||||
|
|
19
packages.nix
19
packages.nix
|
@ -33,26 +33,15 @@ in {
|
||||||
# To use the pinned channel, the original package set is thrown
|
# To use the pinned channel, the original package set is thrown
|
||||||
# away in the overrides:
|
# away in the overrides:
|
||||||
config.packageOverrides = oldPkgs: stable // {
|
config.packageOverrides = oldPkgs: stable // {
|
||||||
|
# Store whole unstable channel in case that other modules need
|
||||||
|
# it (see emacs.nix for example):
|
||||||
|
inherit unstable;
|
||||||
|
|
||||||
wallpapers = import ./pkgs/wallpapers.nix;
|
wallpapers = import ./pkgs/wallpapers.nix;
|
||||||
pulseaudio-ctl = import pkgs/pulseaudio-ctl.nix;
|
pulseaudio-ctl = import pkgs/pulseaudio-ctl.nix;
|
||||||
|
|
||||||
kontemplate = unstable.kontemplate;
|
kontemplate = unstable.kontemplate;
|
||||||
mq-cli = unstable.mq-cli;
|
mq-cli = unstable.mq-cli;
|
||||||
|
|
||||||
# Override various Emacs packages from unstable:
|
|
||||||
pinnedEmacs = with unstable.emacsPackagesNg; {
|
|
||||||
inherit
|
|
||||||
counsel
|
|
||||||
counsel-tramp
|
|
||||||
exwm
|
|
||||||
ivy
|
|
||||||
ivy-gitlab
|
|
||||||
ivy-hydra
|
|
||||||
ivy-pass
|
|
||||||
markdown-mode
|
|
||||||
markdown-toc
|
|
||||||
swiper;
|
|
||||||
};
|
|
||||||
emacs = unstable.emacs; # emacs 26.1
|
emacs = unstable.emacs; # emacs 26.1
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue