asciidoctor: wrap asciidoctor-epub3 for epubcheck and kindlegen
kindlegen is unfree, so we don't include it by default. The derivation can be overridden to include it.
This commit is contained in:
parent
855936370c
commit
d6b7b2a8cf
@ -1,4 +1,9 @@
|
|||||||
{ lib, bundlerApp, mkShell, bundix }:
|
{ lib, bundlerApp, makeWrapper,
|
||||||
|
# Optional dependencies, can be null
|
||||||
|
epubcheck, kindlegen,
|
||||||
|
# For the update shell
|
||||||
|
mkShell, bundix
|
||||||
|
}:
|
||||||
|
|
||||||
let app = bundlerApp {
|
let app = bundlerApp {
|
||||||
pname = "asciidoctor";
|
pname = "asciidoctor";
|
||||||
@ -11,6 +16,14 @@ let app = bundlerApp {
|
|||||||
"asciidoctor-epub3"
|
"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"}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A faster Asciidoc processor written in Ruby";
|
description = "A faster Asciidoc processor written in Ruby";
|
||||||
homepage = https://asciidoctor.org/;
|
homepage = https://asciidoctor.org/;
|
||||||
|
@ -1922,7 +1922,7 @@ in
|
|||||||
enableExtraPlugins = true;
|
enableExtraPlugins = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
asciidoctor = callPackage ../tools/typesetting/asciidoctor { };
|
asciidoctor = callPackage ../tools/typesetting/asciidoctor { kindlegen = null; };
|
||||||
|
|
||||||
asunder = callPackage ../applications/audio/asunder { };
|
asunder = callPackage ../applications/audio/asunder { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user