-
Notifications
You must be signed in to change notification settings - Fork 81
/
WORKSPACE
88 lines (72 loc) · 2.33 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
workspace(name = "rules_haskell_examples")
local_repository(
name = "rules_haskell",
path = "..",
)
local_repository(
name = "arm",
path = "arm",
)
load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies")
rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")
GHC_VERSION = "9.4.8"
haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc{}".format(GHC_VERSION.replace(".", "")),
repository = "@rules_haskell//nixpkgs:default.nix",
version = GHC_VERSION,
)
load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")
rules_haskell_toolchains(version = GHC_VERSION)
load("@rules_nixpkgs_cc//:cc.bzl", "nixpkgs_cc_configure")
load("@rules_nixpkgs_python//:python.bzl", "nixpkgs_python_configure")
nixpkgs_cc_configure(
# Don't override the default cc toolchain needed for bindist mode.
name = "nixpkgs_config_cc",
repository = "@rules_haskell//nixpkgs:default.nix",
)
nixpkgs_python_configure(
repository = "@rules_haskell//nixpkgs:default.nix",
)
load(":non_module_deps.bzl", "repositories")
repositories(bzlmod = False)
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
stack_snapshot(
name = "stackage",
components = {
"attoparsec": [
"lib",
"lib:attoparsec-internal",
],
},
components_dependencies = {
"attoparsec": """{"lib:attoparsec": ["lib:attoparsec-internal"]}""",
},
extra_deps = {
"zlib": ["@zlib.hs"],
"streaming-commons": ["@zlib.hs"],
},
flags = {
# Sets the default explicitly to demonstrate the flags attribute.
"zlib": [
"-non-blocking-ffi",
"-pkg-config",
],
},
local_snapshot = "@rules_haskell//:stackage_snapshot.yaml",
packages = [
"base",
"bytestring",
"conduit",
"conduit-extra",
"hspec",
"optparse-applicative",
"text",
"text-show",
],
# This example 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.
# And uncomment the following line.
vendored_packages = {"split": "@split//:split"},
)