2019-07-04 19:09:15 +03:00
|
|
|
{ lib, bundlerApp, makeWrapper,
|
2019-07-04 16:55:02 +03:00
|
|
|
# Optional dependencies, can be null
|
2019-07-04 19:09:15 +03:00
|
|
|
epubcheck, kindlegen,
|
2019-07-22 15:02:47 +03:00
|
|
|
bundlerUpdateScript
|
2019-07-04 16:55:02 +03:00
|
|
|
}:
|
2017-08-11 05:11:46 +03:00
|
|
|
|
2019-07-04 19:09:15 +03:00
|
|
|
let
|
|
|
|
app = bundlerApp {
|
2019-07-04 14:39:29 +03:00
|
|
|
pname = "asciidoctor";
|
|
|
|
gemdir = ./.;
|
2016-05-01 17:05:22 +03:00
|
|
|
|
2019-07-04 14:39:29 +03:00
|
|
|
exes = [
|
|
|
|
"asciidoctor"
|
|
|
|
"asciidoctor-pdf"
|
|
|
|
"asciidoctor-safe"
|
2019-07-04 14:41:09 +03:00
|
|
|
"asciidoctor-epub3"
|
2019-07-04 14:39:29 +03:00
|
|
|
];
|
2018-04-09 13:45:48 +03:00
|
|
|
|
2019-07-04 16:55:02 +03:00
|
|
|
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 = {
|
2019-07-22 15:02:47 +03:00
|
|
|
updateScript = bundlerUpdateScript "asciidoctor";
|
2019-07-04 19:09:15 +03:00
|
|
|
};
|
|
|
|
|
2019-07-04 14:39:29 +03:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A faster Asciidoc processor written in Ruby";
|
|
|
|
homepage = https://asciidoctor.org/;
|
|
|
|
license = licenses.mit;
|
2019-07-22 15:02:47 +03:00
|
|
|
maintainers = with maintainers; [ gpyh nicknovitski ];
|
2019-07-04 14:39:29 +03:00
|
|
|
platforms = platforms.unix;
|
2018-04-09 13:45:48 +03:00
|
|
|
};
|
|
|
|
};
|
2019-07-04 19:09:15 +03:00
|
|
|
in
|
|
|
|
app
|