summary refs log tree commit diff
path: root/pkgs/build-support/emacs/trivial.nix
blob: 9c97e8bf95149774907d0cef04d0fcbed2b7b3ec (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
# trivial builder for Emacs packages

{ lib, ... }@envargs:

with lib;

args:

import ./generic.nix envargs ({
  #preConfigure = ''
  #  export LISPDIR=$out/share/emacs/site-lisp
  #  export VERSION_SPECIFIC_LISPDIR=$out/share/emacs/site-lisp
  #'';

  buildPhase = ''
    eval "$preBuild"

    emacs -L . --batch -f batch-byte-compile *.el

    eval "$postBuild"
  '';

  installPhase = ''
    eval "$preInstall"

    LISPDIR=$out/share/emacs/site-lisp
    install -d $LISPDIR
    install *.el *.elc $LISPDIR

    eval "$postInstall"
  '';
}

// args)