-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
42 lines (38 loc) · 950 Bytes
/
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
{
inputs = { nixpkgs.url = "github:nixos/nixpkgs"; };
outputs = { self, nixpkgs }:
with nixpkgs.legacyPackages.x86_64-linux;
with builtins;
let
hl = haskell.lib;
hsPkgs = haskell.packages.ghc94;
extraHsPkgs = hsPkgs.override {
overrides = self: super: {
ListLike = hl.dontCheck super.ListLike;
hlint = super.hlint_3_5;
};
};
hsDevToolFn = p:
with p;
if getEnv "NIX_BUILD_SHELL" == "" then [
cabal-fmt
haskell-language-server
hlint
] else
[ ];
hsPkgsFn = p:
with p; [
cmdargs
conduit
criterion
tasty-hunit
tasty-quickcheck
tasty-th
];
in {
devShell.x86_64-linux = mkShell {
buildInputs = [ (extraHsPkgs.ghcWithPackages hsPkgsFn) cabal-install ]
++ hsDevToolFn extraHsPkgs;
};
};
}