This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathoverrides.nix
122 lines (98 loc) · 2.64 KB
/
overrides.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{ lock, ocamlPackages }:
self: super: {
straightBuild = { pname, ... }@args: self.trivialBuild ({
ename = pname;
version = "1";
src = lock pname;
buildPhase = ":";
} // args);
evil-escape = super.evil-escape.overrideAttrs (esuper: {
patches = [ ./evil-escape.patch ];
});
doom-snippets = self.straightBuild {
pname = "doom-snippets";
postInstall = ''
cp -r *-mode $out/share/emacs/site-lisp
'';
};
explain-pause-mode = self.straightBuild {
pname = "explain-pause-mode";
};
evil-markdown = self.straightBuild {
pname = "evil-markdown";
};
evil-org = self.straightBuild {
pname = "evil-org-mode";
ename = "evil-org";
};
evil-quick-diff = self.straightBuild {
pname = "evil-quick-diff";
};
magit = super.magit.overrideAttrs (esuper: {
preBuild = ''
make VERSION="${esuper.version}" -C lisp magit-version.el
'';
});
nose = self.straightBuild {
pname = "nose";
};
org-contrib = self.straightBuild {
pname = "org-contrib";
installPhase = ''
mkdir -p $out/share/emacs/site-lisp
cp -r lisp/* $out/share/emacs/site-lisp
'';
};
org = self.straightBuild rec {
pname = "org";
version = "9.4";
installPhase = ''
LISPDIR=$out/share/emacs/site-lisp
install -d $LISPDIR
cp -r * $LISPDIR
cat > $LISPDIR/lisp/org-version.el <<EOF
(fset 'org-release (lambda () "${version}"))
(fset 'org-git-version #'ignore)
(provide 'org-version)
EOF
'';
};
org-yt = self.straightBuild {
pname = "org-yt";
};
php-extras = self.straightBuild {
pname = "php-extras";
};
restart-emacs = super.restart-emacs.overrideAttrs (esuper: {
patches = [ ./restart-emacs.patch ];
});
revealjs = self.straightBuild {
pname = "revealjs";
installPhase = ''
LISPDIR=$out/share/emacs/site-lisp
install -d $LISPDIR
cp -r * $LISPDIR
'';
};
rotate-text = self.straightBuild {
pname = "rotate-text";
};
so-long = self.straightBuild {
pname = "emacs-so-long";
ename = "so-long";
};
ob-racket = self.straightBuild {
pname = "ob-racket";
};
# dune has a nontrivial derivation, which does not buildable from the melpa
# wrapper falling back to the one in nixpkgs
dune = ocamlPackages.dune_2.overrideAttrs (old: {
# Emacs derivations require an ename attribute
ename = old.pname;
# Need to adjust paths here match what doom expects
postInstall = ''
mkdir -p $out/share/emacs/site-lisp/editor-integration
ln -snf $out/share/emacs/site-lisp $out/share/emacs/site-lisp/editor-integration/emacs
'';
});
}