-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWORKSPACE
123 lines (97 loc) · 3.13 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
workspace(name = "gazelle_haskell_modules_example")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
local_repository(
name = "io_tweag_gazelle_haskell_modules",
path = "..",
)
##########################
# rules_haskell preamble
##########################
http_archive(
name = "rules_haskell",
sha256 = "c3c85b886a64010c913a7700b0594dbd4204170b1ec00d1afb5f411868e7c54b",
strip_prefix = "rules_haskell-af979957c18e11693d4daba606143a7a362af4b1",
urls = ["https://github.com/tweag/rules_haskell/archive/af979957c18e11693d4daba606143a7a362af4b1.zip"],
)
load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies")
rules_haskell_dependencies()
load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
"nixpkgs_local_repository",
"nixpkgs_python_configure",
)
nixpkgs_local_repository(
name = "nixpkgs",
nix_file = "//:nixpkgs.nix",
)
nixpkgs_python_configure(repository = "@nixpkgs")
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
######################################
# Haskell dependencies and toolchain
######################################
load("@io_tweag_gazelle_haskell_modules//:defs.bzl", "gazelle_haskell_modules_dependencies")
gazelle_haskell_modules_dependencies()
stack_snapshot(
name = "stackage",
components = {
"tasty-discover": [
"lib",
"exe:tasty-discover",
],
},
packages = [
"aeson",
"base",
"ghc-paths",
"inspection-testing",
"tasty",
"tasty-discover",
"tasty-hunit",
"void",
],
snapshot = "lts-18.1",
)
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")
haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc8107",
compiler_flags = [
"-Werror",
"-Wall",
"-Wcompat",
"-Wincomplete-record-updates",
"-Wredundant-constraints",
],
repository = "@nixpkgs",
version = "8.10.7",
)
###############
# Go preamble
###############
http_archive(
name = "io_bazel_rules_go",
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
],
)
load(
"@io_tweag_rules_nixpkgs//nixpkgs:toolchains/go.bzl",
"nixpkgs_go_configure",
)
nixpkgs_go_configure(repository = "@nixpkgs")
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies")
go_rules_dependencies()
####################
# Gazelle preamble
####################
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()