forked from bazelbuild/starlark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
99 lines (87 loc) · 3.35 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
workspace(name = "starlark_test_suite")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
http_archive(
name = "rules_cc",
sha256 = "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89",
strip_prefix = "rules_cc-0d5f3f2768c6ca2faca0079a997a97ce22997a0c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
"https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
],
)
git_repository(
name = "rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
commit = "4b84ad270387a7c439ebdccfd530e2339601ef27", # 2019-08-02
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
http_archive(
name = "rules_proto",
sha256 = "88b0a90433866b44bb4450d4c30bc5738b8c4f9c9ba14e9661deb123f56a833d",
strip_prefix = "rules_proto-b0cc14be5da05168b01db282fe93bdf17aa2b9f4",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz",
],
)
http_archive(
name = "rules_pkg",
sha256 = "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/rules_pkg-0.2.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
git_repository(
name = "io_bazel",
remote = "https://github.com/bazelbuild/bazel.git",
commit = "72013afdeae42dc55a566e532574d310f34af729", # 2020-07-23
)
http_archive(
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz"],
sha256 = "a82a352bffae6bee4e95f68a8d80a70e87f42c4741e6a448bec11998fcc82329",
)
http_archive(
name = "bazel_gazelle",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.17.0/bazel-gazelle-0.17.0.tar.gz"],
sha256 = "3c681998538231a2d24d0c07ed5a7658cb72bfb5fd4bf9911157c0e9ac6a2687",
)
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()
load("@bazel_gazelle//:deps.bzl", "go_repository")
go_repository(
name = "net_starlark_go",
importpath = "go.starlark.net",
tag = "master",
)
# Import dependency for starlark-go
go_repository(
name = "com_github_chzyer_readline",
importpath = "github.com/chzyer/readline",
tag = "master",
)
# Assumes you have cargo/rust installed
new_git_repository(
name = "starlark-rust",
remote = "https://github.com/google/starlark-rust.git",
branch = "master",
build_file_content = """
genrule(
name = "starlark",
outs = ["target/debug/starlark-repl"],
srcs = ["."],
cmd = "cd $(SRCS) && cargo build && cd - && cp $(SRCS)/target/debug/starlark-rust $@",
executable = True,
local = True,
visibility = ["//visibility:public"],
)
"""
)