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

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