blob: 0b764bb11a7f688f23e1acfdde463831fbd2b7bf [file] [log] [blame]
Sergiusz Bazanskide061802019-01-13 21:14:02 +01001load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
Sergiusz Bazanski3e597182019-04-19 14:40:47 +02002load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Sergiusz Bazanskide061802019-01-13 21:14:02 +01003
Sergiusz Bazanski1e6b52a2019-05-15 19:08:25 +02004# Nix rules
5http_archive(
6 name = "io_tweag_rules_nixpkgs",
7 strip_prefix = "rules_nixpkgs-364adc70f32c2b3982995fce06b334f4d159070e",
8 urls = ["https://github.com/tweag/rules_nixpkgs/archive/364adc70f32c2b3982995fce06b334f4d159070e.tar.gz"],
9)
10
11# Nix packages
12
13load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_git_repository", "nixpkgs_package")
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020014
Sergiusz Bazanski1e6b52a2019-05-15 19:08:25 +020015nixpkgs_git_repository(
16 name = "nixpkgs",
17 revision = "2f1f9a9fe8a3c22f0677733523eaf6bd33995d50",
18)
19
20nixpkgs_package(
21 name = "nixops",
Sergiusz Bazanski44116ea2019-05-18 16:26:56 +020022 attribute_path = "nixops",
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020023 repositories = {"nixpkgs": "@nixpkgs"},
Sergiusz Bazanski1e6b52a2019-05-15 19:08:25 +020024)
25
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020026# Python rules
Sergiusz Bazanskide061802019-01-13 21:14:02 +010027git_repository(
28 name = "io_bazel_rules_python",
29 remote = "https://github.com/bazelbuild/rules_python.git",
30 commit = "ebd7adcbcafcc8abe3fd8e5b0e42e10ced1bfe27",
31)
32
33# Python dependencies
34
35load("@io_bazel_rules_python//python:pip.bzl", "pip_import")
36
37pip_import(
Sergiusz Bazanski07529712019-01-18 01:24:38 +010038 name = "py_deps",
39 requirements = "//:requirements.txt",
Sergiusz Bazanskide061802019-01-13 21:14:02 +010040)
41
42load("@py_deps//:requirements.bzl", "pip_install")
Sergiusz Bazanski07529712019-01-18 01:24:38 +010043
Sergiusz Bazanskide061802019-01-13 21:14:02 +010044pip_install()
45
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020046# Docker rules
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010047
Sergiusz Bazanski65865332019-05-18 16:23:45 +020048git_repository(
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020049 name = "io_bazel_rules_docker",
Sergiusz Bazanski65865332019-05-18 16:23:45 +020050 # Invoke puller.par with python2
51 # TODO(q3k): use upstream when py2/py3 bazel madness if fully fixed
52 remote = "https://github.com/q3k/rules_docker",
53 commit = "4642a2a7775e5713596bd6e37758735a0f38aa6e",
54)
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020055
Sergiusz Bazanski65865332019-05-18 16:23:45 +020056load(
57 "@io_bazel_rules_docker//repositories:repositories.bzl",
58 container_repositories = "repositories",
59)
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020060
Sergiusz Bazanski65865332019-05-18 16:23:45 +020061container_repositories()
62
63# Docker base images
64
65load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020066
Sergiusz Bazanski65865332019-05-18 16:23:45 +020067container_pull(
68 name = "prodimage-bionic",
69 registry = "index.docker.io",
70 repository = "library/ubuntu",
71 tag = "bionic-20190515",
72 digest = "sha256:b36667c98cf8f68d4b7f1fb8e01f742c2ed26b5f0c965a788e98dfe589a4b3e4",
73)
74
Sergiusz Bazanskia7e26cc2019-06-21 20:38:35 +020075container_pull(
76 name = "gerrit-3.0.0",
77 registry = "index.docker.io",
78 repository = "gerritcodereview/gerrit",
79 tag = "3.0.0-ubuntu18",
80 digest = "sha256:f107729011d8b81611e35a0ad452f21a424c1820664e9f95d135ad411e87b9bb",
81)
82
Sergiusz Bazanski65865332019-05-18 16:23:45 +020083# HTTP stuff from the Internet
84load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020085
Sergiusz Bazanski65865332019-05-18 16:23:45 +020086http_file(
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020087 name = "factorio-headless-0.16.51",
Sergiusz Bazanski65865332019-05-18 16:23:45 +020088 urls = ["https://factorio.com/get-download/0.16.51/headless/linux64"],
Sergiusz Bazanski44116ea2019-05-18 16:26:56 +020089 sha256 = "6cb09f5ac87f16f8d5b43cef26c0ae26cc46a57a0382e253dfda032dc5bb367f",
90 downloaded_file_path = "factorio.tar.xz",
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020091)
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020092
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020093http_file(
94 name = "factorio-headless-0.17.41",
95 urls = ["https://factorio.com/get-download/0.17.41/headless/linux64"],
96 sha256 = "bf2d16b23c3bbd97e41889d3e27670b6d958fa3d50f0befb41d234f735e8e6d1",
97 downloaded_file_path = "factorio.tar.xz",
98)
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020099
Sergiusz Bazanskic2924102019-06-30 17:35:57 +0200100http_file(
101 name = "factorio-headless-0.17.52",
102 urls = ["https://factorio.com/get-download/0.17.52/headless/linux64"],
103 sha256 = "24458a4e16875b0b63677b7e7a068ce2e5b298c110381d17c6f596fd1406db0e",
104 downloaded_file_path = "factorio.tar.xz",
105)
106
107
Sergiusz Bazanski3e597182019-04-19 14:40:47 +0200108# Go rules
Sergiusz Bazanski07529712019-01-18 01:24:38 +0100109
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100110http_archive(
111 name = "io_bazel_rules_go",
Sergiusz Bazanski1cace132019-07-13 16:16:34 +0200112 urls = [
113 "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.7/rules_go-0.18.7.tar.gz",
114 "https://github.com/bazelbuild/rules_go/releases/download/0.18.7/rules_go-0.18.7.tar.gz",
115 ],
116 sha256 = "45409e6c4f748baa9e05f8f6ab6efaa05739aa064e3ab94e5a1a09849c51806a",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100117)
118
Sergiusz Bazanski3a2a6932019-04-06 01:20:19 +0200119load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100120
121go_rules_dependencies()
122
123go_register_toolchains()
124
125# Go Gazelle rules
126
127http_archive(
128 name = "bazel_gazelle",
Sergiusz Bazanski258686c2019-05-01 12:26:43 +0200129 urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.17.0/bazel-gazelle-0.17.0.tar.gz"],
130 sha256 = "3c681998538231a2d24d0c07ed5a7658cb72bfb5fd4bf9911157c0e9ac6a2687",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100131)
132
133load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
134
135gazelle_dependencies()
136
Sergiusz Bazanski573da782019-06-21 19:59:52 +0200137# For app/gerrit/gerrit-oauth-provider
138
139git_repository(
140 name = "com_googlesource_gerrit_bazlets",
141 remote = "https://gerrit.googlesource.com/bazlets",
142 commit = "8528a0df69dadf6311d8d3f81c1b693afda8bcf1",
143)
144
145load(
146 "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
147 "gerrit_api",
148)
149
150gerrit_api()
151
152load("@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl", "maven_jar")
153
154maven_jar(
155 name = "scribe",
156 artifact = "org.scribe:scribe:1.3.7",
157 sha1 = "583921bed46635d9f529ef5f14f7c9e83367bc6e",
158)
159
160maven_jar(
161 name = "commons-codec",
162 artifact = "commons-codec:commons-codec:1.4",
163 sha1 = "4216af16d38465bbab0f3dff8efa14204f7a399a",
164)
165
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100166# Go repositories
167
168go_repository(
169 name = "io_k8s_kubernetes",
170 importpath = "k8s.io/kubernetes",
171 # Get from HTTP instead, this repository is _big_
Sergiusz Bazanski4a024bb2019-05-17 18:10:02 +0200172 urls = ["https://github.com/kubernetes/kubernetes/archive/v1.14.2.tar.gz"],
173 sha256 = "1effa926aedb0ed51eadcef3d5d49fd9799ec4d018200f95f51fcaa2a2d2cbf4",
174 strip_prefix = "kubernetes-1.14.2",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100175)
176
177go_repository(
Sergiusz Bazanski4a024bb2019-05-17 18:10:02 +0200178 name = "io_k8s_repo_infra",
179 commit = "df02ded38f9506e5bbcbf21702034b4fef815f2f",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100180 importpath = "k8s.io/repo-infra",
181)
182
183go_repository(
184 name = "com_github_ksonnet_kubecfg",
185 commit = "59bc7dedf70e7496a2837207d8723f98f0e5f8e8",
186 importpath = "github.com/ksonnet/kubecfg",
187)
Sergiusz Bazanski07529712019-01-18 01:24:38 +0100188
189go_repository(
190 name = "com_github_projectcalico_calicoctl",
191 importpath = "github.com/projectcalico/calicoctl",
192 # This fork implements explicit Bazel rules
193 remote = "https://github.com/q3k/calicoctl",
194 vcs = "git",
195 commit = "1bc31862f07e7539ca493de9137ed1ad56cc9f43",
196 build_file_generation = "off",
197)
Sergiusz Bazanski9dc4b682019-04-05 23:51:49 +0200198
199go_repository(
200 name = "com_github_shirou_gopsutil",
201 commit = "2cbc9195c892b304060269ef280375236d2fcac9",
202 importpath = "github.com/shirou/gopsutil",
203)
Sergiusz Bazanskiacd001b2019-04-09 13:17:06 +0200204
205go_repository(
206 name = "com_github_cloudflare_cfssl",
207 commit = "768cd563887febaad559b511aaa5964823ccb4ab",
208 importpath = "github.com/cloudflare/cfssl",
209)
Sergiusz Bazanski258686c2019-05-01 12:26:43 +0200210
211go_repository(
212 name = "com_github_mattn_go_sqlite3",
213 commit = "5994cc52dfa89a4ee21ac891b06fbc1ea02c52d3",
214 importpath = "github.com/mattn/go-sqlite3",
215)
216
217go_repository(
218 name = "com_github_sebastiaanklippert_go_wkhtmltopdf",
219 commit = "72a7793efd38728796273861bb27d590cc33d9d4",
220 importpath = "github.com/sebastiaanklippert/go-wkhtmltopdf",
221)