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

stdenv.mkDerivation {
  name = "org-mac-link-1.2";

  src = fetchurl {
    url = "https://raw.githubusercontent.com/stuartsierra/org-mode/master/contrib/lisp/org-mac-link.el";
    sha256 = "1gkzlfbhg289r1hbqd25szan1wizgk6s99h9xxjip5bjv0jywcx5";
  };

  phases = [ "buildPhase" "installPhase"];

  buildInputs = [ emacs ];

  buildPhase = ''
    cp $src org-mac-link.el
    emacs --batch -f batch-byte-compile org-mac-link.el
  '';

  installPhase = ''
    install -d $out/share/emacs/site-lisp
    install org-mac-link.el $out/share/emacs/site-lisp
  '';

  meta = {
    description = "Insert org-mode links to items selected in various Mac apps";
    homepage = "https://orgmode.org/worg/org-contrib/org-mac-link.html";
    license = stdenv.lib.licenses.gpl3;
    platforms = stdenv.lib.platforms.all;
  };
}