servant/nix/shell.nix
Gaël Deest 910a3ae7ec Upgrade GHCJS to 8.6
This allows us to deprecate GHCJS 8.4 (which makes sense, as vanilla GHC
< 8.6 is already deprecated).

We re-use GHCJS from reflex-platform, which unfortunately isn't
up-to-date with latest GHC and is only 8.6. The benefit of using
reflex-platform is that it provides nix expressions for GHCJS + a binary
nix cache.

reflex-platform patches text to use a JS-String based internal
representation for performance reasons, so we provide a few haskell
dependencies from reflex-platform as well:

- hashable
- attoparsec

As those rely on text's internal representation but have been patched
for reflex-platform.
2021-10-10 22:53:26 +02:00

21 lines
632 B
Nix

{ compiler ? "ghc8104"
, tutorial ? false
, pkgs ? import ./nixpkgs.nix
}:
with pkgs;
let
ghc = haskell.packages.${compiler}.ghcWithPackages (_: []);
docstuffs = python3.withPackages (ps: with ps; [ recommonmark sphinx sphinx_rtd_theme ]);
in
stdenv.mkDerivation {
name = "servant-dev";
buildInputs = [ ghc zlib python3 wget cabal-install postgresql openssl stack haskellPackages.hspec-discover ]
++ (if tutorial then [docstuffs postgresql] else []);
shellHook = ''
eval $(grep export ${ghc}/bin/ghc)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${zlib}/lib";
'';
}