about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/emacs-modes/coffee/default.nix
blob: 495b1aca4b535328720f3dcd9c13b07942c33bba (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
{ stdenv, fetchgit, emacs }:

stdenv.mkDerivation rec {
  name = "coffee-mode-0.4.1";

  src = fetchgit {
    url = "https://github.com/defunkt/coffee-mode.git";
    rev = "c45c5f7a529363bc7aa57db0f3df26389fd233d8";
    sha256 = "36a7792b5ffbcc5a580e8d5b2425494c60a8015cfde0e3f8a946a685da231ce2";
  };

  buildInputs = [ emacs ];

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

  installPhase = ''
    install -d $out/share/emacs/site-lisp
    install coffee-mode.el coffee-mode.elc $out/share/emacs/site-lisp
  '';

  meta = {
    description = "Emacs major mode for CoffeeScript, unfancy JavaScript";
    homepage = https://github.com/defunkt/coffee-mode;
    license = stdenv.lib.licenses.gpl2Plus;

    platforms = stdenv.lib.platforms.all;
  };
}