summaryrefslogtreecommitdiff
path: root/stack.nix
blob: 98b31c1f5a92627da98a522bff10d145038fd06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ ghc, nixpkgs ? (import <nixos> {}) }:

let
  inherit (nixpkgs) haskell pkgs;
  haskellPackages = if ghc.version == pkgs.haskellPackages.ghc.version then pkgs.haskellPackages else pkgs.haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}";
in haskell.lib.buildStackProject {
  inherit ghc;
  name = "stackenv";
  buildInputs = (with pkgs;
    [ postgresql zlib
    ]) ++ (with haskellPackages;
    [ yesod-bin
    ]);
}