workspace(name = "mediapipe")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# http_archive(
#     name = "bazel_skylib",
#     type = "tar.gz",
#     urls = [
#         "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
#         "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
#     ],
#     sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# )
# load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
# bazel_skylib_workspace()
# load("@bazel_skylib//lib:versions.bzl", "versions")
# versions.check(minimum_bazel_version = "3.7.2")

# ABSL cpp library lts_2020_09_23
# http_archive(
#     name = "com_google_absl",
#     urls = [
#         "https://github.com/abseil/abseil-cpp/archive/20200923.tar.gz",
#     ],
#     # Remove after https://github.com/abseil/abseil-cpp/issues/326 is solved.
#     patches = [
#         "@//third_party:com_google_absl_f863b622fe13612433fdf43f76547d5edda0c93001.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "abseil-cpp-20200923",
#     sha256 = "b3744a4f7a249d5eaf2309daad597631ce77ea62e0fc6abffbab4b4c3dc0fc08"
# )

http_archive(
    name = "rules_cc",
    strip_prefix = "rules_cc-main",
    urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"],
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_foreign_cc",
    sha256 = "e14a159c452a68a97a7c59fa458033cc91edb8224516295b047a95555140af5f",
    strip_prefix = "rules_foreign_cc-0.4.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.4.0.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/0.4.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

# http_archive(
#    name = "rules_foreign_cc",
#    strip_prefix = "rules_foreign_cc-0.4.0",
#    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.4.0.tar.gz",
# )

# load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")

# rules_foreign_cc_dependencies()

# This is used to select all contents of the archives for CMake-based packages to give CMake access to them.
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""

# GoogleTest/GoogleMock framework. Used by most unit-tests.
# Last updated 2020-06-30.
# http_archive(
#     name = "com_google_googletest",
#     urls = ["https://github.com/google/googletest/archive/aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e.zip"],
#     patches = [
#         # fix for https://github.com/google/googletest/issues/2817
#         "@//third_party:com_google_googletest_9d580ea80592189e6d44fa35bcf9cdea8bf620d6.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "googletest-aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e",
#     sha256 = "04a1751f94244307cebe695a69cc945f9387a80b0ef1af21394a490697c5c895",
# )

# Google Benchmark library.
# http_archive(
#     name = "com_google_benchmark",
#     urls = ["https://github.com/google/benchmark/archive/main.zip"],
#     strip_prefix = "benchmark-main",
#     build_file = "@//third_party:benchmark.BUILD",
# )

# gflags needed by glog
# http_archive(
#     name = "com_github_gflags_gflags",
#     strip_prefix = "gflags-2.2.2",
#     sha256 = "19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5",
#     url = "https://github.com/gflags/gflags/archive/v2.2.2.zip",
# )

# 2020-08-21
# http_archive(
#     name = "com_github_glog_glog",
#     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6",
#     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab",
#     urls = [
#         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip",
#     ],
# )
# http_archive(
#     name = "com_github_glog_glog_no_gflags",
#     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6",
#     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab",
#     build_file = "@//third_party:glog_no_gflags.BUILD",
#     urls = [
#         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip",
#     ],
#     patches = [
#         "@//third_party:com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff",
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

# easyexif
# http_archive(
#     name = "easyexif",
#     url = "https://github.com/mayanklahiri/easyexif/archive/master.zip",
#     strip_prefix = "easyexif-master",
#     build_file = "@//third_party:easyexif.BUILD",
# )

# libyuv
# http_archive(
#     name = "libyuv",
#     # Error: operand type mismatch for `vbroadcastss' caused by commit 8a13626e42f7fdcf3a6acbb0316760ee54cda7d8.
#     urls = ["https://chromium.googlesource.com/libyuv/libyuv/+archive/2525698acba9bf9b701ba6b4d9584291a1f62257.tar.gz"],
#     build_file = "@//third_party:libyuv.BUILD",
# )

# Note: protobuf-javalite is no longer released as a separate download, it's included in the main Java download.
# ...but the Java download is currently broken, so we use the "source" download.
# http_archive(
#     name = "com_google_protobuf_javalite",
#     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
#     strip_prefix = "protobuf-3.17.3",
#     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"],
# )

# http_archive(
#     name = "com_google_protobuf",
#     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
#     strip_prefix = "protobuf-3.17.3",
#     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"],
#     patches = [
#         "@//third_party:com_google_protobuf_fixes.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

http_archive(
    name = "com_google_audio_tools",
    strip_prefix = "multichannel-audio-tools-master",
    urls = ["https://github.com/google/multichannel-audio-tools/archive/master.zip"],
)

# 2020-07-09
http_archive(
    name = "pybind11_bazel",
    sha256 = "a5666d950c3344a8b0d3892a88dc6b55c8e0c78764f9294e806d69213c03f19d",
    strip_prefix = "pybind11_bazel-26973c0ff320cb4b39e45bc3e4297b82bc3a6c09",
    urls = ["https://github.com/pybind/pybind11_bazel/archive/26973c0ff320cb4b39e45bc3e4297b82bc3a6c09.zip"],
)

http_archive(
    name = "pybind11",
    urls = [
        # "https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.4.3.tar.gz",
        # "https://github.com/pybind/pybind11/archive/refs/tags/v2.4.3.tar.gz",
        "https://github.com/pybind/pybind11/archive/refs/tags/v2.7.0.tar.gz",
    ],
    # sha256 = "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d",
    sha256 = "6cd73b3d0bf3daf415b5f9b87ca8817cc2e2b64c275d65f9500250f9fee1677e",
    strip_prefix = "pybind11-2.7.0",
    build_file = "@pybind11_bazel//:pybind11.BUILD",
)

load("@pybind11_bazel//:python_configure.bzl", "python_configure")
python_configure(name = "local_config_python")

# http_archive(
#     name = "ceres_solver",
#     url = "https://github.com/ceres-solver/ceres-solver/archive/2.0.0.zip",
#     patches = [
#         "@//third_party:ceres_solver_compatibility_fixes.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "ceres-solver-2.0.0",
#     sha256 = "db12d37b4cebb26353ae5b7746c7985e00877baa8e7b12dc4d3a1512252fff3b"
# )

# http_archive(
#     name = "opencv",
#     build_file_content = all_content,
#     strip_prefix = "opencv-4.5.3",
#     urls = ["https://github.com/opencv/opencv/archive/4.5.3.tar.gz"],
# )


new_local_repository(
    name = "googltest",
    build_file = "@//third_party:com_google_googletest.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "benchmark",
    build_file = "@//third_party:com_google_benchmark.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "gflags",
    build_file = "@//third_party:com_google_gflags.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "glog",
    build_file = "@//third_party:com_google_glog.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "protobuf",
    build_file = "@//third_party:com_google_protobuf.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "abseil",
    build_file = "@//third_party:abseil.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_easyexif",
    build_file = "@//third_party:easyexif.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_yuv",
    build_file = "@//third_party:libyuv.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "ceres",
    build_file = "@//third_party:ceres.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_opencv",
    build_file = "@//third_party:opencv_linux.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_ffmpeg",
    build_file = "@//third_party:ffmpeg_linux.BUILD",
    path = "/usr/local",
)

# new_local_repository(
#    name = "macos_opencv",
#    build_file = "@//third_party:opencv_macos.BUILD",
#     path = "/usr/local/opt/opencv@3",
# )

# new_local_repository(
#     name = "macos_ffmpeg",
#     build_file = "@//third_party:ffmpeg_macos.BUILD",
#     path = "/usr/local/opt/ffmpeg",
# )

# new_local_repository(
#     name = "windows_opencv",
#     build_file = "@//third_party:opencv_windows.BUILD",
#     path = "C:\\opencv\\build",
# )

# http_archive(
#     name = "android_opencv",
#     build_file = "@//third_party:opencv_android.BUILD",
#     strip_prefix = "OpenCV-android-sdk",
#     type = "zip",
#     url = "https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip",
# )

# After OpenCV 3.2.0, the pre-compiled opencv2.framework has google protobuf symbols, which will
# trigger duplicate symbol errors in the linking stage of building a mediapipe ios app.
# To get a higher version of OpenCV for iOS, opencv2.framework needs to be built from source with
# '-DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF'.
# http_archive(
#     name = "ios_opencv",
#     sha256 = "7dd536d06f59e6e1156b546bd581523d8df92ce83440002885ec5abc06558de2",
#     build_file = "@//third_party:opencv_ios.BUILD",
#     type = "zip",
#     url = "https://github.com/opencv/opencv/releases/download/3.2.0/opencv-3.2.0-ios-framework.zip",
# )

http_archive(
    name = "stblib",
    strip_prefix = "stb-b42009b3b9d4ca35bc703f5310eedc74f584be58",
    sha256 = "13a99ad430e930907f5611325ec384168a958bf7610e63e60e2fd8e7b7379610",
    urls = ["https://github.com/nothings/stb/archive/b42009b3b9d4ca35bc703f5310eedc74f584be58.tar.gz"],
    build_file = "@//third_party:stblib.BUILD",
    patches = [
        "@//third_party:stb_image_impl.diff"
    ],
    patch_args = [
        "-p1",
    ],
)

# You may run setup_android.sh to install Android SDK and NDK.
# android_ndk_repository(
#     name = "androidndk",
# )

# android_sdk_repository(
#     name = "androidsdk",
# )

# iOS basic build deps.

# http_archive(
#     name = "build_bazel_rules_apple",
#     sha256 = "7a7afdd4869bb201c9352eed2daf37294d42b093579b70423490c1b4d4f6ce42",
#     url = "https://github.com/bazelbuild/rules_apple/releases/download/0.19.0/rules_apple.0.19.0.tar.gz",
#     patches = [
#         # Bypass checking ios unit test runner when building MP ios applications.
#         "@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

# load(
#     "@build_bazel_rules_apple//apple:repositories.bzl",
#     "apple_rules_dependencies",
# )

# apple_rules_dependencies()

# load(
#     "@build_bazel_rules_swift//swift:repositories.bzl",
#     "swift_rules_dependencies",
# )

# swift_rules_dependencies()

# http_archive(
#     name = "build_bazel_apple_support",
#     sha256 = "122ebf7fe7d1c8e938af6aeaee0efe788a3a2449ece5a8d6a428cb18d6f88033",
#     urls = [
#         "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz",
#         "https://github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz",
#     ],
# )

# load(
#     "@build_bazel_apple_support//lib:repositories.bzl",
#     "apple_support_dependencies",
# )

# apple_support_dependencies()

# More iOS deps.

# http_archive(
#     name = "google_toolbox_for_mac",
#     url = "https://github.com/google/google-toolbox-for-mac/archive/v2.2.1.zip",
#     sha256 = "e3ac053813c989a88703556df4dc4466e424e30d32108433ed6beaec76ba4fdc",
#     strip_prefix = "google-toolbox-for-mac-2.2.1",
#     build_file = "@//third_party:google_toolbox_for_mac.BUILD",
# )

# Maven dependencies.

RULES_JVM_EXTERNAL_TAG = "4.0"
RULES_JVM_EXTERNAL_SHA = "31701ad93dbfe544d597dbe62c9a1fdd76d81d8a9150c2bf1ecf928ecdf97169"

http_archive(
    name = "rules_jvm_external",
    strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
    sha256 = RULES_JVM_EXTERNAL_SHA,
    url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

# Important: there can only be one maven_install rule. Add new maven deps here.
maven_install(
    artifacts = [
        "androidx.concurrent:concurrent-futures:1.0.0-alpha03",
        "androidx.lifecycle:lifecycle-common:2.2.0",
        "androidx.annotation:annotation:aar:1.1.0",
        "androidx.appcompat:appcompat:aar:1.1.0-rc01",
        "androidx.camera:camera-core:1.0.0-beta10",
        "androidx.camera:camera-camera2:1.0.0-beta10",
        "androidx.camera:camera-lifecycle:1.0.0-beta10",
        "androidx.constraintlayout:constraintlayout:aar:1.1.3",
        "androidx.core:core:aar:1.1.0-rc03",
        "androidx.legacy:legacy-support-v4:aar:1.0.0",
        "androidx.recyclerview:recyclerview:aar:1.1.0-beta02",
        "androidx.test.espresso:espresso-core:3.1.1",
        "com.github.bumptech.glide:glide:4.11.0",
        "com.google.android.material:material:aar:1.0.0-rc01",
        "com.google.auto.value:auto-value:1.8.1",
        "com.google.auto.value:auto-value-annotations:1.8.1",
        "com.google.code.findbugs:jsr305:3.0.2",
        "com.google.flogger:flogger-system-backend:0.3.1",
        "com.google.flogger:flogger:0.3.1",
        "com.google.guava:guava:27.0.1-android",
        "com.google.guava:listenablefuture:1.0",
        "junit:junit:4.12",
        "org.hamcrest:hamcrest-library:1.3",
    ],
    repositories = [
        "https://maven.google.com",
        "https://dl.google.com/dl/android/maven2",
        "https://repo1.maven.org/maven2",
        "https://jcenter.bintray.com",
    ],
    fetch_sources = True,
    version_conflict_policy = "pinned",
)

# Needed by TensorFlow
# http_archive(
#     name = "io_bazel_rules_closure",
#     sha256 = "e0a111000aeed2051f29fcc7a3f83be3ad8c6c93c186e64beb1ad313f0c7f9f9",
#     strip_prefix = "rules_closure-cf1e44edb908e9616030cc83d085989b8e6cd6df",
#     urls = [
#         "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",
#         "https://github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",  # 2019-04-04
#     ],
# )

# Tensorflow repo should always go after the other external dependencies.
# 2021-06-07
# _TENSORFLOW_GIT_COMMIT = "7<PASSWORD>ec<PASSWORD>4<PASSWORD>2ec"
# _TENSORFLOW_SHA256 = "b6edd7f4039bfc19f3e77594ecff558ba620091d0dc48181484b3d9085026126"
# http_archive(
#     name = "org_tensorflow",
#     urls = [
#       "https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
#     ],
#     patches = [
#         "@//third_party:org_tensorflow_compatibility_fixes.diff",
#         "@//third_party:org_tensorflow_objc_cxx17.diff",
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT,
#     sha256 = _TENSORFLOW_SHA256,
# )

# load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
# tf_workspace3()
# load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
# tf_workspace2()

workspace(name = "mediapipe")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# http_archive(
#     name = "bazel_skylib",
#     type = "tar.gz",
#     urls = [
#         "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
#         "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
#     ],
#     sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
# )
# load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
# bazel_skylib_workspace()
# load("@bazel_skylib//lib:versions.bzl", "versions")
# versions.check(minimum_bazel_version = "3.7.2")

# ABSL cpp library lts_2020_09_23
# http_archive(
#     name = "com_google_absl",
#     urls = [
#         "https://github.com/abseil/abseil-cpp/archive/20200923.tar.gz",
#     ],
#     # Remove after https://github.com/abseil/abseil-cpp/issues/326 is solved.
#     patches = [
#         "@//third_party:com_google_absl_f863b622fe13612433fdf43f76547d5edda0c93001.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "abseil-cpp-20200923",
#     sha256 = "b3744a4f7a249d5eaf2309daad597631ce77ea62e0fc6abffbab4b4c3dc0fc08"
# )

http_archive(
    name = "rules_cc",
    strip_prefix = "rules_cc-main",
    urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"],
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_foreign_cc",
    sha256 = "e14a159c452a68a97a7c59fa458033cc91edb8224516295b047a95555140af5f",
    strip_prefix = "rules_foreign_cc-0.4.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.4.0.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/0.4.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

# http_archive(
#    name = "rules_foreign_cc",
#    strip_prefix = "rules_foreign_cc-0.4.0",
#    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.4.0.tar.gz",
# )

# load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")

# rules_foreign_cc_dependencies()

# This is used to select all contents of the archives for CMake-based packages to give CMake access to them.
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""

# GoogleTest/GoogleMock framework. Used by most unit-tests.
# Last updated 2020-06-30.
# http_archive(
#     name = "com_google_googletest",
#     urls = ["https://github.com/google/googletest/archive/aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e.zip"],
#     patches = [
#         # fix for https://github.com/google/googletest/issues/2817
#         "@//third_party:com_google_googletest_9d580ea80592189e6d44fa35bcf9cdea8bf620d6.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "googletest-aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e",
#     sha256 = "04a1751f94244307cebe695a69cc945f9387a80b0ef1af21394a490697c5c895",
# )

# Google Benchmark library.
# http_archive(
#     name = "com_google_benchmark",
#     urls = ["https://github.com/google/benchmark/archive/main.zip"],
#     strip_prefix = "benchmark-main",
#     build_file = "@//third_party:benchmark.BUILD",
# )

# gflags needed by glog
# http_archive(
#     name = "com_github_gflags_gflags",
#     strip_prefix = "gflags-2.2.2",
#     sha256 = "19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5",
#     url = "https://github.com/gflags/gflags/archive/v2.2.2.zip",
# )

# 2020-08-21
# http_archive(
#     name = "com_github_glog_glog",
#     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6",
#     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab",
#     urls = [
#         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip",
#     ],
# )
# http_archive(
#     name = "com_github_glog_glog_no_gflags",
#     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6",
#     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab",
#     build_file = "@//third_party:glog_no_gflags.BUILD",
#     urls = [
#         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip",
#     ],
#     patches = [
#         "@//third_party:com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff",
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

# easyexif
# http_archive(
#     name = "easyexif",
#     url = "https://github.com/mayanklahiri/easyexif/archive/master.zip",
#     strip_prefix = "easyexif-master",
#     build_file = "@//third_party:easyexif.BUILD",
# )

# libyuv
# http_archive(
#     name = "libyuv",
#     # Error: operand type mismatch for `vbroadcastss' caused by commit 8a13626e42f7fdcf3a6acbb0316760ee54cda7d8.
#     urls = ["https://chromium.googlesource.com/libyuv/libyuv/+archive/2525698acba9bf9b701ba6b4d9584291a1f62257.tar.gz"],
#     build_file = "@//third_party:libyuv.BUILD",
# )

# Note: protobuf-javalite is no longer released as a separate download, it's included in the main Java download.
# ...but the Java download is currently broken, so we use the "source" download.
# http_archive(
#     name = "com_google_protobuf_javalite",
#     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
#     strip_prefix = "protobuf-3.17.3",
#     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"],
# )

# http_archive(
#     name = "com_google_protobuf",
#     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
#     strip_prefix = "protobuf-3.17.3",
#     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"],
#     patches = [
#         "@//third_party:com_google_protobuf_fixes.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

http_archive(
    name = "com_google_audio_tools",
    strip_prefix = "multichannel-audio-tools-master",
    urls = ["https://github.com/google/multichannel-audio-tools/archive/master.zip"],
)

# 2020-07-09
http_archive(
    name = "pybind11_bazel",
    sha256 = "a5666d950c3344a8b0d3892a88dc6b55c8e0c78764f9294e806d69213c03f19d",
    strip_prefix = "pybind11_bazel-26973c0ff320cb4b39e45bc3e4297b82bc3a6c09",
    urls = ["https://github.com/pybind/pybind11_bazel/archive/26973c0ff320cb4b39e45bc3e4297b82bc3a6c09.zip"],
)

http_archive(
    name = "pybind11",
    urls = [
        # "https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.4.3.tar.gz",
        # "https://github.com/pybind/pybind11/archive/refs/tags/v2.4.3.tar.gz",
        "https://github.com/pybind/pybind11/archive/refs/tags/v2.7.0.tar.gz",
    ],
    # sha256 = "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d",
    sha256 = "6cd73b3d0bf3daf415b5f9b87ca8817cc2e2b64c275d65f9500250f9fee1677e",
    strip_prefix = "pybind11-2.7.0",
    build_file = "@pybind11_bazel//:pybind11.BUILD",
)

load("@pybind11_bazel//:python_configure.bzl", "python_configure")
python_configure(name = "local_config_python")

# http_archive(
#     name = "ceres_solver",
#     url = "https://github.com/ceres-solver/ceres-solver/archive/2.0.0.zip",
#     patches = [
#         "@//third_party:ceres_solver_compatibility_fixes.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "ceres-solver-2.0.0",
#     sha256 = "db12d37b4cebb26353ae5b7746c7985e00877baa8e7b12dc4d3a1512252fff3b"
# )

# http_archive(
#     name = "opencv",
#     build_file_content = all_content,
#     strip_prefix = "opencv-4.5.3",
#     urls = ["https://github.com/opencv/opencv/archive/4.5.3.tar.gz"],
# )


new_local_repository(
    name = "googltest",
    build_file = "@//third_party:com_google_googletest.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "benchmark",
    build_file = "@//third_party:com_google_benchmark.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "gflags",
    build_file = "@//third_party:com_google_gflags.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "glog",
    build_file = "@//third_party:com_google_glog.BUILD",
    path = "/usr",
)

new_local_repository(
    name = "protobuf",
    build_file = "@//third_party:com_google_protobuf.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "abseil",
    build_file = "@//third_party:abseil.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_easyexif",
    build_file = "@//third_party:easyexif.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_yuv",
    build_file = "@//third_party:libyuv.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "ceres",
    build_file = "@//third_party:ceres.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_opencv",
    build_file = "@//third_party:opencv_linux.BUILD",
    path = "/usr/local",
)

new_local_repository(
    name = "linux_ffmpeg",
    build_file = "@//third_party:ffmpeg_linux.BUILD",
    path = "/usr/local",
)

# new_local_repository(
#    name = "macos_opencv",
#    build_file = "@//third_party:opencv_macos.BUILD",
#     path = "/usr/local/opt/opencv@3",
# )

# new_local_repository(
#     name = "macos_ffmpeg",
#     build_file = "@//third_party:ffmpeg_macos.BUILD",
#     path = "/usr/local/opt/ffmpeg",
# )

# new_local_repository(
#     name = "windows_opencv",
#     build_file = "@//third_party:opencv_windows.BUILD",
#     path = "C:\\opencv\\build",
# )

# http_archive(
#     name = "android_opencv",
#     build_file = "@//third_party:opencv_android.BUILD",
#     strip_prefix = "OpenCV-android-sdk",
#     type = "zip",
#     url = "https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip",
# )

# After OpenCV 3.2.0, the pre-compiled opencv2.framework has google protobuf symbols, which will
# trigger duplicate symbol errors in the linking stage of building a mediapipe ios app.
# To get a higher version of OpenCV for iOS, opencv2.framework needs to be built from source with
# '-DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF'.
# http_archive(
#     name = "ios_opencv",
#     sha256 = "7dd536d06f59e6e1156b546bd581523d8df92ce83440002885ec5abc06558de2",
#     build_file = "@//third_party:opencv_ios.BUILD",
#     type = "zip",
#     url = "https://github.com/opencv/opencv/releases/download/3.2.0/opencv-3.2.0-ios-framework.zip",
# )

http_archive(
    name = "stblib",
    strip_prefix = "stb-b42009b3b9d4ca35bc703f5310eedc74f584be58",
    sha256 = "13a99ad430e930907f5611325ec384168a958bf7610e63e60e2fd8e7b7379610",
    urls = ["https://github.com/nothings/stb/archive/b42009b3b9d4ca35bc703f5310eedc74f584be58.tar.gz"],
    build_file = "@//third_party:stblib.BUILD",
    patches = [
        "@//third_party:stb_image_impl.diff"
    ],
    patch_args = [
        "-p1",
    ],
)

# You may run setup_android.sh to install Android SDK and NDK.
# android_ndk_repository(
#     name = "androidndk",
# )

# android_sdk_repository(
#     name = "androidsdk",
# )

# iOS basic build deps.

# http_archive(
#     name = "build_bazel_rules_apple",
#     sha256 = "7a7afdd4869bb201c9352eed2daf37294d42b093579b70423490c1b4d4f6ce42",
#     url = "https://github.com/bazelbuild/rules_apple/releases/download/0.19.0/rules_apple.0.19.0.tar.gz",
#     patches = [
#         # Bypass checking ios unit test runner when building MP ios applications.
#         "@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff"
#     ],
#     patch_args = [
#         "-p1",
#     ],
# )

# load(
#     "@build_bazel_rules_apple//apple:repositories.bzl",
#     "apple_rules_dependencies",
# )

# apple_rules_dependencies()

# load(
#     "@build_bazel_rules_swift//swift:repositories.bzl",
#     "swift_rules_dependencies",
# )

# swift_rules_dependencies()

# http_archive(
#     name = "build_bazel_apple_support",
#     sha256 = "122ebf7fe7d1c8e938af6aeaee0efe788a3a2449ece5a8d6a428cb18d6f88033",
#     urls = [
#         "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz",
#         "https://github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz",
#     ],
# )

# load(
#     "@build_bazel_apple_support//lib:repositories.bzl",
#     "apple_support_dependencies",
# )

# apple_support_dependencies()

# More iOS deps.

# http_archive(
#     name = "google_toolbox_for_mac",
#     url = "https://github.com/google/google-toolbox-for-mac/archive/v2.2.1.zip",
#     sha256 = "e3ac053813c989a88703556df4dc4466e424e30d32108433ed6beaec76ba4fdc",
#     strip_prefix = "google-toolbox-for-mac-2.2.1",
#     build_file = "@//third_party:google_toolbox_for_mac.BUILD",
# )

# Maven dependencies.

RULES_JVM_EXTERNAL_TAG = "4.0"
RULES_JVM_EXTERNAL_SHA = "31701ad93dbfe544d597dbe62c9a1fdd76d81d8a9150c2bf1ecf928ecdf97169"

http_archive(
    name = "rules_jvm_external",
    strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
    sha256 = RULES_JVM_EXTERNAL_SHA,
    url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

# Important: there can only be one maven_install rule. Add new maven deps here.
maven_install(
    artifacts = [
        "androidx.concurrent:concurrent-futures:1.0.0-alpha03",
        "androidx.lifecycle:lifecycle-common:2.2.0",
        "androidx.annotation:annotation:aar:1.1.0",
        "androidx.appcompat:appcompat:aar:1.1.0-rc01",
        "androidx.camera:camera-core:1.0.0-beta10",
        "androidx.camera:camera-camera2:1.0.0-beta10",
        "androidx.camera:camera-lifecycle:1.0.0-beta10",
        "androidx.constraintlayout:constraintlayout:aar:1.1.3",
        "androidx.core:core:aar:1.1.0-rc03",
        "androidx.legacy:legacy-support-v4:aar:1.0.0",
        "androidx.recyclerview:recyclerview:aar:1.1.0-beta02",
        "androidx.test.espresso:espresso-core:3.1.1",
        "com.github.bumptech.glide:glide:4.11.0",
        "com.google.android.material:material:aar:1.0.0-rc01",
        "com.google.auto.value:auto-value:1.8.1",
        "com.google.auto.value:auto-value-annotations:1.8.1",
        "com.google.code.findbugs:jsr305:3.0.2",
        "com.google.flogger:flogger-system-backend:0.3.1",
        "com.google.flogger:flogger:0.3.1",
        "com.google.guava:guava:27.0.1-android",
        "com.google.guava:listenablefuture:1.0",
        "junit:junit:4.12",
        "org.hamcrest:hamcrest-library:1.3",
    ],
    repositories = [
        "https://maven.google.com",
        "https://dl.google.com/dl/android/maven2",
        "https://repo1.maven.org/maven2",
        "https://jcenter.bintray.com",
    ],
    fetch_sources = True,
    version_conflict_policy = "pinned",
)

# Needed by TensorFlow
# http_archive(
#     name = "io_bazel_rules_closure",
#     sha256 = "e0a111000aeed2051f29fcc7a3f83be3ad8c6c93c186e64beb1ad313f0c7f9f9",
#     strip_prefix = "rules_closure-cf1e44edb908e9616030cc83d085989b8e6cd6df",
#     urls = [
#         "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",
#         "https://github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",  # 2019-04-04
#     ],
# )

# Tensorflow repo should always go after the other external dependencies.
# 2021-06-07
# _TENSORFLOW_GIT_COMMIT = "7<PASSWORD>ec<PASSWORD>4<PASSWORD>2ec"
# _TENSORFLOW_SHA256 = "b6edd7f4039bfc19f3e77594ecff558ba620091d0dc48181484b3d9085026126"
# http_archive(
#     name = "org_tensorflow",
#     urls = [
#       "https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
#     ],
#     patches = [
#         "@//third_party:org_tensorflow_compatibility_fixes.diff",
#         "@//third_party:org_tensorflow_objc_cxx17.diff",
#     ],
#     patch_args = [
#         "-p1",
#     ],
#     strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT,
#     sha256 = _TENSORFLOW_SHA256,
# )

# load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
# tf_workspace3()
# load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
# tf_workspace2()

# http_archive( #     name = "bazel_skylib", #     type = "tar.gz", #     urls = [ #         "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", #         "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", #     ], #     sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", # ) # load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") # bazel_skylib_workspace() # load("@bazel_skylib//lib:versions.bzl", "versions") # versions.check(minimum_bazel_version = "3.7.2") # ABSL cpp library lts_2020_09_23 # http_archive( #     name = "com_google_absl", #     urls = [ #         "https://github.com/abseil/abseil-cpp/archive/20200923.tar.gz", #     ], #     # Remove after https://github.com/abseil/abseil-cpp/issues/326 is solved. #     patches = [ #         "@//third_party:com_google_absl_f863b622fe13612433fdf43f76547d5edda0c93001.diff" #     ], #     patch_args = [ #         "-p1", #     ], #     strip_prefix = "abseil-cpp-20200923", #     sha256 = "b3744a4f7a249d5eaf2309daad597631ce77ea62e0fc6abffbab4b4c3dc0fc08" # ) # This sets up some common toolchains for building targets. For more details, please see # https://bazelbuild.github.io/rules_foreign_cc/0.4.0/flatten.html#rules_foreign_cc_dependencies # http_archive( #    name = "rules_foreign_cc", #    strip_prefix = "rules_foreign_cc-0.4.0", #    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.4.0.tar.gz", # ) # load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies") # rules_foreign_cc_dependencies() # This is used to select all contents of the archives for CMake-based packages to give CMake access to them. filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"]) # GoogleTest/GoogleMock framework. Used by most unit-tests. # Last updated 2020-06-30. # http_archive( #     name = "com_google_googletest", #     urls = ["https://github.com/google/googletest/archive/aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e.zip"], #     patches = [ #         # fix for https://github.com/google/googletest/issues/2817 #         "@//third_party:com_google_googletest_9d580ea80592189e6d44fa35bcf9cdea8bf620d6.diff" #     ], #     patch_args = [ #         "-p1", #     ], #     strip_prefix = "googletest-aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e", #     sha256 = "04a1751f94244307cebe695a69cc945f9387a80b0ef1af21394a490697c5c895", # ) # Google Benchmark library. # http_archive( #     name = "com_google_benchmark", #     urls = ["https://github.com/google/benchmark/archive/main.zip"], #     strip_prefix = "benchmark-main", #     build_file = "@//third_party:benchmark.BUILD", # ) # gflags needed by glog # http_archive( #     name = "com_github_gflags_gflags", #     strip_prefix = "gflags-2.2.2", #     sha256 = "19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5", #     url = "https://github.com/gflags/gflags/archive/v2.2.2.zip", # ) # 2020-08-21 # http_archive( #     name = "com_github_glog_glog", #     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6", #     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab", #     urls = [ #         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip", #     ], # ) # http_archive( #     name = "com_github_glog_glog_no_gflags", #     strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6", #     sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab", #     build_file = "@//third_party:glog_no_gflags.BUILD", #     urls = [ #         "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip", #     ], #     patches = [ #         "@//third_party:com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff", #     ], #     patch_args = [ #         "-p1", #     ], # ) # easyexif # http_archive( #     name = "easyexif", #     url = "https://github.com/mayanklahiri/easyexif/archive/master.zip", #     strip_prefix = "easyexif-master", #     build_file = "@//third_party:easyexif.BUILD", # ) # libyuv # http_archive( #     name = "libyuv", #     # Error: operand type mismatch for `vbroadcastss' caused by commit 8a13626e42f7fdcf3a6acbb0316760ee54cda7d8. #     urls = ["https://chromium.googlesource.com/libyuv/libyuv/+archive/2525698acba9bf9b701ba6b4d9584291a1f62257.tar.gz"], #     build_file = "@//third_party:libyuv.BUILD", # ) # Note: protobuf-javalite is no longer released as a separate download, it's included in the main Java download. # ...but the Java download is currently broken, so we use the "source" download. # http_archive( #     name = "com_google_protobuf_javalite", #     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db", #     strip_prefix = "protobuf-3.17.3", #     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"], # ) # http_archive( #     name = "com_google_protobuf", #     sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db", #     strip_prefix = "protobuf-3.17.3", #     urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"], #     patches = [ #         "@//third_party:com_google_protobuf_fixes.diff" #     ], #     patch_args = [ #         "-p1", #     ], # ) # 2020-07-09 # "https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.4.3.tar.gz", # "https://github.com/pybind/pybind11/archive/refs/tags/v2.4.3.tar.gz", # sha256 = "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d", # http_archive( #     name = "ceres_solver", #     url = "https://github.com/ceres-solver/ceres-solver/archive/2.0.0.zip", #     patches = [ #         "@//third_party:ceres_solver_compatibility_fixes.diff" #     ], #     patch_args = [ #         "-p1", #     ], #     strip_prefix = "ceres-solver-2.0.0", #     sha256 = "db12d37b4cebb26353ae5b7746c7985e00877baa8e7b12dc4d3a1512252fff3b" # ) # http_archive( #     name = "opencv", #     build_file_content = all_content, #     strip_prefix = "opencv-4.5.3", #     urls = ["https://github.com/opencv/opencv/archive/4.5.3.tar.gz"], # ) # new_local_repository( #    name = "macos_opencv", #    build_file = "@//third_party:opencv_macos.BUILD", #     path = "/usr/local/opt/opencv@3", # ) # new_local_repository( #     name = "macos_ffmpeg", #     build_file = "@//third_party:ffmpeg_macos.BUILD", #     path = "/usr/local/opt/ffmpeg", # ) # new_local_repository( #     name = "windows_opencv", #     build_file = "@//third_party:opencv_windows.BUILD", #     path = "C:\\opencv\\build", # ) # http_archive( #     name = "android_opencv", #     build_file = "@//third_party:opencv_android.BUILD", #     strip_prefix = "OpenCV-android-sdk", #     type = "zip", #     url = "https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip", # ) # After OpenCV 3.2.0, the pre-compiled opencv2.framework has google protobuf symbols, which will # trigger duplicate symbol errors in the linking stage of building a mediapipe ios app. # To get a higher version of OpenCV for iOS, opencv2.framework needs to be built from source with # '-DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF'. # http_archive( #     name = "ios_opencv", #     sha256 = "7dd536d06f59e6e1156b546bd581523d8df92ce83440002885ec5abc06558de2", #     build_file = "@//third_party:opencv_ios.BUILD", #     type = "zip", #     url = "https://github.com/opencv/opencv/releases/download/3.2.0/opencv-3.2.0-ios-framework.zip", # ) # You may run setup_android.sh to install Android SDK and NDK. # android_ndk_repository( #     name = "androidndk", # ) # android_sdk_repository( #     name = "androidsdk", # ) # iOS basic build deps. # http_archive( #     name = "build_bazel_rules_apple", #     sha256 = "7a7afdd4869bb201c9352eed2daf37294d42b093579b70423490c1b4d4f6ce42", #     url = "https://github.com/bazelbuild/rules_apple/releases/download/0.19.0/rules_apple.0.19.0.tar.gz", #     patches = [ #         # Bypass checking ios unit test runner when building MP ios applications. #         "@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff" #     ], #     patch_args = [ #         "-p1", #     ], # ) # load( #     "@build_bazel_rules_apple//apple:repositories.bzl", #     "apple_rules_dependencies", # ) # apple_rules_dependencies() # load( #     "@build_bazel_rules_swift//swift:repositories.bzl", #     "swift_rules_dependencies", # ) # swift_rules_dependencies() # http_archive( #     name = "build_bazel_apple_support", #     sha256 = "122ebf7fe7d1c8e938af6aeaee0efe788a3a2449ece5a8d6a428cb18d6f88033", #     urls = [ #         "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz", #         "https://github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz", #     ], # ) # load( #     "@build_bazel_apple_support//lib:repositories.bzl", #     "apple_support_dependencies", # ) # apple_support_dependencies() # More iOS deps. # http_archive( #     name = "google_toolbox_for_mac", #     url = "https://github.com/google/google-toolbox-for-mac/archive/v2.2.1.zip", #     sha256 = "e3ac053813c989a88703556df4dc4466e424e30d32108433ed6beaec76ba4fdc", #     strip_prefix = "google-toolbox-for-mac-2.2.1", #     build_file = "@//third_party:google_toolbox_for_mac.BUILD", # ) # Maven dependencies. # Important: there can only be one maven_install rule. Add new maven deps here. # Needed by TensorFlow # http_archive( #     name = "io_bazel_rules_closure", #     sha256 = "e0a111000aeed2051f29fcc7a3f83be3ad8c6c93c186e64beb1ad313f0c7f9f9", #     strip_prefix = "rules_closure-cf1e44edb908e9616030cc83d085989b8e6cd6df", #     urls = [ #         "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz", #         "https://github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",  # 2019-04-04 #     ], # ) # Tensorflow repo should always go after the other external dependencies. # 2021-06-07 # _TENSORFLOW_GIT_COMMIT = "7<PASSWORD>ec<PASSWORD>4<PASSWORD>2ec" # _TENSORFLOW_SHA256 = "b6edd7f4039bfc19f3e77594ecff558ba620091d0dc48181484b3d9085026126" # http_archive( #     name = "org_tensorflow", #     urls = [ #       "https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT, #     ], #     patches = [ #         "@//third_party:org_tensorflow_compatibility_fixes.diff", #         "@//third_party:org_tensorflow_objc_cxx17.diff", #     ], #     patch_args = [ #         "-p1", #     ], #     strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT, #     sha256 = _TENSORFLOW_SHA256, # ) # load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3") # tf_workspace3() # load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2") # tf_workspace2()