third_party: add lib/pq, cockroachdb and cockroachdb test server

Change-Id: I0e32635fd9a9e063e53877213ff87ef6d881403d
Reviewed-on: https://review.monogon.dev/c/monogon/+/910
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/WORKSPACE b/WORKSPACE
index 42bd34d..d5e94fc 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -315,3 +315,22 @@
 load("//build/toolchain/musl-host-gcc:sysroot.bzl", "musl_sysroot_repositories")
 
 musl_sysroot_repositories()
+
+# CockroachDB binary used for tests.
+#
+# WARNING: Not distributed under an OSI certified license. Must only be used in
+# tests, not be redistributed!
+http_archive(
+    name = "cockroach",
+    urls = [
+        # TODO: select() to pick other host architectures.
+        "https://binaries.cockroachdb.com/cockroach-v22.1.6.linux-amd64.tgz",
+    ],
+    sha256 = "0821cff5770400fb94c8b6c2ab338d96f4114fbf2b3206bc8a6dcf62f9c0f4ea",
+    strip_prefix = "cockroach-v22.1.6.linux-amd64",
+    build_file_content = """
+exports_files([
+    "cockroach"
+])
+""",
+)