summaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..b6595aa
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,18 @@
1{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
2
3let
4 inherit (nixpkgs) pkgs;
5
6 haskellPackages = if compiler == "default"
7 then pkgs.haskellPackages
8 else pkgs.haskell.packages.${compiler};
9
10 drv = haskellPackages.callPackage ./bar.nix {};
11in
12 pkgs.stdenv.lib.overrideDerivation drv.env (oldAttrs: {
13 buildInputs = oldAttrs.buildInputs ++ (with pkgs; [ cabal2nix gup haskellPackages.hlint haskellPackages.stack haskellPackages.yesod-bin ]);
14 shellHook = ''
15 ${oldAttrs.shellHook}
16 export PROMPT_INFO="${oldAttrs.name}"
17 '';
18 })