nix-pills
nix-pills copied to clipboard
Pill 7.5 on macOS Fails
System: macOS 10.12.6 nix-repl version: 1.11.15
Problem:
When following pill 7.5 An error is thrown stating that clang cannot be found. Here. you can see what I entered into my terminal. simple.c
and simple_builder.sh
are copied directly from the webpage.
Solution:
This fixes issue I was having, but it raises a concern for me. The idea is that nix creates a fully reproducible environment, but looks like on Linux gcc is gcc while on OS X gcc is clang. That looks to me that current nix behavior is somewhat breaking this.
Looks like all examples in chapter 8 are broken as well.
I echo @takeda's concern as well.
I'm just getting started on Nix, and used pill 7.5 (Packaging a simple C program
) to get my feet wet in creating custom packages. I was encouraged by @copumpkin's presentation on the state of darwin-nix (re: Nix on Darwin – History, challenges, and where it's going by Dan Peebles
).
But apparently the derivations that are known to work on Linux's version of Nix may break when run on darwin-nix.
Any plans of fixing these issues?
/cc @copumpkin
I can confirm that the workarounds proposed by @joshuaks do fix the problem.
It looks like @joshuaks has already proposed PR #42 to address this. But I don't like the ugliness of the solution; if
conditions in derivations to handle platform-specific differences is just kludgy.
It seems that @LnL7 has an alternate theory the the problem is possibly with binutils. I can't comment on that intelligently.
Any help to make these pills work on darwin-nix would be greatly appreciated.