summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/d/default.nix
blob: 28736acded2ffde83e8c2db4fca4ff448b6315de (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
{stdenv, fetchurl, emacs}:

# Note: Don't have a version, using date as fallback.
let version = "20150111";

in stdenv.mkDerivation {
  name = "emacs-d-${version}";

  src = fetchurl {
    url = "https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/archive/53efec4d83c7cee8227597f010fe7fc400ff05f1.tar.gz";
    sha256 = "0vb0za51lc6qf1qgqisap4vzk36caa5k17zajjn034rhjsqfw0w7";
  };

  buildInputs = [ emacs ];

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

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

  meta = {
    description = "Major mode for editing D code";
    homepage = https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode;
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.all;
  };

}