{ ghc, nixpkgs ? import ./nixpkgs.nix {} }:

let
  haskellPackages = import ./stackage.nix { inherit nixpkgs; };
  inherit (nixpkgs {}) pkgs;
in pkgs.haskell.lib.buildStackProject {
  inherit ghc;
  inherit (haskellPackages) stack;
  name = "stackenv";
  buildInputs = (with pkgs;
    [ xorg.libX11 xorg.libXrandr xorg.libXinerama xorg.libXScrnSaver xorg.libXext xorg.libXft
      cairo
      glib
    ]) ++ (with haskellPackages;
    [ 
    ]);
}