about summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/js2/default.nix
blob: e5958021aa27bef49636d5e52c3103448a6c2131 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, fetchgit, emacs }:

stdenv.mkDerivation {
  name = "js2-mode-0-20120130";

  src = fetchgit {
    url = "git://github.com/mooz/js2-mode.git";
    rev = "4c008b1987aa53769899e24808b6d74b41b4ff40";
    sha256 = "6af5f52e46ffe85b7610e2db19a96afbef60a6f5374f1c5db3653448e30160be";
  };

  buildInputs = [ emacs ];

  buildPhase = ''
    emacs --batch -f batch-byte-compile js2-mode.el
  '';

  installPhase = ''
    mkdir -p $out/share/emacs/site-lisp
    cp js2-mode.el js2-mode.elc $out/share/emacs/site-lisp/
  '';
}