nixpkgs/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
EdenEast e9ce489b46
asciidoctor-with-extensions: init asciidoctor-reducer at 1.0.5
Add asciidoctor-reducer to the extension list of asciidoctor.
2023-09-04 18:45:37 -04:00

43 lines
981 B
Nix

{ lib
, bundlerApp
, bundlerUpdateScript
, makeWrapper
, withJava ? true, jre # Used by asciidoctor-diagram for ditaa and PlantUML
}:
let
path = lib.makeBinPath (lib.optional withJava jre);
in
bundlerApp rec {
pname = "asciidoctor";
gemdir = ./.;
exes = [
"asciidoctor"
"asciidoctor-epub3"
"asciidoctor-multipage"
"asciidoctor-pdf"
"asciidoctor-reducer"
"asciidoctor-revealjs"
];
nativeBuildInputs = [ makeWrapper ];
postBuild = lib.optionalString (path != "") (lib.concatMapStrings (exe: ''
wrapProgram $out/bin/${exe} \
--prefix PATH : ${path}
'') exes);
passthru = {
updateScript = bundlerUpdateScript "asciidoctor-with-extensions";
};
meta = with lib; {
description = "A faster Asciidoc processor written in Ruby, with many extensions enabled";
homepage = "https://asciidoctor.org/";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.unix;
};
}