diff options
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6ed4ca8 --- /dev/null +++ b/shell.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | ||
2 | , haskellPackages ? (import ./default.nix {}).haskellPackages | ||
3 | }: | ||
4 | |||
5 | let | ||
6 | trivstreamPackages = builtins.attrValues (import ./default.nix {}); | ||
7 | ghc = haskellPackages.ghcWithPackages | ||
8 | (ps: trivstreamPackages ++ utilities ps ++ testDeps ps); | ||
9 | utilities = (ps: with ps; [ hlint cabal2nix ]); | ||
10 | testDeps = (ps: with ps; [ ]); | ||
11 | in | ||
12 | pkgs.stdenv.mkDerivation rec { | ||
13 | name = "trivstream-env"; | ||
14 | buildInputs = [ ghc ]; | ||
15 | shellHook = '' | ||
16 | eval $(egrep ^export ${ghc}/bin/ghc) | ||
17 | export PROMPT_INFO="${name}" | ||
18 | ''; | ||
19 | } | ||