summary refs log tree commit diff
path: root/pkgs/tools/typesetting/skribilo/default.nix
blob: a834ccdccbf5c75e894d19be7a4320fe29033af4 (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
66
67
68
69
70
71
72
73
74
{ lib
, stdenv
, fetchurl
, fig2dev
, gettext
, ghostscript
, guile
, guile-lib
, guile-reader
, imagemagick
, makeWrapper
, pkg-config
, enableEmacs ? false, emacs
, enableLout ? stdenv.isLinux, lout
, enablePloticus ? stdenv.isLinux, ploticus
, enableTex ? true, tex
}:

let
  inherit (lib) optional;
in stdenv.mkDerivation (finalAttrs: {
  pname = "skribilo";
  version = "0.10.0";

  src = fetchurl {
    url = "http://download.savannah.nongnu.org/releases/skribilo/skribilo-${finalAttrs.version}.tar.gz";
    hash = "sha256-jP9I7hds7f1QMmSaNJpGlSvqUOwGcg+CnBzMopIS9Q4=";
  };

  nativeBuildInputs = [
    makeWrapper
    pkg-config
  ];

  buildInputs = [
    fig2dev
    gettext
    ghostscript
    guile
    guile-lib
    guile-reader
    imagemagick
  ]
  ++ optional enableEmacs emacs
  ++ optional enableLout lout
  ++ optional enablePloticus ploticus
  ++ optional enableTex tex;

  postInstall = ''
    wrapProgram $out/bin/skribilo \
      --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
      --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
  '';

  meta = {
    homepage = "https://www.nongnu.org/skribilo/";
    description = "The Ultimate Document Programming Framework";
    longDescription = ''
      Skribilo is a free document production tool that takes a structured
      document representation as its input and renders that document in a
      variety of output formats: HTML and Info for on-line browsing, and Lout
      and LaTeX for high-quality hard copies.

      The input document can use Skribilo's markup language to provide
      information about the document's structure, which is similar to HTML or
      LaTeX and does not require expertise. Alternatively, it can use a simpler,
      "markup-less" format that borrows from Emacs' outline mode and from other
      conventions used in emails, Usenet and text.
    '';
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.unix;
  };
})