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

let
  thermoprintPackages = builtins.attrValues (import ./default.nix {});
  ghc = haskellPackages.ghcWithPackages
    (ps: utilities ps ++ testDeps ps);
  utilities = (ps: with ps; [ hlint cabal2nix ]);
  testDeps = (ps: with ps; [ temporary hspec ]);
in
pkgs.stdenv.mkDerivation rec {
  name = "thermoprint-env";
  buildInputs = (with pkgs; [ gup ]) ++ [ ghc ];
  shellHook = ''
    eval $(egrep ^export ${ghc}/bin/ghc)
    export PROMPT_INFO="${name}"
  '';
}