Skip to content

libstore: parameterize the inputs of Derivation#15968

Open
amaanq wants to merge 2 commits into
NixOS:masterfrom
obsidiansystems:drv-inputs-shuffle-0
Open

libstore: parameterize the inputs of Derivation#15968
amaanq wants to merge 2 commits into
NixOS:masterfrom
obsidiansystems:drv-inputs-shuffle-0

Conversation

@amaanq

@amaanq amaanq commented Jun 3, 2026

Copy link
Copy Markdown
Member

Working with templates adds some overhead, but parameterizing the inputs
is an important prerequisite for storing the options inside the derivation.
Subsequent commits can clean this up significantly.

@github-actions github-actions Bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Jun 3, 2026
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch 2 times, most recently from 3f2a8c6 to a7ced2f Compare June 3, 2026 23:52
@Ericson2314 Ericson2314 force-pushed the drv-inputs-shuffle-0 branch from a7ced2f to 6ae3c9e Compare June 6, 2026 19:45
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch 2 times, most recently from 323de16 to 4405c35 Compare June 8, 2026 21:29
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-building-goal.cc
Comment thread src/libstore/include/nix/store/build/worker.hh Outdated
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch 2 times, most recently from 154bc10 to 0bc72d9 Compare June 8, 2026 22:59
Comment thread src/libstore/build/derivation-goal.cc
Comment thread src/libstore/build/derivation-goal.cc Outdated
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch 2 times, most recently from 0bec0b8 to 33776f4 Compare June 9, 2026 16:15
@xokdvium

xokdvium commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Tbh I'm a bit on the fence about using designated initialisers for this stuff – in the long run it would be nicer to make the internal representation of Derivation more space efficient (like using flat map / sorted vectors). This seems to be moving us in the opposite direction. Derivation isn't really a class with no invariants. I'm not sure if we should tighten that with a builder pattern before or after - either way it's churn, but I'd prefer that we only have to do the churn of builder pattern + immutable accessors only once.

Comment thread src/libstore/build/derivation-building-goal.cc
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch from 33776f4 to b687473 Compare June 9, 2026 17:47
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch from b687473 to 994f78e Compare June 17, 2026 17:45
Ericson2314 and others added 2 commits June 17, 2026 13:50
Working with templates adds some overhead, but parameterizing the inputs
is an important prerequisite for storing the options inside the derivation.
Subsequent commits can clean this up significantly.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
This is much nicer to read than imperatively mutating fields one by one.
@amaanq amaanq force-pushed the drv-inputs-shuffle-0 branch from 994f78e to 510f635 Compare June 17, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants