Commit Graph

5 Commits

Author SHA1 Message Date
Samir Talwar
585f35f271 Nix: Upgrade to GHC 9.2.4.
What fun!

Tested on x86_64 Linux and aarch64 macOS. I had to add a bunch of Haskell package overrides specifically for macOS on aarch64, but I made them apply to all macOS users because, well, it's just a couple of us right now and we're both using aarch64.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6239
GitOrigin-RevId: 4e5a20d21eb24c736e8663de3f1e05ce5705284a
2022-10-06 21:05:34 +00:00
Samir Talwar
b52dc90663 Nix: Get the Nix shell working on macOS/aarch64.
Improvements to the Nix configuration so that macOS is supported.

Microsoft SQL Server is still not supported (yet; I have something in mind there), but the rest works. You can still use Homebrew to install the SQL Server drivers.

I had to make the following changes:

* I updated nixpkgs, because it's been a while.

* I made `ODBCINSTINI` optional so that it's not loaded on macOS, as it depends on `msodbcsql17`, which is broken on macOS.

* I upgraded OpenSSL.

* I set `DYLD_LIBRARY_PATH` on macOS so GHC finds OpenSSL; otherwise, it uses the wrong version of `libcrypto`, and fails with a fun error:

  > WARNING: ghc is loading libcrypto in an unsafe way

* I patched GHC to fix compilation on macOS (copied from https://github.com/NixOS/nixpkgs/pull/149942).

To test this out, you can run `nix develop` (or install [direnv][] and add `use flake` to _.envrc.local_), and then try building HGE in the shell provided.

Fair warning: GHC needs to be built, and takes _aaages_ the first time. If this becomes useful to others, we can set up a shared cache.

[direnv]: https://direnv.net/

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5989
GitOrigin-RevId: 7130738d47709c37778b31c134061758ce23e959
2022-09-30 19:17:14 +00:00
Samir Talwar
f1ff3ceb76 Tidy up the .envrc file a little.
* Improve the error messages.
* Use Bash syntax rather than sh syntax where possible.
* Fix shellcheck warnings.
* Return early to reduce indentation.
* Use the `use` function.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5868
GitOrigin-RevId: 78d76a6eba5beccabb18c39a9b16ef59b936bacb
2022-09-14 20:40:10 +00:00
Daniel Harvey
d41a94b959 tooling: provide optional use_ghcup in .envrc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4774
GitOrigin-RevId: 9b0877543dd23f2b5e2782f793ae927a78f1986e
2022-06-22 13:14:30 +00:00
Daniel Harvey
921ada70e9 tooling: Opt-in shared tooling
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4753
GitOrigin-RevId: 3fc3324e584210e57e5acb9d8361d4e5b3caf26a
2022-06-16 17:12:35 +00:00