Skip to content

Make DerivationBuilder not require a Store - #16381

Merged
Ericson2314 merged 4 commits into
NixOS:masterfrom
obsidiansystems:derivation-builder-no-store
Sep 10, 2026
Merged

Make DerivationBuilder not require a Store#16381
Ericson2314 merged 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
@amaanq
amaanq force-pushed the derivation-builder-no-store branch 2 times, most recently from 10ed25a to fdbf219 Compare August 28, 2026 19:52
Comment thread src/libstore/build/derivation-builder-impl.cc Outdated
Comment thread src/libstore/build/derivation-builder-impl.hh Outdated
Comment thread src/libstore/unix/build/unix-derivation-builder.cc Outdated
@amaanq
amaanq force-pushed the derivation-builder-no-store branch 2 times, most recently from e325957 to cd89a89 Compare September 9, 2026 20:05
Comment thread src/libstore/build/derivation-building-goal.cc Outdated
Comment thread src/libstore/build/derivation-building-goal.cc Outdated
Comment thread src/libstore/build/derivation-builder-impl.hh Outdated
@amaanq
amaanq force-pushed the derivation-builder-no-store branch from cd89a89 to c292201 Compare September 9, 2026 21:05
Comment thread src/libstore/unix/build/unix-derivation-builder.cc Outdated

@xokdvium xokdvium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems nice and makes the requirements more obvious. I think this would help quite a bit to optimise the stuff down the line.

@Ericson2314
Ericson2314 force-pushed the derivation-builder-no-store branch 2 times, most recently from cbc140d to 0d0feff Compare September 9, 2026 23:20
@Ericson2314
Ericson2314 force-pushed the derivation-builder-no-store branch from 0d0feff to 04e1ca5 Compare September 9, 2026 23:32
The hope is to make `DerivationBuilder` easier to use with much less of
libnixstore.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
@Ericson2314
Ericson2314 force-pushed the derivation-builder-no-store branch from 04e1ca5 to 4989a54 Compare September 9, 2026 23:38
@Ericson2314
Ericson2314 added this pull request to the merge queue Sep 10, 2026
Merged via the queue into NixOS:master with commit f88835d Sep 10, 2026
16 checks passed
@Ericson2314
Ericson2314 deleted the derivation-builder-no-store branch September 10, 2026 00:50
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