about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/emacs/elisp-packages/evil-markdown/default.nix
blob: 74fc1a17921959246e918a3a837b9c8ad863dd0e (plain) (blame)
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
{ stdenv, fetchFromGitHub, emacs, emacsPackages, lib }:

let
  runtimeDeps = with emacsPackages; [
    evil
    markdown-mode
  ];
in
stdenv.mkDerivation {
  pname = "evil-markdown";
  version = "2020-06-01";

  src = fetchFromGitHub {
    owner = "Somelauw";
    repo = "evil-markdown";
    rev = "064fe9b4767470472356d20bdd08e2f30ebbc9ac";
    sha256 = "sha256-Kt2wxG1XCFowavVWtj0urM/yURKegonpZcxTy/+CrJY=";
  };

  buildInputs = [
    emacs
  ] ++ runtimeDeps;

  propagatedUserEnvPkgs = runtimeDeps;

  buildPhase = ''
    runHook preBuild
    emacs -L . --batch -f batch-byte-compile *.el
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    install -d $out/share/emacs/site-lisp
    install *.el *.elc $out/share/emacs/site-lisp
    runHook postInstall
  '';

  meta = {
    description = "Vim-like keybindings for markdown-mode";
    homepage = "https://github.com/Somelauw/evil-markdown";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ leungbk ];
    platforms = emacs.meta.platforms;
  };
}