-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathflake.nix
105 lines (93 loc) · 2.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
description = "A `flake-parts` module for Haskell development";
outputs = inputs: {
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; };
};
om = {
# https://omnix.page/om/init.html#spec
templates.haskell-flake = {
template = inputs.self.templates.example;
params = [
{
name = "package-name";
description = "Name of the Haskell package";
placeholder = "example";
}
];
};
# CI spec
# https://omnix.page/om/ci.html
ci.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;
haskell-template = "github:srid/haskell-template/554b7c565396cf2d49a248e7e1dc0e0b46883b10";
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-cabal2nix = {
dir = "test/cabal2nix";
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;
};
};
test-settings-defaults = {
dir = "test/settings-defaults";
overrideInputs = {
inherit nixpkgs flake-parts haskell-flake haskell-template;
};
};
test-otherOverlays = {
dir = "test/otherOverlays";
overrideInputs = {
inherit nixpkgs flake-parts haskell-flake;
};
};
};
};
};
}