Skip to content

Commit 12904ac

Browse files
authored
test: Run example tests in nix (#257)
1 parent ef854dd commit 12904ac

File tree

4 files changed

+25
-50
lines changed

4 files changed

+25
-50
lines changed

example/flake.nix

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@
2424
# Note that local packages are automatically included in `packages`
2525
# (defined by `defaults.packages` option).
2626
#
27-
# packages = {
28-
# aeson.source = "1.5.0.0"; # Hackage version override
29-
# shower.source = inputs.shower;
30-
# };
31-
# settings = {
32-
# aeson = {
33-
# check = false;
34-
# };
35-
# relude = {
36-
# haddock = false;
37-
# broken = false;
38-
# };
39-
# };
27+
packages = {
28+
# aeson.source = "1.5.0.0"; # Hackage version override
29+
# shower.source = inputs.shower;
30+
};
31+
settings = {
32+
# aeson = {
33+
# check = false;
34+
# };
35+
# relude = {
36+
# haddock = false;
37+
# broken = false;
38+
# };
39+
};
4040

41-
# devShell = {
42-
# # Enabled by default
43-
# enable = true;
44-
#
45-
# # Programs you want to make available in the shell.
46-
# # Default programs can be disabled by setting to 'null'
47-
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
48-
#
49-
# hlsCheck.enable = true;
50-
# };
41+
devShell = {
42+
# Enabled by default
43+
# enable = true;
44+
45+
# Programs you want to make available in the shell.
46+
# Default programs can be disabled by setting to 'null'
47+
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
48+
49+
hlsCheck.enable = pkgs.stdenv.isDarwin; # On darwin, sandbox is disabled, so HLS can use the network.
50+
};
5151
};
5252

5353
# haskell-flake doesn't set the default package, but you can do it here.

example/test.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
};
1010
templates.example = {
1111
description = "Example Haskell project using haskell-flake";
12-
path = builtins.path { path = ./example; filter = path: _: baseNameOf path != "test.sh"; };
12+
path = builtins.path { path = ./example; };
1313
};
1414

1515
# CI spec

runtest.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ nix --version
99
# directory.
1010
# TODO: Supplant these scripts with Nix. See https://github.com/srid/haskell-flake/issues/241
1111
TESTS=(
12-
./example
13-
# TODO: Move these to flake check, just like ./test/{simple, project-module}
12+
# TODO: Move this to flake check, just like ./test/{simple, project-module}
1413
./test/with-subdir
1514
)
1615

0 commit comments

Comments
 (0)