Skip to content

Make DerivationBuilder not require a Store - #16381

Open
amaanq wants to merge 4 commits into
NixOS:masterfrom
obsidiansystems:derivation-builder-no-store
Open

Make DerivationBuilder not require a Store#16381
amaanq wants to merge 4 commits into
NixOS:masterfrom
obsidiansystems:derivation-builder-no-store

Conversation

@amaanq

@amaanq amaanq commented Aug 28, 2026

Copy link
Copy Markdown
Member

Motivation

DerivationBuilder currently does store work itself, registering outputs and cleaning up at the end of the build, which couples it to a full Store even though building only needs the store layout. These commits move that responsibility to the caller and switch the builder to StoreDirConfig where possible, so DerivationBuilder no longer requires a Store.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@amaanq
amaanq requested a review from Ericson2314 as a code owner August 28, 2026 01:11
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from aad1ef7 to b2c6128 Compare August 28, 2026 01:34
Comment thread src/libstore/build/derivation-builder-impl.hh
Comment thread src/libstore/unix/build/unix-derivation-builder-impl.hh
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from b2c6128 to 1bb9f30 Compare August 28, 2026 14:42
@amaanq amaanq changed the title Expose registerOutputs and cleanupBuild Make DerivationBuilder not require a Store Aug 28, 2026
@amaanq
amaanq force-pushed the derivation-builder-no-store branch 3 times, most recently from 9e026da to 1fc6ad0 Compare August 28, 2026 15:20
Comment thread src/libstore/windows/build/windows-derivation-builder.cc
Comment thread src/libstore/unix/build/unix-derivation-builder.cc Outdated
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from 1fc6ad0 to 5348b90 Compare August 28, 2026 16:59
Comment thread src/libstore/include/nix/store/build/derivation-builder.hh Outdated
Comment thread src/libstore/include/nix/store/build/derivation-builder.hh Outdated
@amaanq
amaanq force-pushed the derivation-builder-no-store branch 2 times, most recently from fc16bb4 to da3a013 Compare August 28, 2026 18:08
Comment thread src/libstore/include/nix/store/build/derivation-builder.hh
Comment thread src/libstore/windows/build/windows-derivation-builder.cc Outdated
Ericson2314 and others added 2 commits August 28, 2026 15:20
…s possible

This is for FFI: we can make a `StoreDirConfig` with FFI, but we cannot
realistically make a `Store` that way.
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from da3a013 to 10ed25a Compare August 28, 2026 19:47
The hope is to make `DerivationBuilder` easier to use with much less of
libnixstore.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from 10ed25a to fdbf219 Compare August 28, 2026 19:52
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.

3 participants