Skip to content

feat(nix): add poppler-utils to the docs capability module - #1578

Merged
c-vigo merged 3 commits into
devfrom
feature/1573-docs-poppler-utils
Aug 31, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/1573-docs-poppler-utils

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds poppler-utils to the docs capability module, so modules = [ "docs" ]
covers reading PDFs as well as writing documents.

typst/typstyle were the writing half only. Without pdftotext/pdftoppm on
PATH there is no CLI path from a PDF to text, and an agent's file reader — which
shells out to pdftoppm to render a page — cannot open a PDF at all. Every
consumer the module names (exo-pet/vault, the future qms app, EXOMA
presentations/grants) handles PDFs.

Changes

  • nix/modules/docs.nix — poppler-utils in packages, docstring records the
    PDF-reading rationale and why OCR stays out
  • docs/NIX.md — the docs bullet gains a "PDF reading is part of the
    capability" paragraph; OCR joins the deliberate-exclusions list
  • tests/test_flake_modules.py — test_docs_module_provides_poppler_utils
    asserts pdftotext/pdftoppm resolve from the module shell's own PATH
  • CHANGELOG.md — Added (semver:minor, additive capability)

Cost

nix path-info -S nixpkgs#poppler-utils on the current pin: 145.9 MB
(139 MB when the issue was filed). OCR is explicitly out of scope: tesseract
1.11 GB, ocrmypdf 1.68 GB — an order of magnitude more for a capability most
docs consumers never use. It stays repo-local in exo-pet/vault#70 until a
second consumer justifies a dedicated ocr module.

Verification

  • uv run pytest tests/test_flake_modules.py — 32 passed, including the new
    poppler test and test_default_devshell_drvpath_matches_no_modules (the
    zero-cost-when-unused guarantee: modules = [ ] consumers pay nothing)
  • Test failed first for the right reason (rc=1, pdftotext not found), then
    passed after the module change — RED → GREEN
  • just precommit — full suite green

Refs: #1573

@c-vigo
c-vigo enabled auto-merge August 31, 2026 05:22
@c-vigo
c-vigo merged commit 9b8c460 into dev Aug 31, 2026
14 checks passed
@c-vigo
c-vigo deleted the feature/1573-docs-poppler-utils branch August 31, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant