Hi Peter,
> 3) The ghc argument in shell.nix allows me to specify different
> versions of GHC so I can test with multiple versions. (I'd love
> some feedback on how to make this more flexible.)
I use the following "shell.nix" to switch between compiler versions:
{ compiler ? "ghc7101" }:
with (import <nixpkgs> {}).pkgs;
let
ghc = haskell.packages.${compiler}.ghcWithPackages
(pkgs: with pkgs; [ aeson lens monad-par ]);
in
stdenv.mkDerivation {
name = "my-haskell-env-0";
buildInputs = [ ghc ];
shellHook = "eval $(grep export ${ghc}/bin/ghc)";
}
Now run "nix-shell --argstr compiler ghc784" to select a compiler other
than the default.
I hope this helps,
Peter
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev