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

let version = "1.9.0";

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

  src = fetchurl {
    url = "https://github.com/magnars/s.el/archive/${version}.tar.gz";
    sha256 = "1gah2k577gvnmxlpw7zrz0jr571vghzhdv2hbgchlgah07czd091";
  };

  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
  '';
}