on iko/ghcjs-patch-master help sign in
Add `compiler-nix-name` arg to stackProject (#897)
commit5f80ca910b0c34562f76aa4dcfc2464840b2d0ef authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateWed 28 Oct 2020, 22:11 (6 years ago) parentd32a3b2
3 files changed+11−5
changelog.md+4 docs/tutorials/getting-started.md+2−2 overlays/haskell.nix+5−3
changelog.md+4
@@ -1,6 +1,10 @@
11This file contains a summary of changes to Haskell.nix and `nix-tools`
22that will impact users.
33
4+## Oct 28, 2020
5+* Passing `compiler-nix-name` to project functions for `stack.yaml`
6+ based projects now overrides the compiler used (was ignored before).
7+
48## Sep 8, 2020
59* Added the ability to generate coverage reports for packages and
610 projects.
docs/tutorials/getting-started.md+2−2
@@ -51,8 +51,8 @@ Add `default.nix`:
5151 name = "haskell-nix-project";
5252 src = ./.;
5353 };
54− # For `cabal.project` based projects specify the GHC version to use.
55− compiler-nix-name = "ghc884"; # Not used for `stack.yaml` based projects.
54+ # Specify the GHC version to use.
55+ compiler-nix-name = "ghc8102"; # Not required for `stack.yaml` based projects.
5656}
5757```
5858
overlays/haskell.nix+5−3
@@ -567,9 +567,11 @@ final: prev: {
567567 in let pkg-set = mkStackPkgSet
568568 { stack-pkgs = importAndFilterProject callProjectResults;
569569 pkg-def-extras = (args.pkg-def-extras or []);
570− modules = final.lib.singleton (mkCacheModule cache)
571− ++ (args.modules or [])
572− ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; };
570+ modules = final.lib.singleton (mkCacheModule cache)
571+ ++ (args.modules or [])
572+ ++ final.lib.optional (args ? ghc) { ghc.package = args.ghc; }
573+ ++ final.lib.optional (args ? compiler-nix-name)
574+ { compiler.nix-name = final.lib.mkForce args.compiler-nix-name; };
573575 };
574576
575577 project = addProjectAndPackageAttrs {