From dc29146b787289d9487406ea8f25028871a75b7f Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 9 Sep 2020 22:27:03 -0400 Subject: [PATCH] Daily blog update --- shell.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..75df335 --- /dev/null +++ b/shell.nix @@ -0,0 +1,32 @@ +# https://wizzup.github.io/posts/nix-shell-haskell-invocation/ +# shell.nix for nix-shell (haskell) + +{ pkgs ? import {} }: + +let + ghc = pkgs.haskellPackages.ghcWithHoogle (self: with self; [ + hspec + split + hakyll + random + neat-interpolation + ]); +in +pkgs.mkShell { + name = "haskell-shell"; + buildInputs = (with pkgs.haskellPackages; [ + ghc + hlint + + stack + ghcjs-dom + cabal-install + ]) ++ (with pkgs; [ + nano + ]); + + shellHook = '' + eval "$(egrep ^export "$(type -p ghc)")" + export PS1="\[\033[1;32m\][ns-hs:\w]\n$ \[\033[0m\]" + ''; +}