aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
blob: 9c4dbfebf42f94eed59945915952c8bfb76c601a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ pkgs ? (import <nixpkgs> {})
, compiler ? "ghc7102"
}:

let
  ghc = pkgs.haskell.packages.${compiler}.ghcWithHoogle (ps: with ps; [
    cabal-install hlint cabal2nix
  ] ++ (builtins.attrValues (import ./default.nix {})));
in
pkgs.stdenv.mkDerivation rec {
  name = "thermoprint-env";
  buildInputs = [ ghc ];
  shellHook = ''
    eval $(egrep ^export ${ghc}/bin/ghc)
    export PROMPT_INFO="${name}"
  '';
}