Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to add this as dependency #410

Open
hofbi opened this issue Apr 8, 2024 · 1 comment
Open

Document how to add this as dependency #410

hofbi opened this issue Apr 8, 2024 · 1 comment

Comments

@hofbi
Copy link

hofbi commented Apr 8, 2024

I would greate to have a short documentation in the readme on how to add this as a dependency to your project.

Should be also related to #370, since bzlmod simplifies the setup.

@alexjpwalker
Copy link
Member

alexjpwalker commented Jun 13, 2024

Agreed, this would be in line with other Bazel rules repos whose root README is typically installation instructions

For anyone coming across this issue in the meantime try

# deps.bzl
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

def vaticle_bazel_distribution():
    git_repository(
        name = "vaticle_bazel_distribution",
        remote = "https://github.com/vaticle/bazel-distribution",
        commit = "0040e492db47eb83681a62ddf8491a7218633164",
    )
# WORKSPACE
load("//:deps.bzl", "vaticle_bazel_distribution")
vaticle_bazel_distribution()

# load modules you need from bazel_distribution here, e.g:
load("@vaticle_bazel_distribution//common:deps.bzl", "rules_pkg")
rules_pkg()
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()

source: https://github.com/vaticle/typedb/blob/development/WORKSPACE

We haven't yet migrated to Bzlmod but there is an open PR that would initiate the process, Bzlmod instructions will be released as they become available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants