doc: Fix command for distributed builds

We also need to build impurely or the <nixpkgs> lookup will not work.
This commit is contained in:
Janne Heß 2021-12-10 12:58:12 +01:00
parent c7b66caaca
commit 4194b68250
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -53,8 +53,8 @@ example, the following command allows you to build a derivation for
$ uname
Linux
$ nix build \
'(with import <nixpkgs> { system = "x86_64-darwin"; }; runCommand "foo" {} "uname > $out")' \
$ nix build --impure \
--expr '(with import <nixpkgs> { system = "x86_64-darwin"; }; runCommand "foo" {} "uname > $out")' \
--builders 'ssh://mac x86_64-darwin'
[1/0/1 built, 0.0 MiB DL] building foo on ssh://mac