Skip to content

Commit

Permalink
fix(bazel): override spacemonkeygo/openssl BUILD file
Browse files Browse the repository at this point in the history
  • Loading branch information
nmeier committed Oct 10, 2019
1 parent 688a109 commit 43bd92c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
54 changes: 54 additions & 0 deletions bazel/com_github_spacemonkeygo_openssl.BUILD.bazel
@@ -0,0 +1,54 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

# gazelle:ignore

go_library(
name = "go_default_library",
srcs = [
"bio.go",
"build.go",
"cert.go",
"ciphers.go",
"ciphers_gcm.go",
"conn.go",
"ctx.go",
"dh.go",
"dhparam.go",
"digest.go",
"engine.go",
"fips.go",
"hmac.go",
"hostname.c",
"hostname.go",
"http.go",
"init.go",
"init_posix.go",
"init_windows.go",
"key.go",
"mapping.go",
"md4.go",
"md5.go",
"net.go",
"nid.go",
"pem.go",
"sha1.go",
"sha256.go",
"shim.c",
"shim.h",
"sni.c",
"ssl.go",
"tickets.go",
],
cgo = True,
clinkopts = [
"-lssl",
"-lcrypto",
],
importmap = "berty.tech/go/vendor/github.com/spacemonkeygo/openssl",
importpath = "github.com/spacemonkeygo/openssl",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/spacemonkeygo/openssl/utils:go_default_library",
"//vendor/github.com/spacemonkeygo/spacelog:go_default_library",
],
)
7 changes: 6 additions & 1 deletion go/bazel.make
Expand Up @@ -13,7 +13,12 @@ IBAZEL ?= $(shell which ibazel 2>/dev/null || echo ibazel)

SAMPLE_BUILD_FILE = pkg/bertyprotocol/BUILD.bazel

cmd/bertychat/BUILD.bazel $(SAMPLE_BUILD_FILE): $(BAZEL) WORKSPACE vendor
VENDORED_BUILD_FILES = vendor/github.com/spacemonkeygo/openssl/BUILD.bazel

vendor/github.com/spacemonkeygo/openssl/BUILD.bazel: $(abspath ../bazel/com_github_spacemonkeygo_openssl.BUILD.bazel) vendor
cp $< $@

cmd/bertychat/BUILD.bazel $(SAMPLE_BUILD_FILE): $(BAZEL) WORKSPACE vendor $(VENDORED_BUILD_FILES)
$(BAZEL) $(BAZEL_ARGS) run $(BAZEL_CMD_ARGS) //:gazelle

.PHONY: bazel.banner
Expand Down

0 comments on commit 43bd92c

Please sign in to comment.