blob: 810ddada872fb5218846dd0123e4b17a0c1e3b97 [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")
14nixpkgs_git_repository(
15 name = "nixpkgs",
16 revision = "2f1f9a9fe8a3c22f0677733523eaf6bd33995d50",
17)
18
19nixpkgs_package(
20 name = "nixops",
21 attribute_path = "nixops",
22 repositories = { "nixpkgs": "@nixpkgs" },
23)
24
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020025# Python rules
Sergiusz Bazanskide061802019-01-13 21:14:02 +010026git_repository(
27 name = "io_bazel_rules_python",
28 remote = "https://github.com/bazelbuild/rules_python.git",
29 commit = "ebd7adcbcafcc8abe3fd8e5b0e42e10ced1bfe27",
30)
31
32# Python dependencies
33
34load("@io_bazel_rules_python//python:pip.bzl", "pip_import")
35
36pip_import(
Sergiusz Bazanski07529712019-01-18 01:24:38 +010037 name = "py_deps",
38 requirements = "//:requirements.txt",
Sergiusz Bazanskide061802019-01-13 21:14:02 +010039)
40
41load("@py_deps//:requirements.bzl", "pip_install")
Sergiusz Bazanski07529712019-01-18 01:24:38 +010042
Sergiusz Bazanskide061802019-01-13 21:14:02 +010043pip_install()
44
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020045# Docker rules
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010046
Sergiusz Bazanski65865332019-05-18 16:23:45 +020047git_repository(
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020048 name = "io_bazel_rules_docker",
Sergiusz Bazanski65865332019-05-18 16:23:45 +020049 # Invoke puller.par with python2
50 # TODO(q3k): use upstream when py2/py3 bazel madness if fully fixed
51 remote = "https://github.com/q3k/rules_docker",
52 commit = "4642a2a7775e5713596bd6e37758735a0f38aa6e",
53)
54load(
55 "@io_bazel_rules_docker//repositories:repositories.bzl",
56 container_repositories = "repositories",
57)
58container_repositories()
59
60# Docker base images
61
62load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
63container_pull(
64 name = "prodimage-bionic",
65 registry = "index.docker.io",
66 repository = "library/ubuntu",
67 tag = "bionic-20190515",
68 digest = "sha256:b36667c98cf8f68d4b7f1fb8e01f742c2ed26b5f0c965a788e98dfe589a4b3e4",
69)
70
71# HTTP stuff from the Internet
72load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
73http_file(
74 name = "factorio-headless",
75 urls = ["https://factorio.com/get-download/0.16.51/headless/linux64"],
76 sha256 = "6cb09f5ac87f16f8d5b43cef26c0ae26cc46a57a0382e253dfda032dc5bb367f",
77 downloaded_file_path = "factorio.tar.xz",
Sergiusz Bazanski3e597182019-04-19 14:40:47 +020078)
79
80# Go rules
Sergiusz Bazanski07529712019-01-18 01:24:38 +010081
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010082http_archive(
83 name = "io_bazel_rules_go",
Sergiusz Bazanski3a2a6932019-04-06 01:20:19 +020084 urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.18.1/rules_go-0.18.1.tar.gz"],
85 sha256 = "77dfd303492f2634de7a660445ee2d3de2960cbd52f97d8c0dffa9362d3ddef9",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010086)
87
Sergiusz Bazanski3a2a6932019-04-06 01:20:19 +020088load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +010089
90go_rules_dependencies()
91
92go_register_toolchains()
93
94# Go Gazelle rules
95
96http_archive(
97 name = "bazel_gazelle",
Sergiusz Bazanski258686c2019-05-01 12:26:43 +020098 urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.17.0/bazel-gazelle-0.17.0.tar.gz"],
99 sha256 = "3c681998538231a2d24d0c07ed5a7658cb72bfb5fd4bf9911157c0e9ac6a2687",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100100)
101
102load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
103
104gazelle_dependencies()
105
106# Go repositories
107
108go_repository(
109 name = "io_k8s_kubernetes",
110 importpath = "k8s.io/kubernetes",
111 # Get from HTTP instead, this repository is _big_
Sergiusz Bazanski4a024bb2019-05-17 18:10:02 +0200112 urls = ["https://github.com/kubernetes/kubernetes/archive/v1.14.2.tar.gz"],
113 sha256 = "1effa926aedb0ed51eadcef3d5d49fd9799ec4d018200f95f51fcaa2a2d2cbf4",
114 strip_prefix = "kubernetes-1.14.2",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100115)
116
117go_repository(
Sergiusz Bazanski4a024bb2019-05-17 18:10:02 +0200118 name = "io_k8s_repo_infra",
119 commit = "df02ded38f9506e5bbcbf21702034b4fef815f2f",
Sergiusz Bazanskif2a812b2019-01-13 17:51:34 +0100120 importpath = "k8s.io/repo-infra",
121)
122
123go_repository(
124 name = "com_github_ksonnet_kubecfg",
125 commit = "59bc7dedf70e7496a2837207d8723f98f0e5f8e8",
126 importpath = "github.com/ksonnet/kubecfg",
127)
Sergiusz Bazanski07529712019-01-18 01:24:38 +0100128
129go_repository(
130 name = "com_github_projectcalico_calicoctl",
131 importpath = "github.com/projectcalico/calicoctl",
132 # This fork implements explicit Bazel rules
133 remote = "https://github.com/q3k/calicoctl",
134 vcs = "git",
135 commit = "1bc31862f07e7539ca493de9137ed1ad56cc9f43",
136 build_file_generation = "off",
137)
Sergiusz Bazanski9dc4b682019-04-05 23:51:49 +0200138
139go_repository(
140 name = "com_github_shirou_gopsutil",
141 commit = "2cbc9195c892b304060269ef280375236d2fcac9",
142 importpath = "github.com/shirou/gopsutil",
143)
Sergiusz Bazanskiacd001b2019-04-09 13:17:06 +0200144
145go_repository(
146 name = "com_github_cloudflare_cfssl",
147 commit = "768cd563887febaad559b511aaa5964823ccb4ab",
148 importpath = "github.com/cloudflare/cfssl",
149)
Sergiusz Bazanski258686c2019-05-01 12:26:43 +0200150
151go_repository(
152 name = "com_github_mattn_go_sqlite3",
153 commit = "5994cc52dfa89a4ee21ac891b06fbc1ea02c52d3",
154 importpath = "github.com/mattn/go-sqlite3",
155)
156
157go_repository(
158 name = "com_github_sebastiaanklippert_go_wkhtmltopdf",
159 commit = "72a7793efd38728796273861bb27d590cc33d9d4",
160 importpath = "github.com/sebastiaanklippert/go-wkhtmltopdf",
161)