summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs/elisp-packages/rect-mark/default.nix
blob: 1275c51b99e3eff57bbf4af48e13a29f8a859f81 (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
{ lib, stdenv, fetchurl, emacs }:

stdenv.mkDerivation {
  name = "rect-mark-1.4";

  src = fetchurl {
    url = "http://emacswiki.org/emacs/download/rect-mark.el";
    sha256 = "0pyyg53z9irh5jdfvh2qp4pm8qrml9r7lh42wfmdw6c7f56qryh8";
  };

  phases = [ "buildPhase" "installPhase"];

  buildInputs = [ emacs ];

  buildPhase = ''
    cp $src rect-mark.el
    emacs --batch -f batch-byte-compile rect-mark.el
  '';

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

  meta = {
    description = "Mark a rectangle of text with highlighting";
    homepage = "http://emacswiki.org/emacs/RectangleMark";
    license = lib.licenses.gpl2Plus;

    platforms = lib.platforms.all;
  };
}