Skip to content

Fix build-hook setting being clobbered#15083

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
lisanna-dettwyler:fix-build-hook-setting
Jan 26, 2026
Merged

Fix build-hook setting being clobbered#15083
Ericson2314 merged 1 commit intoNixOS:masterfrom
lisanna-dettwyler:fix-build-hook-setting

Conversation

@lisanna-dettwyler
Copy link
Contributor

Motivation

settings.buildHook.setDefault was running after nix.conf was parsed, causing whatever value settings.buildHook had to be clobbered. Re-arrange the logic so that the default is set before nix.conf is parsed, so that custom build hooks can be used by specifying them in nix.conf.

Context

Currently it is only possible to override the build hook by passing --option on the command line.


Add 👍 to pull requests you find important.

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

settings.buildHook.setDefault was running after nix.conf was parsed,
causing whatever value settings.buildHook had to be clobbered.
Re-arrange the logic so that the default is set before nix.conf is
parsed, so that custom build hooks can be used by specifying them in
nix.conf.

Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Jan 26, 2026
Copy link
Contributor

@xokdvium xokdvium left a comment

Choose a reason for hiding this comment

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

Hm this makes sense to me. I think the order of calls shouldn't matter too much in the sense that this setting doesn't depend on an initialised library.

@Ericson2314 Ericson2314 added this pull request to the merge queue Jan 26, 2026
Merged via the queue into NixOS:master with commit 623360d Jan 26, 2026
14 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants