Skip to content

Conversation

@XYenon
Copy link
Contributor

@XYenon XYenon commented Oct 19, 2025

Fixes #340

Copy link

@x10an14 x10an14 left a comment

Choose a reason for hiding this comment

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

LGTM!

@notgne2
Copy link
Contributor

notgne2 commented Nov 3, 2025

Well I can't merge anymore apparently, but please, @rvem ? @PhilTaken ? anybody

@rvem rvem merged commit 9c870f6 into serokell:master Nov 4, 2025
9 of 10 checks passed
@XYenon XYenon deleted the fix/nix-2-32 branch November 5, 2025 01:50
Copy link

@Rutherther Rutherther left a comment

Choose a reason for hiding this comment

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

Changes from this PR will break usage for people using nix store at different location than the default one.

let new_deriver = &if data.supports_flakes || data.deploy_data.merged_settings.remote_build.unwrap_or(false) {
// Nix 2.32+ returns relative paths (without /nix/store/ prefix) in show-derivation output
// Normalize to always use full store paths
let deriver = if deriver_key.starts_with("/nix/store/") {

Choose a reason for hiding this comment

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

I think a check for just '/' would be better. That way people using nix store at different locations will also be able to use this.

let deriver = if deriver_key.starts_with("/nix/store/") {
deriver_key.to_string()
} else {
format!("/nix/store/{}", deriver_key)

Choose a reason for hiding this comment

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

This doesn't allow locations for nix store other than /nix/store. One solution would be to look at $NIX_STORE_DIR env var for location of the store and prepend that, only defaulting to /nix/store. Another would be to utilize the output of nix eval --expr builtins.storeDir.

Choose a reason for hiding this comment

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

Ah, the command is definitely better, because this can also be configured in nix.conf - https://nix.dev/manual/nix/2.32/command-ref/conf-file.html#conf-store

dguibert added a commit to dguibert/deploy-rs that referenced this pull request Nov 27, 2025
 serokell#346 fixes compatibility with Nix 2.32+ but as stated in [1] it doesn't allow
 locations for nix store other than /nix/store.

This patch calls nix eval to retreive the storeDir not relying one the hard-coded value.

[1] serokell#346 (comment)
dguibert added a commit to dguibert/deploy-rs that referenced this pull request Nov 27, 2025
 serokell#346 fixes compatibility with Nix 2.32+ but as stated in [1] it doesn't allow
 locations for nix store other than /nix/store.

This patch calls nix eval to retreive the storeDir not relying one the hard-coded value.

[1] serokell#346 (comment)
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.

Cannot deploy with Nix 2.32(pre)

5 participants