ffa173a0

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Fetch XML schemas as FODs and embed them, instead of vendoring

Stop committing the eCH XSDs to the repository. nix/schemas.nix fetches each
schema from its upstream as a fixed-output derivation (pinning the exact bytes
by hash), applies the tracked eCH-0119 patch, and assembles them next to the
hand-written catalog.xml as the centjesSwitzerlandSchemas package.

The centjes-switzerland executable embeds that directory at compile time with
file-embed, driven by the CENTJES_SWITZERLAND_SCHEMA_DIR environment variable
that both the package build (overlay preConfigure) and the development shell
set, so stack and nix build the same schemas from the same source. At runtime
the schemas are materialised into a temporary directory for xmllint.

The fixed-output hashes are the provenance: if an upstream file changes, the
build fails on a hash mismatch. The local eCH-0119 schemaLocation fix is
tracked as nix/schema-patches/eCH-0119-4-0-0.patch.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 0s 2s 2s 2s 0s
Eval 2s 1m20s 1m20s 1m22s 0s
Build 29s 13m11s 4m24s 4m53s 0s
Suite 0s 14m34s 4m53s 4m53s 0s

Timeline

0s20s40s1m1m20s1m40s2m2m20s2m40s3m3m20s3m40s4m4m20s4m40s