-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
133 lines (116 loc) · 3.64 KB
/
WORKSPACE
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Give your project a name. :)
workspace(name = "fib")
# shim to match up with expectations in the JNI
local_repository(
name = "openjdk",
path = "./openjdk",
)
local_repository(
name = "sed",
path = "./sed",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Load the repository rule to download an http archive.
load(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive"
)
# Download rules_haskell and make it accessible as "@rules_haskell".
# upgrade to pick up a fix for https://github.com/tweag/rules_haskell/issues/1832
http_archive(
name = "rules_haskell",
sha256 = "26f71338e1dad10d8026ed447f65406ab0fe44d81d36fb6a8813be6efcc294f1",
strip_prefix = "rules_haskell-c5335e62829e0e08d7986457a97eb94886081d78",
url = "https://github.com/tweag/rules_haskell/archive/c5335e62829e0e08d7986457a97eb94886081d78.tar.gz",
)
load(
"@rules_haskell//haskell:repositories.bzl",
"rules_haskell_dependencies",
)
# Setup all Bazel dependencies required by rules_haskell.
rules_haskell_dependencies()
load(
"@rules_haskell//haskell:toolchain.bzl",
"rules_haskell_toolchains",
)
# Download a GHC binary distribution from haskell.org and register it as a toolchain.
rules_haskell_toolchains(
version = "9.2.5",
)
# TODO: Remove when tests are run with a ghc version containing Cabal >= 3.10
# See https://github.com/tweag/rules_haskell/issues/1871
http_archive(
name = "Cabal",
build_file_content = """
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_library")
haskell_cabal_library(
name = "Cabal",
srcs = glob(["Cabal/**"]),
verbose = False,
version = "3.6.3.0",
visibility = ["//visibility:public"],
)
""",
sha256 = "f69b46cb897edab3aa8d5a4bd7b8690b76cd6f0b320521afd01ddd20601d1356",
strip_prefix = "cabal-gg-8220-with-3630",
urls = ["https://github.com/tweag/cabal/archive/refs/heads/gg/8220-with-3630.zip"],
)
load(
"@bazel_tools//tools/build_defs/repo:git.bzl",
"git_repository"
)
git_repository(
name = "tweag_inline_java",
remote = "https://github.com/tweag/inline-java.git",
commit = "85c6a3e6a36c5fddb3571492a9781ea1ee59caeb"
)
load(
"@rules_haskell//haskell:cabal.bzl",
"stack_snapshot"
)
stack_snapshot(
name = "stackage",
local_snapshot = "//:stack-snapshot.yaml",
components = {
"attoparsec": [
# 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 = {
"attoparsec": """{"lib:attoparsec": ["lib:attoparsec-internal"]}""",
},
packages = [
"async",
"base",
"bytestring",
"choice",
"containers",
"constraints",
"deepseq",
"inline-c",
"linear-base",
"singletons-base",
"stm",
"text",
"transformers-compat"
],
setup_deps = {
"async": ["@Cabal//:Cabal"],
"base": ["@Cabal//:Cabal"],
"bytestring": ["@Cabal//:Cabal"],
"choice": ["@Cabal//:Cabal"],
"containers": ["@Cabal//:Cabal"],
"constraints": ["@Cabal//:Cabal"],
"deepseq": ["@Cabal//:Cabal"],
"inline-c": ["@Cabal//:Cabal"],
"linear-base": ["@Cabal//:Cabal"],
"singletons-base": ["@Cabal//:Cabal"],
"stm": ["@Cabal//:Cabal"],
"text": ["@Cabal//:Cabal"],
"transformers-compat": ["@Cabal//:Cabal"],
},)