summaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
commitd84b462a711ce95593ff05a7581e722562c3835a (patch)
tree41e5af455fea925b2680b29718b24ba2876e803a /shell.nix
downloadbar-d84b462a711ce95593ff05a7581e722562c3835a.tar
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.gz
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.bz2
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.xz
bar-d84b462a711ce95593ff05a7581e722562c3835a.zip
Implement old bar.hs
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 })