NixOS / NixOS/nix.dev

Cross-Compilation example doesn't work on Darwin

Open
#1,092 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
4k
Forks
339
Avg merge
2d 11h
Merged PRs (30d)
7

Description

https://github.com/NixOS/nix.dev/blob/baf5f82e95f8e874d6094b5410b8d67480981b37/source/tutorials/cross-compilation.md?plain=1#L205

I'm not quite sure what the exact reason is, but in this example both paths do not work on Darwin.

Running them gives these two error messages:

❯  nix-build -A windows
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: i686 Linux package set can only be used with the x86 family.

~/C/P/nix/tutorial/cross-compilation  ⛵️ mkk-itsc-dev (default)
❯  nix-build -A rpi
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Don't know how to run armv6l-unknown-linux-gnueabihf executables.

Is this something that is entirely not possible on Darwin, or is there just some additional configuration needed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with source/tutorials/cross-compilation.md around line 205 and reproduce the nix-build -A windows and nix-build -A rpi commands on Darwin. Determine whether the examples require additional configuration or cannot work on Darwin, then update the tutorial so its instructions and expected outcome are accurate.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.