Created
October 22, 2016 08:08
-
-
Save jmhodges/772daecb03ebeeba671d255ed27ddb41 to your computer and use it in GitHub Desktop.
a new_git_repository for go-sqlite3 at 7204887cf3a42df1cfaa5505dc3a3427f6dded8b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sqlite3 has CGO deps and the version of rules_go we are using at the time of | |
# this comment (but maybe this will be fixed in the future!) doesn't have a way | |
# to get a nice high-level new_go_repository working with cgo code. So, we hack it here. | |
new_git_repository( | |
name = "com_github_mattn_go_sqlite3", | |
remote = "https://github.com/mattn/go-sqlite3.git", | |
commit = "7204887cf3a42df1cfaa5505dc3a3427f6dded8b", | |
build_file_content = """ | |
load("@io_bazel_rules_go//go:def.bzl", "cgo_library", "go_library", "go_test", "go_prefix") | |
go_prefix("github.com/mattn/go-sqlite3") | |
cgo_library( | |
name = "cgo_default_library", | |
srcs = [ | |
"backup.go", | |
"callback.go", | |
"error.go", | |
"sqlite3.go", | |
"sqlite3_load_extension.go", | |
"sqlite3_other.go", | |
] + glob(["*.c","*.h"]), | |
) | |
go_library( | |
name = "go_default_library", | |
srcs = ["doc.go"], | |
library = "cgo_default_library", | |
visibility = ["//visibility:public"], | |
) | |
go_library( | |
name = "sqlite3_test", | |
srcs = ["sqlite3_test/sqltest.go"], | |
) | |
go_test( | |
name = "go_default_test", | |
srcs = glob(["*_test.go"]), | |
deps = [ | |
"sqlite3_test", | |
], | |
library = "go_default_library", | |
) | |
""" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment