-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
62 lines (59 loc) · 1.55 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
{
description = "Nix flake for local development and CI of the THSH project";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
...
}:
(flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
commonDevInputs = with pkgs; [
jq
shellcheck
];
commonShellHook = ''
# This makes binaries of this project available for testing, e.g. `yolc`
export PATH=$PWD/bin/:$PATH
'';
mkCI =
ghcVer:
pkgs.mkShell {
buildInputs = with pkgs; [
cabal-install
hlint
haskell.compiler.${ghcVer}
];
shellHook = commonShellHook;
};
in
{
devShells.default = pkgs.mkShell {
buildInputs =
with pkgs;
commonDevInputs
++ [
# haskell local dev tooling
cabal-install
hlint
stylish-haskell
haskell.compiler.ghc910
haskell.packages.ghc910.haskell-language-server
];
shellHook = commonShellHook;
};
devShells.ci-ghc92 = mkCI "ghc92";
devShells.ci-ghc94 = mkCI "ghc94";
devShells.ci-ghc96 = mkCI "ghc96";
devShells.ci-ghc98 = mkCI "ghc98";
devShells.ci-ghc910 = mkCI "ghc910";
}
));
}