@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, emacs, lib }:
2+
3+stdenv.mkDerivation {
4+ pname = "apheleia";
5+ version = "2021-05-23";
6+
7+ src = fetchFromGitHub {
8+ owner = "raxod502";
9+ repo = "apheleia";
10+ rev = "f865c165dac606187a66b2b25a57d5099b452120";
11+ sha256 = "sha256-n37jJsNOGhSjUtQysG3NVIjjayhbOa52iTXBc8SyKXE=";
12+ };
13+
14+ buildInputs = [ emacs ];
15+
16+ buildPhase = ''
17+ runHook preBuild
18+ emacs -L . --batch -f batch-byte-compile *.el
19+ runHook postBuild
20+ '';
21+
22+ installPhase = ''
23+ runHook preInstall
24+ install -d $out/share/emacs/site-lisp
25+ install *.el *.elc $out/share/emacs/site-lisp
26+ runHook postInstall
27+ '';
28+
29+ meta = {
30+ description = "Reformat buffer stably";
31+ homepage = "https://github.com/raxod502/apheleia";
32+ license = lib.licenses.mit;
33+ maintainers = with lib.maintainers; [ leungbk ];
34+ platforms = emacs.meta.platforms;
35+ };
36+}