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:
@@ -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 {
|
||||
pname = "asciidoctor";
|
||||
@@ -11,6 +16,14 @@ let app = bundlerApp {
|
||||
"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; {
|
||||
description = "A faster Asciidoc processor written in Ruby";
|
||||
homepage = https://asciidoctor.org/;
|
||||
|
||||
Reference in New Issue
Block a user