2017-12-02 01:12:47 +01:00
|
|
|
{ pkgs ? import <nixpkgs> {}
|
2018-03-27 18:30:25 +02:00
|
|
|
, compiler ? "ghc821"
|
2017-12-02 01:12:47 +01:00
|
|
|
, tutorial ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
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";
|
2017-12-27 01:33:12 +01:00
|
|
|
buildInputs = [ ghc zlib python3 wget ]
|
2017-12-02 01:12:47 +01:00
|
|
|
++ (if tutorial then [docstuffs postgresql] else []);
|
|
|
|
shellHook = ''
|
|
|
|
eval $(grep export ${ghc}/bin/ghc)
|
|
|
|
export LD_LIBRARY_PATH="${zlib}/lib";
|
|
|
|
'';
|
|
|
|
}
|