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

Make isDarwin check more robust #156

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Make isDarwin check more robust #156

merged 1 commit into from
Feb 20, 2023

Conversation

mputz86
Copy link
Contributor

@mputz86 mputz86 commented Feb 20, 2023

The provided isDarwin check failed on my system because environment attr does not exist in options.

I assume that this happens because my setup is done with divnix/hive (https://github.com/divnix/hive), but I am not an expert :) (I see this PR as an opportunity to learn :); so close if I naivly do something totally wrong :) ).

Nevertheless, it is probably not a bad idea to only assume the most essential attrs to be present.

Copy link
Owner

@ryantm ryantm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@ryantm ryantm merged commit 53da86e into ryantm:main Feb 20, 2023
@n8henrie
Copy link
Collaborator

n8henrie commented Feb 20, 2023

I had wondered about this approach but hadn't gotten around to investigating -- why not use stdenv.isDarwin?

@mputz86
Copy link
Contributor Author

mputz86 commented Feb 20, 2023

I had wondered about this approach but hadn't gotten around to investigating -- why not use stdenv.isDarwin?

There is some reasoning about the usage described here #79 (comment) :) .

@n8henrie
Copy link
Collaborator

That's what I figured -- the goal is to check for isNixDarwin, not isDarwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants