skribilo: rewrite

This commit is contained in:
AndersonTorres 2021-05-11 09:10:03 -03:00
parent 5ad65d4eb8
commit 12d5b760ae
1 changed files with 47 additions and 36 deletions

View File

@ -1,64 +1,75 @@
{ lib, stdenv { lib
, stdenv
, fetchurl , fetchurl
, pkg-config
, gettext , gettext
, guile
, guile-reader
, guile-lib
, ploticus
, imagemagick
, ghostscript , ghostscript
, transfig , guile
, enableEmacs ? false, emacs ? null , guile-lib
, enableLout ? true, lout ? null , guile-reader
, enableTex ? true, tex ? null , imagemagick
, makeWrapper , makeWrapper
, pkg-config
, ploticus
, transfig
, enableEmacs ? false, emacs
, enableLout ? true, lout
, enableTex ? true, tex
}: }:
let let
inherit (lib) optional;
in stdenv.mkDerivation rec{
pname = "skribilo"; pname = "skribilo";
version = "0.9.5"; version = "0.9.5";
inherit (lib) optional;
in stdenv.mkDerivation {
inherit pname version;
src = fetchurl { src = fetchurl {
url = "http://download.savannah.nongnu.org/releases/skribilo/${pname}-${version}.tar.gz"; url = "http://download.savannah.nongnu.org/releases/skribilo/${pname}-${version}.tar.gz";
sha256 = "sha256-AIJqIcRjT7C0EO6J60gGjERdgAglh0ZU49U9XKPwvwk="; sha256 = "sha256-AIJqIcRjT7C0EO6J60gGjERdgAglh0ZU49U9XKPwvwk=";
}; };
nativeBuildInputs = [ pkg-config makeWrapper ]; nativeBuildInputs = [
pkg-config
buildInputs = [ gettext guile ploticus imagemagick ghostscript transfig ] makeWrapper
];
buildInputs = [
gettext
ghostscript
guile
guile-lib
guile-reader
imagemagick
ploticus
transfig
]
++ optional enableEmacs emacs ++ optional enableEmacs emacs
++ optional enableLout lout ++ optional enableLout lout
++ optional enableTex tex; ++ optional enableTex tex;
propagatedBuildInputs = [ guile-reader guile-lib ]; postInstall =
let
postInstall = '' guileVersion = lib.versions.majorMinor guile.version;
in
''
wrapProgram $out/bin/skribilo \ wrapProgram $out/bin/skribilo \
--prefix GUILE_LOAD_PATH : "$out/share/guile/site:${guile-lib}/share/guile/site:${guile-reader}/share/guile/site" \ --prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \
--prefix GUILE_LOAD_COMPILED_PATH : "$out/share/guile/site:${guile-lib}/share/guile/site:${guile-reader}/share/guile/site" --prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH"
''; '';
meta = with lib;{ meta = with lib; {
homepage = "https://www.nongnu.org/skribilo/";
description = "The Ultimate Document Programming Framework"; description = "The Ultimate Document Programming Framework";
longDescription = '' longDescription = ''
Skribilo is a free document production tool that takes a Skribilo is a free document production tool that takes a structured
structured document representation as its input and renders that document representation as its input and renders that document in a
document in a variety of output formats: HTML and Info for variety of output formats: HTML and Info for on-line browsing, and Lout
on-line browsing, and Lout and LaTeX for high-quality hard and LaTeX for high-quality hard copies.
copies.
The input document can use Skribilo's markup language to provide The input document can use Skribilo's markup language to provide
information about the document's structure, which is similar to information about the document's structure, which is similar to HTML or
HTML or LaTeX and does not require expertise. Alternatively, it LaTeX and does not require expertise. Alternatively, it can use a simpler,
can use a simpler, "markup-less" format that borrows from Emacs' "markup-less" format that borrows from Emacs' outline mode and from other
outline mode and from other conventions used in emails, Usenet conventions used in emails, Usenet and text.
and text.
''; '';
homepage = "https://www.nongnu.org/skribilo/";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ]; maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix; platforms = platforms.unix;