···1+{ runCommand
2+, diffutils
3+, ronn
4+}:
5+runCommand "ronn-test-reproducible-html" { } ''
6+ set -euo pipefail
7+8+ cat > aprog.1.ronn << EOF
9+ aprog
10+ =====
11+12+ ## AUTHORS
13+14+ Vincent Haupert <veehaitch@users.noreply.github.com>
15+ EOF
16+17+ # We have to repeat the manpage generation a few times to be confident
18+ # it is in fact reproducible.
19+ for i in {1..20}; do
20+ ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-1
21+ ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-2
22+23+ ${diffutils}/bin/diff -q aprog.1.html-1 aprog.1.html-2 \
24+ || (printf 'The HTML manpage is not reproducible (round %d)' "$i" && exit 1)
25+ done
26+27+ echo 'The HTML manpage appears reproducible'
28+29+ mkdir $out
30+''