[remote builder] nix build --rebuild ignores remote builder #714

Open
opened 2025-03-04 18:30:21 +00:00 by dwt · 1 comment

Describe the bug

When building a package using a remote builder --rebuild ignores the remote builder.

Steps To Reproduce

  1. I'm on a Mac with a remote builder to build linux stuff. I am on this setup, that means I use the the nix-rosetta-builder
  2.  ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay
     ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay --rebuild
     error: a 'x86_64-linux' with features {} is required to build '/nix/store/rssywnbyfhqnz8c8ziaand0jp6hwsfka-mumble-overlay-1.5.735.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}
     ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay --rebuild --max-jobs 0
    

Expected behavior

The build should restart on the remote builder. I can sort of force using the remote builder with --max-jobs 0, but not really as it then tries to use the remote builder, but forgets to tell it to rebuild, so the build finishes immediately.

That might mean that there are really two bugs here.

nix --version output

❯ nix --version
nix (Lix, like Nix) 2.92.0
System type: aarch64-darwin
Additional system types: aarch64-darwin, x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/dwt/.config/nix/nix.conf:/Users/dwt/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/vs6s56c7crvj75fmmyrc4f1wh4q7pbns-lix-2.92.0/share
## Describe the bug When building a package using a remote builder `--rebuild` ignores the remote builder. ## Steps To Reproduce 1. I'm on a Mac with a remote builder to build linux stuff. [I am on this setup](https://github.com/dwt/nix-darwin-config), that means I use the [the nix-rosetta-builder](https://github.com/cpick/nix-rosetta-builder) 2. ```shell ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay --rebuild error: a 'x86_64-linux' with features {} is required to build '/nix/store/rssywnbyfhqnz8c8ziaand0jp6hwsfka-mumble-overlay-1.5.735.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test} ❯ nix build .#legacyPackages.x86_64-linux.mumble_overlay --rebuild --max-jobs 0 ``` ## Expected behavior The build should restart on the remote builder. I can sort of force using the remote builder with `--max-jobs 0`, but not really as it then tries to use the remote builder, but forgets to tell it to rebuild, so the build finishes immediately. That might mean that there are really two bugs here. ## `nix --version` output ```shell ❯ nix --version nix (Lix, like Nix) 2.92.0 System type: aarch64-darwin Additional system types: aarch64-darwin, x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/dwt/.config/nix/nix.conf:/Users/dwt/.nix-profile/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/vs6s56c7crvj75fmmyrc4f1wh4q7pbns-lix-2.92.0/share ```
Author
[There is an issue in the nix repository that might be the same problem](https://github.com/NixOS/nix/issues/10451#issuecomment-2685168746)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#714
No description provided.