diff options
author | Mathieu Boespflug <m@tweag.io> | 2016-06-05 00:30:37 +0200 |
---|---|---|
committer | Mathieu Boespflug <m@tweag.io> | 2016-06-13 00:55:33 +0200 |
commit | e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4 (patch) | |
tree | 9952bae1eb035b8c10eb67a0065ef15e0b8ce170 /doc | |
parent | 292a8892a091905500105be931d8ddb4bc3cd68c (diff) | |
download | nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar.gz nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar.bz2 nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar.lz nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar.xz nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.tar.zst nixlib-e6aa4e0ccb6b169eaa4ff5ff28f332e078c018b4.zip |
doc: Document how to set custom GHC version in haskell.lib.buildStackProject.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/haskell.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/languages-frameworks/haskell.md b/doc/languages-frameworks/haskell.md index e066ad110bec..cdabcbe0379d 100644 --- a/doc/languages-frameworks/haskell.md +++ b/doc/languages-frameworks/haskell.md @@ -378,6 +378,23 @@ special options turned on: buildInputs = [ R zeromq zlib ]; } +You can select a particular GHC version to compile with by setting the +`ghc` attribute as an argument to `buildStackProject`. Better yet, let +Stack choose what GHC version it wants based on the snapshot specified +in `stack.yaml` (only works with Stack >= 1.1.3): + + {nixpkgs ? import <nixpkgs> { }, ghc ? nixpkgs.ghc} + + with nixpkgs; + + let R = pkgs.R.override { enableStrictBarrier = true; }; + in + haskell.lib.buildStackProject { + name = "HaskellR"; + buildInputs = [ R zeromq zlib ]; + inherit ghc; + } + [stack-nix-doc]: http://docs.haskellstack.org/en/stable/nix_integration.html ### How to create ad hoc environments for `nix-shell` |