Follows a "repos/deps" pattern (in order to help with recursive dependencies). To use:
-
Copy
bazel/repos.bzlinto your repository at3rdparty/bazel-rules-leveldb/repos.bzland add an emptyBUILD(orBUILD.bazel) to3rdparty/bazel-rules-leveldbas well. -
Copy all of the directories from
3rdpartythat you don't already have in your repository's3rdpartydirectory. -
Either ... add the following to your
WORKSPACE(orWORKSPACE.bazel):
load("//3rdparty/bazel-rules-leveldb:repos.bzl", leveldb_repos="repos")
leveldb_repos()
load("@com_github_3rdparty_bazel_rules_leveldb//bazel:deps.bzl", leveldb_deps="deps")
leveldb_deps()Or ... to simplify others depending on your repository, add the following to your repos.bzl:
load("//3rdparty/bazel-rules-leveldb:repos.bzl", leveldb="repos")
def repos():
leveldb()And the following to your deps.bzl:
load("@com_github_3rdparty_bazel_rules_leveldb//bazel:deps.bzl", leveldb="deps")
def deps():
leveldb()-
You can then use
@com_github_google_leveldb//:leveldbin your target'sdeps. -
Repeat the steps starting at (1) at the desired version of this repository that you want to use.