-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathMODULE.bazel
117 lines (109 loc) · 2.61 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
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
107
108
109
110
111
112
113
114
115
116
117
module(
name = "rules_haskell_examples",
version = "0.17",
)
bazel_dep(
name = "rules_nixpkgs_core",
version = "0.12.0",
)
bazel_dep(
name = "rules_haskell_nix",
version = "1.0",
)
bazel_dep(
name = "rules_haskell",
version = "1.0",
)
# TODO
# bazel_dep(
# name = "rules_haskell_arm",
# version = "0.0.0",
# repo_name = "arm",
# )
# local_path_override(module_name = "rules_haskell_arm", path = "arm")
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_sh",
version = "0.5.0",
)
bazel_dep(
name = "bazel_skylib",
version = "1.7.1",
)
non_module_deps = use_extension(":non_module_deps.bzl", "non_module_deps")
use_repo(
non_module_deps,
"Cabal",
"os_info",
"split",
"zlib.hs",
)
stack_snapshot = use_extension(
"@rules_haskell//extensions:stack_snapshot.bzl",
"stack_snapshot",
)
use_repo(
stack_snapshot,
"stackage",
)
stack_snapshot.snapshot(local_snapshot = "@rules_haskell//:stackage_snapshot.yaml")
stack_snapshot.package(
name = "zlib",
extra_deps = ["@zlib.hs"],
flags =
# Sets the default explicitly to demonstrate the flags attribute.
[
"-non-blocking-ffi",
"-pkg-config",
],
)
stack_snapshot.package(
name = "streaming-commons",
extra_deps = ["@zlib.hs"],
setup_deps = ["@Cabal//:Cabal"],
)
[
stack_snapshot.package(
name = pkg, # See https://github.com/tweag/rules_haskell/issues/1871
setup_deps = ["@Cabal//:Cabal"],
)
for pkg in [
"base",
"bytestring",
"conduit",
"conduit-extra",
"hspec",
# Remove hspec-* packages once https://github.com/tweag/rules_haskell/issues/1871 is resolved
"hspec-core",
"hspec-discover",
"hspec-expectations",
"optparse-applicative",
"text",
"text-show",
]
]
# example for a vendored package
stack_snapshot.package(
name = "split",
# See https://github.com/tweag/rules_haskell/issues/1871
setup_deps = ["@Cabal//:Cabal"],
vendored = "@split//:split",
)
stack_snapshot.package(
name = "attoparsec",
components =
[
# attoparsec contains an internal library which is not exposed publicly,
# but required to build the public library, hence the declaration of
# those 2 components, as well as the explicit declaration of the
# dependency between them.
"lib",
"lib:attoparsec-internal",
],
components_dependencies = {
"lib:attoparsec": ["lib:attoparsec-internal"],
},
)