tweag / opam-nix

Turn opam-based OCaml projects into Nix derivations
MIT License
111 stars 33 forks source link

`nix flake show` on this repo doesn't work on Darwin #8

Closed rgrinberg closed 2 years ago

rgrinberg commented 2 years ago

Describe the bug nix flake show on this repository fails on darwin

To Reproduce

[1] rgrinberg@rgrinberg-16> nix flake show github:tweag/opam-nix                                                                                                                                 ~/github/tweag/opam-nix
github:tweag/opam-nix/ab96c52560432f5e1d36cbb92b2dd088c3bbea4a
├───aux: unknown
├───checks
│   ├───aarch64-darwin
error: builder for '/nix/store/mfzs64lknk5iv1lspdr9j59cgf544sjd-readme-check.drv' failed with exit code 1;
       last 2 log lines:
       >
       > ErroSysError~executing '/nix/store/7aqi1cxp0q594zl71c8fpkv7zjnzf6rw-bash-5.1-p12/bin/bash': No such file or directory
       For full logs, run 'nix log /nix/store/mfzs64lknk5iv1lspdr9j59cgf544sjd-readme-check.drv'.
(use '--show-trace' to show detailed location information)

Expected behavior I expected the command to succeed

Environment

Additional context n/a

balsoft commented 2 years ago

I think nix flake {check,show} are broken anyways since you need to build things for multiple platforms, and that's not possible on many setups. However, this failure looks interesting and I'll look into it.

balsoft commented 2 years ago

The error is actually due to you having an x86_64-darwin machine, and the bash in question being for aarch64-darwin. I think this is an issue with the default Nix config which marks your machine as being able to build aarch64-darwin derivations, when in fact it can't.

However, nix flake show won't work regardless because it tries to use IFD for foreign platforms, which would never work unless you have remote builders. Sorry, WONTFIX