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

Nix doesn't work on Windows #3600

Closed
domenkozar opened this Issue Nov 23, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@domenkozar
Contributor

domenkozar commented Nov 23, 2017

Given stack.yaml:

...
nix:
  enable: true
...

The project can't be build on Windows, since stack will try to use Nix also there. While it's possible to use Nix via cygwin or WSL, that's rarely done.

I suggest we disable Nix on Windows (and optionally support forcing it if really wanted).

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Nov 23, 2017

I hear that nix on wsl can work - https://www.tweag.io/posts/2017-11-10-nix-on-wsl.html - though noidea if that would work with stack.

IMHO it'd make sense to just not have enable: true. There are a few other stack.yaml options that allow you to break builds for users with configurations different than yours, for example, extra-lib-dirs. Not saying this is ideal, but it's the way things are, currently. Definitely some interesting tradeoffs between configurability and universality.

@domenkozar

This comment has been minimized.

Contributor

domenkozar commented Nov 23, 2017

@mgsloan we do default to false currently, but that trips people since they forget to pass --nix and stack doesn't warn about it. Results into very obscure errors. I'd like to make default configuration sane by enabling Nix, but Windows prevents that.

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Nov 23, 2017

I see! This is another potential usecase for #3369

mgsloan added a commit that referenced this issue Jan 31, 2018

mgsloan added a commit that referenced this issue Jan 31, 2018

mgsloan added a commit that referenced this issue Feb 1, 2018

mgsloan added a commit that referenced this issue Feb 1, 2018

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 1, 2018

I've opened a PR, #3833 which always overrides with enable: false on windows.

Previously when I suggested that #3369 be implemented for this, I didn't properly consider that when using WSL it will be built as an ELF binary that thinks it's targeting linux.

mgsloan added a commit that referenced this issue Feb 1, 2018

mgsloan added a commit that referenced this issue Feb 1, 2018

mgsloan added a commit that referenced this issue Feb 1, 2018

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 1, 2018

Fixed! (well, probably) Confirmation of expected behavior on windows is appreciated 👍

@mgsloan mgsloan closed this Feb 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment