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