workspace(name = "skia") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//toolchain:build_toolchain.bzl", "build_cpp_toolchain") # See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#setup-instructions http_archive( name = "emsdk", sha256 = "7dc13d967705582e11ff62ae143425dbc63c38372f1a1b14f0cb681fda413714", strip_prefix = "emsdk-3.1.4/bazel", urls = [ "https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.4.tar.gz", "https://storage.googleapis.com/skia-world-readable/bazel/7dc13d967705582e11ff62ae143425dbc63c38372f1a1b14f0cb681fda413714.tar.gz", ], ) load("@emsdk//:deps.bzl", emsdk_deps = "deps") # One of the deps here is build_bazel_rules_nodejs, currently version 4.4.1 # If we try to install it ourselves after this, it won't work. emsdk_deps() load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps") emsdk_emscripten_deps(emscripten_version = "3.1.4") build_cpp_toolchain( # Meant to run on amd64 linux and compile for amd64 linux. name = "clang_linux_amd64", ) http_archive( name = "bazel_skylib", sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", ], ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() http_archive( name = "rules_python", sha256 = "cd6730ed53a002c56ce4e2f396ba3b3be262fd7cb68339f0377a45e8227fe332", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz", "https://github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz", ], ) ####################################################################################### # Gazelle ####################################################################################### http_archive( name = "io_bazel_rules_go", sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", ], ) http_archive( name = "bazel_gazelle", sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", ], ) load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") load("//:go_repositories.bzl", "go_repositories") # gazelle:repository_macro go_repositories.bzl%go_repositories go_repositories() go_rules_dependencies() go_register_toolchains(version = "1.17.2") gazelle_dependencies(go_repository_default_config = "//:WORKSPACE.bazel") ################################################### # JavaScript / TypeScript rules and dependencies. # ################################################### # The npm_install rule runs anytime the package.json or package-lock.json file changes. It also # extracts any Bazel rules distributed in an npm package. load("@build_bazel_rules_nodejs//:index.bzl", "npm_install") # Manages the node_modules directory. npm_install( name = "npm", package_json = "//:package.json", package_lock_json = "//:package-lock.json", ) # io_bazel_rules_webtesting allows us to download browsers in a hermetic, repeatable way. This # currently includes Chromium and Firefox. Note that the version on this does not necessarily # match the version below of the browsers-X.Y.Z below that is available. http_archive( name = "io_bazel_rules_webtesting", sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a", urls = [ "https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz", "https://storage.googleapis.com/skia-world-readable/bazel/e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a.tar.gz", ], ) # https://github.com/bazelbuild/rules_webtesting/blob/e9cf17123068b1123c68219edf9b274bf057b9cc/web/versioned/browsers-0.3.3.bzl load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories") browser_repositories( chromium = True, firefox = True, )