-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflake.nix
More file actions
106 lines (89 loc) · 3.08 KB
/
Copy pathflake.nix
File metadata and controls
106 lines (89 loc) · 3.08 KB
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
106
{
description = "The Haskell grammar for tree-sitter";
inputs = {
hix.url = "github:tek/hix";
hix.inputs.nixpkgs.url = "github:nixos/nixpkgs/d233902339c02a9c334e7e593de68855ad26c4cb";
rust-overlay.url = "github:oxalica/rust-overlay";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = {self, hix, rust-overlay, nix-filter, ...}: hix.lib.pro ({config, lib, util, ...}: {
cabal = {
license = "MIT";
license-file = "LICENSE";
author = "Torsten Schmits";
language = "GHC2021";
prelude = {
enable = true;
package = {
name = "incipit-base";
version = ">= 0.5";
};
module = "IncipitBase";
};
paths = false;
};
packages.tools = {
src = ./tools;
library = {
enable = true;
dependencies = [
"exon >= 1.4 && < 1.9"
"optparse-applicative >= 0.17 && < 0.19"
"path ^>= 0.9"
"path-io >= 1.7 && < 1.9"
"transformers"
];
};
executable.enable = true;
test = {
enable = true;
dependencies = [
"hedgehog >= 1.1 && < 1.6"
"path ^>= 0.9"
"tasty >= 1.4 && < 1.6"
"tasty-hedgehog >= 1.3 && < 1.5"
];
};
override = {fast, ...}: fast;
};
outputs = let
inherit (config) pkgs;
outputs = import ./nix/outputs.nix { inherit config pkgs rust-overlay; filter = nix-filter.lib; };
hs = outputs.dialect-haskell;
hsc = outputs.dialect-hsc;
in {
packages = {
default = lib.mkForce outputs.tree-sitter-haskell;
inherit (outputs) bitmap-test tree-sitter-haskell rust;
parser-gen = hs.parserGen;
parser-src = hs.parserSrc;
parser-lib = hs.parserLib;
parser-wasm = hs.parserWasm;
parser-hsc-gen = hsc.parserGen;
parser-hsc-src = hsc.parserSrc;
parser-hsc-lib = hsc.parserLib;
parser-hsc-wasm = hsc.parserWasm;
};
apps = lib.genAttrs ["tests" "unit-tests" "ci"] (name: util.app outputs.${name}) // {
gen-bitmaps = util.app outputs.gen-bitmaps;
bench-all = util.app (outputs.bench "effects postgrest polysemy ivory haskell-language-server");
bench-hls = util.app (outputs.bench "haskell-language-server");
bench-ghc = util.app (pkgs.writeScript "bench-ghc" "${outputs.benchWith {warmup = 0; max = 3;} "tsh-test-ghc/compiler"} 3");
bench-libs = util.app (outputs.bench-libs);
bench-history = util.app (outputs.bench-history);
files = util.app outputs.collectFiles;
parse = util.app "${outputs.rust}/bin/parse";
show = util.app "${outputs.rust}/bin/show";
report = util.app outputs.report;
report-mem = util.app outputs.report-mem;
report-size = util.app outputs.report-size;
report-quick = util.app outputs.report-quick;
gen-parsers = util.app outputs.gen-parsers;
};
devShells = {
default = lib.mkForce outputs.shell;
tools = self.devShells.${config.system}.dev;
};
};
});
}