2 buildPythonApplication,
14 pname = "pandoc-acro";
18 inherit pname version;
19 hash = "sha256-JMfSQXX+BCGdFQYPFB+r08WRnhT3aXfnBNINROxCUA0=";
22 buildPythonApplication {
23 inherit pname version src;
25 propagatedBuildInputs = [
30 # Something in the tests does not typecheck, but the tool works well.
33 passthru.tests.example-doc =
39 (texliveTeTeX.withPackages (
48 runCommand "pandoc-acro-example-docs" env ''
50 exampleFile="${pname}-${version}/tests/example.md"
51 metadataFile="${pname}-${version}/tests/metadata.yaml"
52 tar --extract "--file=${src}" "$exampleFile" "$metadataFile"
55 pandoc -F pandoc-acro "$exampleFile" "--metadata-file=$metadataFile" \
56 -T pdf -o $out/example.pdf
57 pandoc -F pandoc-acro "$exampleFile" "--metadata-file=$metadataFile" \
58 -T txt -o $out/example.txt
60 ! grep -q "\+afaik" $out/example.txt
64 homepage = "https://pypi.org/project/pandoc-acro/";
65 description = "Pandoc filter which manages acronyms in Pandoc flavored Markdown sources";
66 license = licenses.bsd2;
67 maintainers = with maintainers; [ tfc ];
68 mainProgram = "pandoc-acro";