refactor(emacs): Rewrite derivation to match depot layout
This commit is contained in:
parent
863f5b146d
commit
2b80265a1f
2 changed files with 53 additions and 75 deletions
5
third_party/default.nix
vendored
5
third_party/default.nix
vendored
|
@ -29,8 +29,10 @@ let
|
||||||
coreutils
|
coreutils
|
||||||
darwin
|
darwin
|
||||||
dockerTools
|
dockerTools
|
||||||
|
emacs26
|
||||||
emacs26-nox
|
emacs26-nox
|
||||||
emacsPackagesFor
|
emacsPackagesNg
|
||||||
|
emacsPackagesNgGen
|
||||||
fetchFromGitHub
|
fetchFromGitHub
|
||||||
git
|
git
|
||||||
gnutar
|
gnutar
|
||||||
|
@ -47,6 +49,7 @@ let
|
||||||
makeWrapper
|
makeWrapper
|
||||||
mdbook
|
mdbook
|
||||||
nix
|
nix
|
||||||
|
notmuch
|
||||||
openssh
|
openssh
|
||||||
openssl
|
openssl
|
||||||
protobuf
|
protobuf
|
||||||
|
|
|
@ -1,93 +1,64 @@
|
||||||
# Derivation for Emacs pre-configured with packages that I need.
|
# This file assembles a preconfigured Emacs with the dependencies that
|
||||||
|
# I need.
|
||||||
#
|
#
|
||||||
# TODO: Fix sly (again)
|
# It can either build Emacs itself (`-A complete`) or just the
|
||||||
|
# configuration (`-A config`). If the configuration is built
|
||||||
|
# separately (e.g. for work machines where Emacs itself is installed
|
||||||
|
# by other means) it is important that the versions of Emacs are kept
|
||||||
|
# in sync.
|
||||||
|
|
||||||
{ pkgs }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with pkgs; with emacsPackagesNg;
|
with pkgs;
|
||||||
let emacsWithPackages = (emacsPackagesNgGen emacs).emacsWithPackages;
|
with third_party.emacsPackagesNg;
|
||||||
|
|
||||||
# As the EXWM-README points out, XELB should be built from source if
|
let
|
||||||
# EXWM is.
|
emacsWithPackages = (third_party.emacsPackagesNgGen third_party.emacs26).emacsWithPackages;
|
||||||
xelb = melpaBuild {
|
|
||||||
pname = "xelb";
|
|
||||||
ename = "xelb";
|
|
||||||
version = "0.15";
|
|
||||||
recipe = builtins.toFile "recipe" ''
|
|
||||||
(xelb :fetcher github
|
|
||||||
:repo "ch11ng/xelb")
|
|
||||||
'';
|
|
||||||
|
|
||||||
packageRequires = [ cl-generic emacs ];
|
carpMode = melpaBuild {
|
||||||
|
pname = "carp-mode";
|
||||||
|
ename = "carp-mode";
|
||||||
|
version = "3.0";
|
||||||
|
recipe = builtins.toFile "recipe" ''
|
||||||
|
(carp-mode :fetcher github
|
||||||
|
:repo "carp-lang/carp"
|
||||||
|
:files ("emacs/*.el"))
|
||||||
|
'';
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
packageRequires = [ clojure-mode ];
|
||||||
owner = "ch11ng";
|
src = third_party.fetchFromGitHub {
|
||||||
repo = "xelb";
|
owner = "carp-lang";
|
||||||
rev = "b8f168b401977098fe2b30f4ca32629c0ab6eb83";
|
repo = "carp";
|
||||||
sha256 = "1ack1h68x8ia0ji6wbhmayrakq35p5sgrrl6qvha3ns3pswc0pl9";
|
rev = "6954642cadee730885717201c3180c7acfb1bfa9";
|
||||||
};
|
sha256 = "1pz4x2qkwjbz789bwc6nkacrjpzlxawxhl2nv0xdp731y7q7xyk9";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# EXWM pinned to a newer version than what is released due to a
|
complete = (emacsWithPackages(epkgs:
|
||||||
# potential fix for ch11ng/exwm#425.
|
|
||||||
exwm = melpaBuild {
|
|
||||||
pname = "exwm";
|
|
||||||
ename = "exwm";
|
|
||||||
version = "0.19";
|
|
||||||
recipe = builtins.toFile "recipe" ''
|
|
||||||
(exwm :fetcher github
|
|
||||||
:repo "ch11ng/exwm")
|
|
||||||
'';
|
|
||||||
|
|
||||||
packageRequires = [ xelb ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ch11ng";
|
|
||||||
repo = "exwm";
|
|
||||||
rev = "472f7cb82b67b98843f10c12e6bda9b8ae7262bc";
|
|
||||||
sha256 = "19gflsrb19aijf2xcw7j2m658qad21nbwziw38s1h2jw66vhk8dj";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
slyFixed = sly.overrideAttrs(_: {
|
|
||||||
recipe = builtins.toFile "recipe" ''
|
|
||||||
(sly :repo "joaotavora/sly"
|
|
||||||
:fetcher github
|
|
||||||
:files ("*.el"
|
|
||||||
("lib" "lib/*")
|
|
||||||
("contrib" "contrib/*")
|
|
||||||
"doc/*.texi"
|
|
||||||
"doc/*.info"
|
|
||||||
"doc/dir"))
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
in emacsWithPackages(epkgs:
|
|
||||||
# Actual ELPA packages (the enlightened!)
|
# Actual ELPA packages (the enlightened!)
|
||||||
(with epkgs.elpaPackages; [
|
(with epkgs.elpaPackages; [
|
||||||
ace-window
|
ace-window
|
||||||
avy
|
avy
|
||||||
company
|
|
||||||
pinentry
|
pinentry
|
||||||
rainbow-mode
|
rainbow-mode
|
||||||
undo-tree
|
undo-tree
|
||||||
which-key
|
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# MELPA packages:
|
# MELPA packages:
|
||||||
(with epkgs.melpaPackages; [
|
(with epkgs.melpaPackages; [
|
||||||
browse-kill-ring
|
browse-kill-ring
|
||||||
cargo
|
cargo
|
||||||
|
clojure-mode
|
||||||
counsel
|
counsel
|
||||||
counsel-notmuch
|
counsel-notmuch
|
||||||
dash
|
|
||||||
dash-functional
|
dash-functional
|
||||||
|
direnv
|
||||||
dockerfile-mode
|
dockerfile-mode
|
||||||
edit-server
|
# TODO: eglot removed until workspace-folders are supported (needed for gopls)
|
||||||
eglot
|
# eglot
|
||||||
elixir-mode
|
elixir-mode
|
||||||
erlang
|
|
||||||
elm-mode
|
elm-mode
|
||||||
|
erlang
|
||||||
exwm
|
exwm
|
||||||
go-mode
|
go-mode
|
||||||
gruber-darker-theme
|
gruber-darker-theme
|
||||||
|
@ -101,38 +72,42 @@ in emacsWithPackages(epkgs:
|
||||||
ivy-prescient
|
ivy-prescient
|
||||||
jq-mode
|
jq-mode
|
||||||
kotlin-mode
|
kotlin-mode
|
||||||
|
lsp-mode
|
||||||
magit
|
magit
|
||||||
markdown-mode
|
|
||||||
markdown-toc
|
markdown-toc
|
||||||
meghanada
|
|
||||||
multi-term
|
multi-term
|
||||||
multiple-cursors
|
multiple-cursors
|
||||||
nginx-mode
|
nginx-mode
|
||||||
nix-mode
|
nix-mode
|
||||||
omnisharp
|
|
||||||
paredit
|
paredit
|
||||||
password-store
|
password-store
|
||||||
pg
|
pg
|
||||||
pkgs.notmuch
|
notmuch # this comes from pkgs.third_party
|
||||||
prescient
|
prescient
|
||||||
|
racket-mode
|
||||||
rainbow-delimiters
|
rainbow-delimiters
|
||||||
restclient
|
restclient
|
||||||
rust-mode
|
sly
|
||||||
s
|
|
||||||
slyFixed
|
|
||||||
smartparens
|
smartparens
|
||||||
string-edit
|
string-edit
|
||||||
swiper
|
swiper
|
||||||
telephone-line
|
telephone-line
|
||||||
terraform-mode
|
terraform-mode
|
||||||
toml-mode
|
toml-mode
|
||||||
|
transient
|
||||||
use-package
|
use-package
|
||||||
uuidgen
|
uuidgen
|
||||||
web-mode
|
web-mode
|
||||||
websocket
|
websocket
|
||||||
|
which-key
|
||||||
|
xelb
|
||||||
yaml-mode
|
yaml-mode
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# Custom packaged Emacs packages:
|
# Custom packages
|
||||||
[ xelb exwm ]
|
[ carpMode ]
|
||||||
)
|
));
|
||||||
|
in {
|
||||||
|
inherit complete;
|
||||||
|
depsOnly = complete.deps;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue