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

41 lines
981 B
Nix
Raw Normal View History

2019-07-04 19:09:15 +03:00
{ lib, bundlerApp, makeWrapper,
# Optional dependencies, can be null
2019-07-04 19:09:15 +03:00
epubcheck, kindlegen,
bundlerUpdateScript
}:
2017-08-11 05:11:46 +03:00
2019-07-04 19:09:15 +03:00
let
app = bundlerApp {
pname = "asciidoctor";
gemdir = ./.;
2016-05-01 17:05:22 +03:00
exes = [
"asciidoctor"
"asciidoctor-pdf"
"asciidoctor-safe"
"asciidoctor-epub3"
];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/asciidoctor-epub3" \
${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"} \
${lib.optionalString (kindlegen != null) "--set KINDLEGEN ${kindlegen}/bin/kindlegen"}
'';
2019-07-04 19:09:15 +03:00
passthru = {
updateScript = bundlerUpdateScript "asciidoctor";
2019-07-04 19:09:15 +03:00
};
meta = with lib; {
description = "A faster Asciidoc processor written in Ruby";
homepage = https://asciidoctor.org/;
license = licenses.mit;
maintainers = with maintainers; [ gpyh nicknovitski ];
platforms = platforms.unix;
};
};
2019-07-04 19:09:15 +03:00
in
app