-
Notifications
You must be signed in to change notification settings - Fork 28
/
flake.nix
66 lines (58 loc) · 1.94 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
65
66
{
description = "weeder";
nixConfig = {
extra-substituters = [
"https://weeder.cachix.org"
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"weeder.cachix.org-1:RdUmJalaHD50fGg3bNqsOGmGzRRqTIacmPBu/Xtjl3I="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
};
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 ];
};
weeder = pkgs.haskell-nix.project {
compiler-nix-name = "ghc981";
cabalProjectLocal = builtins.readFile ./cabal.project.haskell-nix;
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "weeder";
src = ./.;
};
modules = [
{
reinstallableLibGhc = false;
enableLibraryProfiling = true;
nonReinstallablePkgs = [
"rts" "ghc-prim" "integer-gmp" "integer-simple" "base" "terminfo"
"deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
"ghc-bignum" "system-cxx-std-lib" "ghc" "binary" "bytestring" "containers"
"directory" "exceptions" "filepath" "hpc" "process" "semaphore-compat" "stm"
"time" "transformers" "unix" "mtl"
];
}
];
};
in
{
packages.default = weeder.hsPkgs.weeder.components.library;
devShells.default = weeder.shellFor {
withHoogle = false;
tools = { cabal = "latest"; };
exactDeps = false;
buildInputs = [ pkgs.changie ];
};
}
);
}