-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
67 lines (51 loc) · 1.64 KB
/
MODULE.bazel
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
module(name = "aoc-2024", version = "0.1")
bazel_dep(name = "rules_haskell")
bazel_dep(name = "rules_cc", version = "0.0.17")
git_override(
module_name = "rules_haskell",
remote = "https://github.com/tweag/rules_haskell.git",
commit = "fad14171e67511b16f8a7dd16ed8f9267ed0bf3c",
patches = ["//deps:ghc.patch"],
)
haskell_toolchains = use_extension(
"@rules_haskell//extensions:haskell_toolchains.bzl",
"haskell_toolchains",
)
GHCOPTS = ["-threaded", "-rtsopts"]
haskell_toolchains.bindist(version = "9.6.6", target = "linux_amd64", ghcopts = GHCOPTS)
non_module_deps = use_extension(
"//deps:non_module_deps.bzl",
"non_module_deps",
)
use_repo(
non_module_deps,
"zlib.dev",
)
stack = use_extension(
"@rules_haskell//extensions:stack_snapshot.bzl",
"stack_snapshot",
)
use_repo(
stack,
"stackage",
"stackage-exe",
"stackage-unpinned",
)
stack.package(
name = "zlib",
extra_deps = ["@zlib.dev//:zlib"],
)
stack.snapshot(name = "lts-22.43")
# This uses an unpinned version of stack_snapshot, meaning that stack is invoked on every build.
# To switch to pinned stackage dependencies, run `bazel run @stackage-unpinned//:pin` and
# uncomment the following line.
stack.stack_snapshot_json(label = "//deps:stackage_snapshot.json")
# Custom
PACKAGES = ["array", "base", "text", "containers", "parallel", "extra", "directory", "unix", "random",
"mtl", "MemoTrie"]
[stack.package(name = p) for p in PACKAGES]
stack.package(
name = "attoparsec",
components = ["lib:attoparsec", "lib:attoparsec-internal"],
components_dependencies = {"lib:attoparsec": ["lib:attoparsec-internal"]},
)