asciidoc: get rid of ? null

This commit is contained in:
Robert Schütz 2022-06-27 19:57:01 +00:00
parent 919e04f5d7
commit 601d9db27f
2 changed files with 29 additions and 64 deletions

View file

@ -2,38 +2,38 @@
, fetchFromGitHub, autoreconfHook
, installShellFiles
, enableStandardFeatures ? false
, sourceHighlight ? null
, highlight ? null
, pygments ? null
, graphviz ? null
, texlive ? null
, dblatexFull ? null
, libxslt ? null
, w3m ? null
, lynx ? null
, imagemagick ? null
, lilypond ? null
, libxml2 ? null
, docbook_xml_dtd_45 ? null
, docbook_xsl_ns ? null
, docbook_xsl ? null
, fop ? null
, epubcheck ? null
, gnused ? null
, coreutils ? null
, sourceHighlight
, highlight
, pygments
, graphviz
, texlive
, dblatexFull
, libxslt
, w3m
, lynx
, imagemagick
, lilypond
, libxml2
, docbook_xml_dtd_45
, docbook_xsl_ns
, docbook_xsl
, fop
, epubcheck
, gnused
, coreutils
# if true, enable all the below filters and backends
, enableExtraPlugins ? false
# unzip is needed to extract filter and backend plugins
, unzip ? null
, unzip
# filters
, enableDitaaFilter ? false, jre ? null
, enableMscgenFilter ? false, mscgen ? null
, enableDiagFilter ? false, blockdiag ? null, seqdiag ? null, actdiag ? null, nwdiag ? null
, enableQrcodeFilter ? false, qrencode ? null
, enableMatplotlibFilter ? false, matplotlib ? null, numpy ? null
, enableAafigureFilter ? false, aafigure ? null, recursivePthLoader ? null
, enableDitaaFilter ? false, jre
, enableMscgenFilter ? false, mscgen
, enableDiagFilter ? false, blockdiag, seqdiag, actdiag, nwdiag
, enableQrcodeFilter ? false, qrencode
, enableMatplotlibFilter ? false, matplotlib, numpy
, enableAafigureFilter ? false, aafigure, recursivePthLoader
# backends
, enableDeckjsBackend ? false
, enableOdfBackend ? false
@ -44,37 +44,6 @@
, buildPackages
}:
assert enableStandardFeatures ->
sourceHighlight != null &&
highlight != null &&
pygments != null &&
graphviz != null &&
texlive != null &&
dblatexFull != null &&
libxslt != null &&
w3m != null &&
lynx != null &&
imagemagick != null &&
lilypond != null &&
libxml2 != null &&
docbook_xml_dtd_45 != null &&
docbook_xsl_ns != null &&
docbook_xsl != null &&
(fop != null || !enableJava) &&
epubcheck != null &&
gnused != null &&
coreutils != null;
# filters
assert enableExtraPlugins || enableDitaaFilter || enableMscgenFilter || enableDiagFilter || enableQrcodeFilter || enableAafigureFilter -> unzip != null;
assert (enableExtraPlugins && enableJava) || enableDitaaFilter -> jre != null;
assert enableExtraPlugins || enableMscgenFilter -> mscgen != null;
assert enableExtraPlugins || enableDiagFilter -> blockdiag != null && seqdiag != null && actdiag != null && nwdiag != null;
assert enableExtraPlugins || enableMatplotlibFilter -> matplotlib != null && numpy != null;
assert enableExtraPlugins || enableAafigureFilter -> aafigure != null && recursivePthLoader != null;
# backends
assert enableExtraPlugins || enableDeckjsBackend || enableOdfBackend -> unzip != null;
let
_enableDitaaFilter = (enableExtraPlugins && enableJava) || enableDitaaFilter;

View file

@ -4470,21 +4470,17 @@ with pkgs;
arpoison = callPackage ../tools/networking/arpoison { };
asciidoc = callPackage ../tools/typesetting/asciidoc {
inherit (python3.pkgs) matplotlib numpy aafigure recursivePthLoader;
inherit (python3.pkgs) pygments matplotlib numpy aafigure recursivePthLoader;
texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; };
w3m = w3m-batch;
enableStandardFeatures = false;
};
asciidoc-full = asciidoc.override {
inherit (python3.pkgs) pygments;
texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; };
w3m = w3m-batch;
enableStandardFeatures = true;
};
asciidoc-full-with-plugins = asciidoc.override {
inherit (python3.pkgs) pygments;
texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; };
w3m = w3m-batch;
enableStandardFeatures = true;
enableExtraPlugins = true;
};