Specify the GHC version in one place.

There's no reason to duplicate this, and it's easy to let them get out of sync.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10502
GitOrigin-RevId: ab52a8ee636bc2abce817985971e43be0e37a874
This commit is contained in:
Samir Talwar 2023-11-22 10:31:57 +01:00 committed by hasura-bot
parent 0373beaed0
commit 73e413e1ee
2 changed files with 10 additions and 5 deletions

View File

@ -19,7 +19,7 @@ in
{
haskell = super.haskell // {
compiler = super.haskell.compiler // {
${ghcName} = (versions.ensureVersion super.haskell.compiler.${ghcName}).overrideAttrs (oldAttrs: {
${ghcName} = super.haskell.compiler.${ghcName}.overrideAttrs (oldAttrs: {
patches = (if oldAttrs ? patches then oldAttrs.patches else [ ]) ++ ghcPatches;
});
};

View File

@ -2,12 +2,17 @@
This guide explains how to set up the graphql-engine server for development on your own machine and how to contribute.
## Pre-requisites
## Prerequisites
- [GHC](https://www.haskell.org/ghc/) 9.4.5 and [cabal-install](https://cabal.readthedocs.io/en/latest/)
- There are various ways these can be installed, but [ghcup](https://www.haskell.org/ghcup/) is a good choice if youre not sure.
The following tools are required. Versions are typically specified in _VERSIONS.json_.
- [GHC](https://www.haskell.org/ghc/)
- There are various ways this can be installed, but [ghcup](https://www.haskell.org/ghcup/) is a good choice if youre not sure.
- If you are not using `ghcup`, make sure you install the GHC version specified in _.ghcversion_.
- [Cabal](https://cabal.readthedocs.io/en/latest/)
- if you use `ghcup`, you can get Cabal from there too.
- There are few system packages required like `libpq-dev`, `libssl-dev`, etc. The best place to get the entire list is from the [Dockerfile](../packaging/graphql-engine-base/ubuntu.dockerfile)
- Additional Haskell tools (expected versions can be found in _VERSIONS.json_):
- Additional Haskell tools:
- [HLint](https://github.com/ndmitchell/hlint), for linting Haskell code
- [Ormolu](https://github.com/tweag/ormolu), for formatting Haskell code
- [Docker](https://www.docker.com/get-started/)