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

lib: Include darwin in isUnix #27089

Merged
merged 1 commit into from
Jul 3, 2017
Merged

lib: Include darwin in isUnix #27089

merged 1 commit into from
Jul 3, 2017

Conversation

corngood
Copy link
Contributor

@corngood corngood commented Jul 3, 2017

Motivation for this change

This should fix darwin package evaluation, which was broken by 4ac1901

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@corngood, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Ericson2314 to be a potential reviewer.

@corngood corngood mentioned this pull request Jul 3, 2017
7 tasks
@corngood
Copy link
Contributor Author

corngood commented Jul 3, 2017

See #26021

@vcunat vcunat merged commit bb3c8a1 into NixOS:staging Jul 3, 2017
@vcunat
Copy link
Member

vcunat commented Jul 3, 2017

Seems OK at a superficial look & quick testing. Let me not keep Hydra waiting.

@corngood
Copy link
Contributor Author

corngood commented Jul 3, 2017

I don't have a darwin machine to test on, but

before:

➜  nixpkgs git:(master) nix-instantiate -A readline --argstr system x86_64-darwin
error: Package ‘readline-6.3p08’ in ‘/cygdrive/c/Users/David/git/nixpkgs/pkgs/development/libraries/readline/6.3.nix:38’ is not supported on ‘x86_64-darwin’, refusing to evaluate.

after:

➜  nixpkgs git:(darwin-fix) nix-instantiate -A readline --argstr system x86_64-darwin
warning: you did not specify ‘--add-root’; the result might be removed by the garbage collector
/nix/store/v2irshgcwdh3gf8hj60ahkz1z80h8vns-readline-6.3p08.drv

@Ericson2314
Copy link
Member

https://github.com/NixOS/nixpkgs/blob/master/lib/tests/systems.nix this should have blown up a long time ago and caught this. @nbp perhaps I used your module test stuff incorrectly?

@Ericson2314
Copy link
Member

@nbp
Copy link
Member

nbp commented Jul 3, 2017

@Ericson2314 Are you sure the runTests function used in misc.nix and systems.nix tests are actually running anything? I think you might be using, and that the nix-instantiate command does not do what you expect.

runTests = driver:

It might be worth to add an expected failing test, to check that the runTests does catch simple failures.

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.

None yet

5 participants