nixpkgs/pkgs/tools/typesetting/skribilo/default.nix

79 lines
2.1 KiB
Nix
Raw Normal View History

2021-05-11 12:10:03 +00:00
{ lib
, stdenv
2020-11-30 16:34:49 +00:00
, fetchurl
, gettext
2021-05-11 12:10:03 +00:00
, ghostscript
2020-11-30 16:34:49 +00:00
, guile
, guile-lib
2021-05-11 12:10:03 +00:00
, guile-reader
2020-11-30 16:34:49 +00:00
, imagemagick
, makeWrapper
2021-05-11 12:10:03 +00:00
, pkg-config
, ploticus
, transfig
, enableEmacs ? false, emacs
, enableLout ? true, lout
, enableTex ? true, tex
2020-11-30 16:34:49 +00:00
}:
2018-06-27 18:22:03 +00:00
2020-11-30 16:34:49 +00:00
let
2021-05-11 12:10:03 +00:00
inherit (lib) optional;
in stdenv.mkDerivation rec{
pname = "skribilo";
2020-11-30 16:34:49 +00:00
version = "0.9.5";
2018-06-27 18:22:03 +00:00
src = fetchurl {
url = "http://download.savannah.nongnu.org/releases/skribilo/${pname}-${version}.tar.gz";
2020-11-30 16:34:49 +00:00
sha256 = "sha256-AIJqIcRjT7C0EO6J60gGjERdgAglh0ZU49U9XKPwvwk=";
2018-06-27 18:22:03 +00:00
};
2021-05-11 12:10:03 +00:00
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [
gettext
ghostscript
guile
guile-lib
guile-reader
imagemagick
ploticus
transfig
]
2018-06-27 18:22:03 +00:00
++ optional enableEmacs emacs
++ optional enableLout lout
++ optional enableTex tex;
2021-05-11 12:10:03 +00:00
postInstall =
let
guileVersion = lib.versions.majorMinor guile.version;
in
''
wrapProgram $out/bin/skribilo \
--prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \
--prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH"
'';
2018-06-27 18:22:03 +00:00
2021-05-11 12:10:03 +00:00
meta = with lib; {
homepage = "https://www.nongnu.org/skribilo/";
2018-06-27 18:22:03 +00:00
description = "The Ultimate Document Programming Framework";
longDescription = ''
2021-05-11 12:10:03 +00:00
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.
2018-06-27 18:22:03 +00:00
The input document can use Skribilo's markup language to provide
2021-05-11 12:10:03 +00:00
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.
2018-06-27 18:22:03 +00:00
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: Better Emacs and TeX integration