forked from circuithub/rel8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (55 loc) · 1.62 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
62
63
64
{
description = "rel8";
nixConfig = {
extra-substituters = [
"https://rel8.cachix.org"
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"rel8.cachix.org-1:C/hVFTPHIOp7S/jRleuLL0Cg/dE0dQzEuEB5szaszTc="
];
};
inputs = {
flake-utils.url = github:numtide/flake-utils;
haskellNix.url = github:input-output-hk/haskell.nix;
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
};
outputs = { self, nixpkgs, flake-utils, haskellNix }:
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
let
pkgs = import nixpkgs {
inherit system;
inherit (haskellNix) config;
overlays = [ haskellNix.overlay ];
};
rel8 = pkgs.haskell-nix.project {
compiler-nix-name = "ghc982";
cabalProjectLocal = builtins.readFile ./cabal.project.haskell-nix;
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "rel8";
src = ./.;
};
modules = [
{
packages.rel8 = {
preCheck = ''
export PATH="${pkgs.postgresql}/bin:${"$PATH"}"
'';
};
}
];
};
in
{
checks.tests = rel8.hsPkgs.rel8.checks.tests;
packages.default = rel8.hsPkgs.rel8.components.library;
devShells.default = rel8.shellFor {
withHoogle = false;
tools = { cabal = "latest"; };
exactDeps = false;
buildInputs = [ pkgs.postgresql pkgs.scriv ];
};
}
);
}