Skip to content

drv-in-db: port nix's derivation tables to postgres + standalone daemon#1668

Open
amaanq wants to merge 2 commits intoNixOS:masterfrom
obsidiansystems:hydra-v2-daemon
Open

drv-in-db: port nix's derivation tables to postgres + standalone daemon#1668
amaanq wants to merge 2 commits intoNixOS:masterfrom
obsidiansystems:hydra-v2-daemon

Conversation

@amaanq
Copy link
Copy Markdown
Member

@amaanq amaanq commented Apr 14, 2026

Summary

The first commit is a direct port of the 6 normalized tables from NixOS/nix's drv-in-db
branch, and is adapted for Postgres: jsonb_typeof instead of json_type, native text[]
for args, boolean hasStructuredAttrs, and serial PK since hydra has no
ValidPaths table.

The second commit adds a separate crate/exe that sits between the evaluator
and the real nix daemon. It speaks the daemon protocol, proxies reads
through to the host store, and when a .drv lands via add_to_store_nar
it parses the ATerm and fans the result out into the 6 drv-in-db tables.

amaanq added 2 commits April 14, 2026 00:16
This is a direct port of the 6 normalized tables from https://github.com/NixOS/nix/tree/drv-in-db,
adapted for Postgres: `jsonb_typeof` instead of `json_type`, native `text[]`
for args, boolean `hasStructuredAttrs`, and serial PK since hydra has no
`ValidPaths` table.
This commit adds a separate crate/exe that sits between the evaluator
and the real nix daemon. It speaks the daemon protocol, proxies reads
through to the host store, and when a .drv lands via add_to_store_nar
it parses the ATerm and fans the result out into the 6 drv-in-db tables.
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