cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.47k stars 252 forks source link

c: fix an issue where the wrong c/cpp compiler could be set up #1162

Closed sandydoo closed 1 week ago

sandydoo commented 1 week ago

We already add stdenv, which contains all the compilers and sets up the CC and CXX env variables for each platform. Adding clang or gcc on top can result in the wrong compilers being set up for the current platform, e.g. gcc on macOS. We saw this happen when building native extensions in ruby.

I imagine this broke once we switched back to nix develop. Also, this might fix the macos ruby tests 👀

Fixes #966. Fixes #965.