NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.49k stars 1.5k forks source link

Nix tries remote builder when `--offline` #11385

Open roberth opened 1 month ago

roberth commented 1 month ago

Describe the bug

nix build --offline does not substitute, but does contact remote builders, even if that's not necessary.

Steps To Reproduce

  1. Have a remote builder that can build the same things as the local builder (ie system/extra-platforms)
  2. nix build --offline
  3. Observe that Nix sends work to the remote builder

Expected behavior

Remote builders are ignored.

Ideally, local VMs are still used. Currently Nix does not know which builders remote builders are actually local.

nix-env --version output

2.25pre

Additional context

Priorities

Add :+1: to issues you find important.

bryanhonof commented 3 weeks ago

Ideally, local VMs are still used. Currently Nix does not know which builders remote builders are actually local.

Can't we check the URI? E.g. if the address is something like localhost?