-
Notifications
You must be signed in to change notification settings - Fork 296
/
Copy pathflake.nix
61 lines (57 loc) · 1.87 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description =
"Persistence interface for Haskell allowing multiple storage methods.";
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, haskellNix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
overlays = [
haskellNix.overlay
(final: prev: {
project = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc966";
projectFileName = "cabal.project";
shell = {
tools = {
cabal = "latest";
cabal-fmt = "latest";
cabal-install = "latest";
fourmolu = "latest";
ghcid = "latest";
haskell-language-server = "latest";
};
buildInputs = with pkgs; [ mariadb postgresql redis sqlite ];
};
modules = [{
packages."mysql".components.library = with pkgs; {
configureFlags = [
"--with-mysql_config=${mariadb-connector-c.dev}/bin/mysql_config"
];
includes = [ openssl zlib ];
libs = [ openssl zlib ];
};
}];
};
})
];
flake = pkgs.project.flake { };
in flake);
nixConfig = {
extra-substituters = [
"https://cache.nixos.org/"
"https://cache.iog.io" # use GHC binary cache.
];
extra-trusted-public-keys =
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
allow-import-from-derivation = "true";
};
}