Repository navigation
feat(nix): add poppler-utils to the docs capability module - #1578
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
poppler-utilsto thedocscapability module, somodules = [ "docs" ]covers reading PDFs as well as writing documents.
typst/typstylewere the writing half only. Withoutpdftotext/pdftoppmonPATH there is no CLI path from a PDF to text, and an agent's file reader — which
shells out to
pdftoppmto render a page — cannot open a PDF at all. Everyconsumer the module names (exo-pet/vault, the future
qmsapp, EXOMApresentations/grants) handles PDFs.
Changes
nix/modules/docs.nix—poppler-utilsinpackages, docstring records thePDF-reading rationale and why OCR stays out
docs/NIX.md— thedocsbullet gains a "PDF reading is part of thecapability" paragraph; OCR joins the deliberate-exclusions list
tests/test_flake_modules.py—test_docs_module_provides_poppler_utilsasserts
pdftotext/pdftoppmresolve from the module shell's own PATHCHANGELOG.md— Added (semver:minor, additive capability)Cost
nix path-info -S nixpkgs#poppler-utilson the current pin: 145.9 MB(139 MB when the issue was filed). OCR is explicitly out of scope:
tesseract1.11 GB,
ocrmypdf1.68 GB — an order of magnitude more for a capability mostdocsconsumers never use. It stays repo-local in exo-pet/vault#70 until asecond consumer justifies a dedicated
ocrmodule.Verification
uv run pytest tests/test_flake_modules.py— 32 passed, including the newpoppler test and
test_default_devshell_drvpath_matches_no_modules(thezero-cost-when-unused guarantee:
modules = [ ]consumers pay nothing)rc=1,pdftotextnot found), thenpassed after the module change — RED → GREEN
just precommit— full suite greenRefs: #1573