@@ -0,0 +1,46 @@
1+{ stdenv, fetchFromGitHub, emacs, emacsPackages, lib }:
2+
3+let
4+ runtimeDeps = with emacsPackages; [
5+ evil
6+ markdown-mode
7+ ];
8+in
9+stdenv.mkDerivation {
10+ pname = "evil-markdown";
11+ version = "2020-06-01";
12+
13+ src = fetchFromGitHub {
14+ owner = "Somelauw";
15+ repo = "evil-markdown";
16+ rev = "064fe9b4767470472356d20bdd08e2f30ebbc9ac";
17+ sha256 = "sha256-Kt2wxG1XCFowavVWtj0urM/yURKegonpZcxTy/+CrJY=";
18+ };
19+
20+ buildInputs = [
21+ emacs
22+ ] ++ runtimeDeps;
23+
24+ propagatedUserEnvPkgs = runtimeDeps;
25+
26+ buildPhase = ''
27+ runHook preBuild
28+ emacs -L . --batch -f batch-byte-compile *.el
29+ runHook postBuild
30+ '';
31+
32+ installPhase = ''
33+ runHook preInstall
34+ install -d $out/share/emacs/site-lisp
35+ install *.el *.elc $out/share/emacs/site-lisp
36+ runHook postInstall
37+ '';
38+
39+ meta = {
40+ description = "Vim-like keybindings for markdown-mode";
41+ homepage = "https://github.com/Somelauw/evil-markdown";
42+ license = lib.licenses.gpl3Plus;
43+ maintainers = with lib.maintainers; [ leungbk ];
44+ platforms = emacs.meta.platforms;
45+ };
46+}