forked from vmware-archive/jsonnet-lang-for-gazelle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdef.bzl
45 lines (37 loc) · 1.03 KB
/
def.bzl
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
// Copyright 2019 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
"""Jsonnet library. It is a wrapper on top of filegroup"""
def jsonnet_library(name, srcs, visibility, deps = []): native.filegroup(
name = name,
srcs = native.glob(srcs) + deps,
visibility = visibility,
)
# Usage:
# WORKSPACE
#
# load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
#
# git_repository(
# name = "jsonnet_gazelle",
# commit = "master",
# remote = "https://github.com/vmware/jsonnet-lang-for-gazelle",
# )
# BUILD.bazel
#
# load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
#
# gazelle_binary(
# name = "gazelle_jsonnet_binary",
# languages = DEFAULT_LANGUAGES + [
# "@jsonnet_gazelle//language/jsonnet:go_default_library",
# ],
# visibility = ["//visibility:public"],
# )
#
# # gazelle:jsonnet_allowed_imports json,groovy,txt
# # gazelle:jsonnet_native_imports libsonnet
#
# gazelle(
# name = "gazelle_jsonnet",
# gazelle = "//:gazelle_jsonnet_binary",
# )