Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed Mar 22, 2024
1 parent 1d96bcc commit 6382cd7
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 0 deletions.
92 changes: 92 additions & 0 deletions modules/cel-spec/0.14.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
module(
name = "cel-spec",
version = "0.14.0",
compatibility_level = 1,
)

bazel_dep(
name = "abseil-cpp",
version = "20211102.0",
repo_name = "com_google_absl",
)
bazel_dep(
name = "bazel_skylib",
version = "1.3.0",
)
bazel_dep(
name = "gazelle",
version = "0.30.0",
repo_name = "bazel_gazelle",
)
bazel_dep(
name = "protobuf",
version = "21.7",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_go",
version = "0.39.1",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "rules_java",
version = "5.5.0",
)
bazel_dep(
name = "rules_pkg",
version = "0.7.0",
)
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
bazel_dep(
name = "rules_python",
version = "0.22.1",
)
# -- bazel_dep definitions -- #

non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies")
use_repo(
non_module_dependencies,
"com_google_googleapis",
)

googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
use_repo(
googleapis_ext,
"com_google_googleapis_imports",
)

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(
name = "go_sdk",
version = "1.19.1",
)
use_repo(go_sdk, "go_sdk")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
go_deps.module(
path = "google.golang.org/genproto/googleapis/api",
sum = "h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ=",
version = "v0.0.0-20230525234035-dd9d682886f9",
)
go_deps.module(
path = "google.golang.org/genproto/googleapis/rpc",
sum = "h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=",
version = "v0.0.0-20230525234030-28d5490b6b19",
)
use_repo(
go_deps,
"com_github_golang_protobuf",
"org_golang_google_genproto",
"org_golang_google_genproto_googleapis_api",
"org_golang_google_genproto_googleapis_rpc",
"org_golang_google_grpc",
"org_golang_google_protobuf",
)
21 changes: 21 additions & 0 deletions modules/cel-spec/0.14.0/patches/extensions_dot_bzl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/extensions.bzl b/extensions.bzl
new file mode 100644
index 0000000..c7e96b3
--- /dev/null
+++ b/extensions.bzl
@@ -0,0 +1,15 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def _non_module_dependencies_impl(_ctx):
+ http_archive(
+ name = "com_google_googleapis",
+ sha256 = "bd8e735d881fb829751ecb1a77038dda4a8d274c45490cb9fcf004583ee10571",
+ strip_prefix = "googleapis-07c27163ac591955d736f3057b1619ece66f5b99",
+ urls = [
+ "https://github.com/googleapis/googleapis/archive/07c27163ac591955d736f3057b1619ece66f5b99.tar.gz",
+ ],
+ )
+
+non_module_dependencies = module_extension(
+ implementation = _non_module_dependencies_impl,
+)
12 changes: 12 additions & 0 deletions modules/cel-spec/0.14.0/patches/googleapis_ext_dot_blz.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/googleapis_ext.bzl b/googleapis_ext.bzl
new file mode 100644
index 0000000..f3c1e15
--- /dev/null
+++ b/googleapis_ext.bzl
@@ -0,0 +1,6 @@
+load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
+
+googleapis_ext = module_extension(implementation = lambda x: switched_rules_by_language(
+ name = "com_google_googleapis_imports",
+ cc = True,
+))
95 changes: 95 additions & 0 deletions modules/cel-spec/0.14.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,92 @@
+module(
+ name = "cel-spec",
+ version = "0.14.0",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20211102.0",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "bazel_skylib",
+ version = "1.3.0",
+)
+bazel_dep(
+ name = "gazelle",
+ version = "0.30.0",
+ repo_name = "bazel_gazelle",
+)
+bazel_dep(
+ name = "protobuf",
+ version = "21.7",
+ repo_name = "com_google_protobuf",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_go",
+ version = "0.39.1",
+ repo_name = "io_bazel_rules_go",
+)
+bazel_dep(
+ name = "rules_java",
+ version = "5.5.0",
+)
+bazel_dep(
+ name = "rules_pkg",
+ version = "0.7.0",
+)
+bazel_dep(
+ name = "rules_proto",
+ version = "5.3.0-21.7",
+)
+bazel_dep(
+ name = "rules_python",
+ version = "0.22.1",
+)
+# -- bazel_dep definitions -- #
+
+non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies")
+use_repo(
+ non_module_dependencies,
+ "com_google_googleapis",
+)
+
+googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
+use_repo(
+ googleapis_ext,
+ "com_google_googleapis_imports",
+)
+
+go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
+go_sdk.download(
+ name = "go_sdk",
+ version = "1.19.1",
+)
+use_repo(go_sdk, "go_sdk")
+
+go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
+go_deps.from_file(go_mod = "//:go.mod")
+go_deps.module(
+ path = "google.golang.org/genproto/googleapis/api",
+ sum = "h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ=",
+ version = "v0.0.0-20230525234035-dd9d682886f9",
+)
+go_deps.module(
+ path = "google.golang.org/genproto/googleapis/rpc",
+ sum = "h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=",
+ version = "v0.0.0-20230525234030-28d5490b6b19",
+)
+use_repo(
+ go_deps,
+ "com_github_golang_protobuf",
+ "org_golang_google_genproto",
+ "org_golang_google_genproto_googleapis_api",
+ "org_golang_google_genproto_googleapis_rpc",
+ "org_golang_google_grpc",
+ "org_golang_google_protobuf",
+)
17 changes: 17 additions & 0 deletions modules/cel-spec/0.14.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@cel-spec//...'
11 changes: 11 additions & 0 deletions modules/cel-spec/0.14.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"url": "https://github.com/google/cel-spec/archive/refs/tags/v0.14.0.tar.gz",
"integrity": "sha256-NXnJexNUhxT5BZ728wxSZNQ57+9LQ4525xgHCe/ZOms=",
"strip_prefix": "cel-spec-0.14.0",
"patches": {
"extensions_dot_bzl.patch": "sha256-AOxL4MTXuJw/6yNZ2URaJo1iosZxs7OeCmbTr/kZMqQ=",
"googleapis_ext_dot_blz.patch": "sha256-aV5uYSWn8jqV4nX813Frqh+OIpmpyP9p8/nK9MRV2rk=",
"module_dot_bazel.patch": "sha256-RfBZIc5ic+sbNJQ5Zw6wRgGfF/DHlcNNAGtRvrepxH4="
},
"patch_strip": 1
}
16 changes: 16 additions & 0 deletions modules/cel-spec/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/google/cel-spec",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:google/cel-spec"
],
"versions": [
"0.14.0"
],
"yanked_versions": {}
}

0 comments on commit 6382cd7

Please sign in to comment.