summaryrefslogtreecommitdiff
path: root/shell.nix
blob: 6ed4ca82f317bbb8836a3c0c880e28e69b726aac (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
  trivstreamPackages = builtins.attrValues (import ./default.nix {});
  ghc = haskellPackages.ghcWithPackages
    (ps: trivstreamPackages ++ utilities ps ++ testDeps ps);
  utilities = (ps: with ps; [ hlint cabal2nix ]);
  testDeps = (ps: with ps; [ ]);
in
pkgs.stdenv.mkDerivation rec {
  name = "trivstream-env";
  buildInputs = [ ghc ];
  shellHook = ''
    eval $(egrep ^export ${ghc}/bin/ghc)
    export PROMPT_INFO="${name}"
  '';
}