forked from mirrors/nixpkgs
doc: Document how to set custom GHC version in haskell.lib.buildStackProject.
This commit is contained in:
parent
292a8892a0
commit
e6aa4e0ccb
|
@ -378,6 +378,23 @@ special options turned on:
|
||||||
buildInputs = [ R zeromq zlib ];
|
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
|
[stack-nix-doc]: http://docs.haskellstack.org/en/stable/nix_integration.html
|
||||||
|
|
||||||
### How to create ad hoc environments for `nix-shell`
|
### How to create ad hoc environments for `nix-shell`
|
||||||
|
|
Loading…
Reference in a new issue