-
Notifications
You must be signed in to change notification settings - Fork 20
/
flake.nix
69 lines (61 loc) · 1.89 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
67
68
69
{
description = "A `flake-parts` module for Haskell development";
outputs = { ... }: {
flakeModule = ./nix/modules;
templates.default = {
description = "A simple flake.nix using haskell-flake";
path = builtins.path { path = ./example; filter = path: _: baseNameOf path == "flake.nix"; };
};
templates.example = {
description = "Example Haskell project using haskell-flake";
path = builtins.path { path = ./example; };
};
# CI spec
# https://github.com/srid/nixci
nixci.default =
let
exampleLock = builtins.fromJSON (builtins.readFile ./example/flake.lock);
nixpkgs = "github:nixos/nixpkgs/" + exampleLock.nodes.nixpkgs.locked.rev;
flake-parts = "github:hercules-ci/flake-parts/" + exampleLock.nodes.flake-parts.locked.rev;
haskell-flake = ./.;
haskell-parsers = ./nix/haskell-parsers;
in
{
dev = {
dir = "dev";
overrideInputs = { inherit haskell-flake; };
};
doc = {
dir = "doc";
overrideInputs = { inherit haskell-flake; };
};
example = {
dir = "example";
overrideInputs = { inherit haskell-flake; };
};
# Tests
haskell-parsers-test = {
dir = ./nix/haskell-parsers/test;
overrideInputs = { inherit haskell-parsers; };
};
test-simple = {
dir = "test/simple";
overrideInputs = {
inherit nixpkgs flake-parts haskell-flake;
};
};
test-with-subdir = {
dir = "test/with-subdir";
overrideInputs = {
inherit nixpkgs flake-parts haskell-flake;
};
};
test-project-module = {
dir = "test/project-module";
overrideInputs = {
inherit nixpkgs flake-parts haskell-flake;
};
};
};
};
}