aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
blob: 2d7864a2276ec717b71a9e4c178042c4979bc073 (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}.ghcWithPackages (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}"
  '';
}