Skip to content

Instantly share code, notes, and snippets.

@thoferon
Created February 4, 2020 06:19
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/e6ba5bb1da1027ff0abb90dbe5495bf3 to your computer and use it in GitHub Desktop.
Save thoferon/e6ba5bb1da1027ff0abb90dbe5495bf3 to your computer and use it in GitHub Desktop.
haskell-nix-setup
let
nixpkgs = import ./nixpkgs.nix {};
inherit (nixpkgs) pkgs;
haskell = import ./haskell { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
haskell.cabal-install
haskell.ghc
haskell.ghcide
haskell.hlint
# Other dependencies such as postgresql-12_x would go here.
];
# Use the libraries from the derivation created by ghcWithHoogle.
NIX_GHC_LIBDIR = "${haskell.ghc}/lib/ghc-${haskell.ghc.version}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment