Skip to content

Instantly share code, notes, and snippets.

@thoferon
Created February 4, 2020 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thoferon/27285ce82277f57e026830e96e547b32 to your computer and use it in GitHub Desktop.
Save thoferon/27285ce82277f57e026830e96e547b32 to your computer and use it in GitHub Desktop.
haskell-nix-setup
{ pkgs ? import ../nixpkgs {} }:
let
inherit (pkgs.haskell) ghcVersion;
hsPkgs = pkgs.haskell.packages.${ghcVersion};
pkgDrv = hsPkgs.callCabal2nix "demo" ../.. {};
haskellDeps = pkgDrv.getBuildInputs.haskellBuildInputs;
ghc = hsPkgs.ghcWithHoogle (_: haskellDeps);
in
{
inherit ghc;
inherit (hsPkgs) cabal-install ghcide hlint;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment