-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bazel: make
codeql
compatible with workspace setup
- Loading branch information
Showing
3 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load("//swift/third_party:load.bzl", load_swift_dependencies = "load_dependencies") | ||
|
||
def codeql_workspace(repository_name = "codeql"): | ||
load_swift_dependencies(repository_name = repository_name) | ||
maybe( | ||
repo_rule = http_archive, | ||
name = "rules_pkg", | ||
sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", | ||
urls = [ | ||
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", | ||
"https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", | ||
], | ||
) | ||
|
||
maybe( | ||
repo_rule = http_archive, | ||
name = "platforms", | ||
urls = [ | ||
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz", | ||
"https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz", | ||
], | ||
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74", | ||
) | ||
|
||
maybe( | ||
repo_rule = http_archive, | ||
name = "rules_python", | ||
sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd", | ||
strip_prefix = "rules_python-0.8.1", | ||
urls = [ | ||
"https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz", | ||
], | ||
) | ||
|
||
maybe( | ||
repo_rule = http_archive, | ||
name = "bazel_skylib", | ||
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7", | ||
urls = [ | ||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz", | ||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") | ||
load("@rules_python//python:pip.bzl", "pip_install") | ||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | ||
|
||
def codeql_workspace_deps(repository_name = "codeql"): | ||
pip_install( | ||
name = "codegen_deps", | ||
requirements = "@%s//misc/codegen:requirements_lock.txt" % repository_name, | ||
) | ||
bazel_skylib_workspace() | ||
rules_pkg_dependencies() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters