-
Notifications
You must be signed in to change notification settings - Fork 3
/
devenv.nix
46 lines (38 loc) · 1.04 KB
/
devenv.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
{ inputs, pkgs, ... }:
{
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = with pkgs; [
git
ghcid
haskellPackages.implicit-hie
haskellPackages.doctest
];
# https://devenv.sh/scripts/
scripts = {
run-watch.exec = "ghcid --command=cabal repl $1";
run-build.exec = "cabal build all";
run-update.exec = "cabal update";
run-cli.exec = "cabal run nhcli -- $@";
run-core-tests.exec = ''
cabal repl nhcore --with-compiler=doctest && \
cabal test nhcore
'';
run-cli-tests.exec = ''
cabal test nhcli
'';
};
enterShell = ''
gen-hie > hie.yaml
'';
# https://devenv.sh/languages/
languages.nix.enable = true;
languages.haskell.enable = true;
# languages.haskell.package = pkgs.haskell.compiler.ghc92;
# https://devenv.sh/pre-commit-hooks/
# pre-commit.hooks.shellcheck.enable = true;
# https://devenv.sh/processes/
# processes.ping.exec = "ping example.com";
# See full reference at https://devenv.sh/reference/options/
}