summary refs log tree commit diff
path: root/pkgs/tools/typesetting/multimarkdown/default.nix
blob: 65cf5931ac10cdc92d54dce2709fddcc009a2389 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ lib
, stdenv
, fetchFromGitHub
, cmake
, perl
, pkg-config
}:

stdenv.mkDerivation rec {
  pname = "multimarkdown";
  version = "6.6.0";

  src = fetchFromGitHub {
    owner = "fletcher";
    repo = "MultiMarkdown-6";
    rev = version;
    hash = "sha256-emJbY0wucoc/GdjlILoeqjwuwuPpTjXTqZN0gUKOyLg=";
  };

  postPatch = ''
    patchShebangs tools/enumsToPerl.pl
  '';

  postInstall = ''
    # Move files from $out/ to sub directories to prevent conflicts
    # with other packages:
    mkdir -p $out/share/doc/multimarkdown/
    mv $out/LICENSE.txt $out/README.txt $out/share/doc/multimarkdown/
  '';

  nativeBuildInputs = [
    cmake
    perl
    pkg-config
  ];

  meta = with lib; {
    homepage = "https://fletcher.github.io/MultiMarkdown-6/introduction.html";
    description = "A derivative of Markdown that adds new syntax features";
    longDescription = ''
      MultiMarkdown is a lightweight markup language created by
      Fletcher T. Penney and based on Markdown, which supports
      more export-formats (html, latex, beamer, memoir, odf, opml,
      lyx, mmd) and implements some added features currently not
      available with plain Markdown syntax.

      It adds the following features to Markdown:

      - footnotes
      - tables
      - citations and bibliography (works best in LaTeX using BibTeX)
      - math support
      - automatic cross-referencing ability
      - smart typography, with support for multiple languages
      - image attributes
      - table and image captions
      - definition lists
      - glossary entries (LaTeX only)
      - document metadata (e.g. title, author, date, etc.)
    '';
    license = with licenses; [ mit ];
    platforms = platforms.all;
    maintainers = with maintainers; [ AndersonTorres ];
  };
}