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.