Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Darwin native stdenv #107995

Closed
wants to merge 5 commits into from

Conversation

matthewbauer
Copy link
Member

Since we are not quite ready on #105026, I wanted to look into getting native darwin stdenv working again. There were quite a few evaluation errors which needed to be fixed.

In testing, I installed coreutils-8.32 and bash-5.1 in /usr/local.

When version is null, we just leave out the trailing - part. This
fixes an issue where null version caused derivations to hit an
evaluation error.
This should work the same as in linux. We just need a prefix where the
toolchain resides. By default, this is /usr on Darwin / macOS with
XCode Command Line Tools.
The bash in /bin/bash is too old (3.2.57) to run setup.sh correctly.
Native tools users need at least Bash 4 to use Nixpkgs.
In native stdenv, stdenv.cc may be set, but stdenv.cc.cc is not. So we
need to verify this to avoid an evaluation error.
/usr/local is usually going to be newer & more compatible with the
system than /usr & /. For instance, macOS / Darwin comes with
/bin/chmod which doesn’t understand ‘--’ flags. So, give /usr/local
precedence so that the user can install the GNU versions of these
utils themselves.
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 10.rebuild-linux: 0 labels Dec 30, 2020
@stale
Copy link

stale bot commented Jun 28, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 28, 2021
@domenkozar
Copy link
Member

outdated

@domenkozar domenkozar closed this Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants