Add nix config to stack.yaml#3435
Conversation
The missing `zlib` dependency made stack build fail on NixOS
|
I don't have any way to test that this works and I won't notice if it ever breaks, do we have anyone using Nix who could take a look at this? |
|
I guess it could be possible to add a test in CI: it is enough to install OTOH, this is not breaking (as Note that this is also the reason why |
|
I can confirm that this patch fixes PureScript compilation on NixOS. @kritzcreek Is it possible to make patch release of PureScript compiler which incorporates this change and additional fixes related to #3372 so we can finally fix purs package for NixOs (NixOS/nixpkgs#42833)? |
|
If it is possible, I think it would make more sense to put a stack.yaml diff inside nixpkgs, and have the nix packaging tools apply that diff before building, i.e. have nixpkgs take responsibility for making sure purescript builds on nix. As @kritzcreek points out, none of the maintainers (as far as I am aware) use Nix, but merging this change would in effect mean taking responsibility for continuing to have the compiler build on Nix with just this stack.yaml, and I'm not sure that this is a good idea. Also, our CI is brittle and slow enough as it is, so I don't think I can get on board with adding a new job to test it on Nix (especially since the maintainers don't have the Nix knowledge to be able to debug failures easily). |
|
@hdgarrood adding the patch only in
Some clarifications about your points:
This sounds like a CI process problem, and that should be orthogonal to the usefulness of the patch.
I don't think so: if the build on NixOS is going to break again then the affected users will notice and PR the fix (as it's happening here) - this is how open source works, no one is asking the maintainers to start caring about NixOS, this should effectively be a no-op patch from the maintainership point of view. The baseline is: |
|
@hdgarrood I understand that you want to keep PureScript compiler build process to be not dependent on any specific OS. |
|
This does not work on non The error I got when building with |
|
@coot I just run From a quick googling it looks like you might be encountering a transient stack issue, and e.g. running this should help: |
|
Thanks, it does work after removing the cache. |
|
Great, thanks @kritzcreek |
|
@kritzcreek You can ping me as well. Thanks! |
|
Thank you @kritzcreek! |
The missing
zlibdependency made stack build fail on NixOS