···11+{ runCommand
22+, diffutils
33+, ronn
44+}:
55+runCommand "ronn-test-reproducible-html" { } ''
66+ set -euo pipefail
77+88+ cat > aprog.1.ronn << EOF
99+ aprog
1010+ =====
1111+1212+ ## AUTHORS
1313+1414+ Vincent Haupert <veehaitch@users.noreply.github.com>
1515+ EOF
1616+1717+ # We have to repeat the manpage generation a few times to be confident
1818+ # it is in fact reproducible.
1919+ for i in {1..20}; do
2020+ ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-1
2121+ ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-2
2222+2323+ ${diffutils}/bin/diff -q aprog.1.html-1 aprog.1.html-2 \
2424+ || (printf 'The HTML manpage is not reproducible (round %d)' "$i" && exit 1)
2525+ done
2626+2727+ echo 'The HTML manpage appears reproducible'
2828+2929+ mkdir $out
3030+''