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

stdenv.mkDerivation rec {
  name = "let-alist-1.0.3";

  src = fetchurl {
    url = "https://elpa.gnu.org/packages/let-alist-1.0.3.el";
    sha256 = "12n1cmjc7hzyy0jmsdxqz1hqzg4ri4nvvi0p9mw1d6v44xzfm0mx";
  };

  buildInputs = [ emacs ];

  unpackPhase = "cp -v ${src} let-alist.el";
  buildPhase = "emacs --batch -f batch-byte-compile let-alist.el";

  installPhase = ''
    mkdir -p $out/share/emacs/site-lisp
    mv -v *.el *.elc $out/share/emacs/site-lisp/
  '';

  meta = {
    homepage = https://elpa.gnu.org/packages/let-alist.html;
    description = "Easily let-bind values of an assoc-list by their names";
    license = stdenv.lib.licenses.gpl3Plus;
  };
}