| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Bazel workspace for building the Fuchsia Workstation product. |
| |
| workspace(name = "workstation") |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| local_repository( |
| name = "rules_fuchsia", |
| path = "sdk-integration/bazel_rules_fuchsia", |
| ) |
| |
| load("@rules_fuchsia//fuchsia:deps.bzl", "rules_fuchsia_deps") |
| |
| rules_fuchsia_deps() |
| |
| load( |
| "@rules_fuchsia//fuchsia:workspace_setup.bzl", |
| "rules_fuchsia_workspace_setup", |
| ) |
| |
| rules_fuchsia_workspace_setup() |
| |
| load( |
| "@rules_fuchsia//fuchsia:deps.bzl", |
| "fuchsia_clang_repository", |
| "fuchsia_product_assembly_bundle", |
| "fuchsia_product_repository", |
| "fuchsia_sdk_repository", |
| ) |
| |
| fuchsia_sdk_repository( |
| name = "fuchsia_sdk", |
| cipd_tag = "version:7.20220406.0.1", |
| sha256 = { |
| "linux": "d7d68e0c30732a43427aa6083a4e613d932f26fd1774309745e5073581856813", |
| "mac": "a2ec9b80325453caffa03d70a588d41d8618b4da8c4f92a46698ef6c7acd472c", |
| }, |
| ) |
| |
| register_toolchains("@fuchsia_sdk//:fuchsia_toolchain_sdk") |
| |
| fuchsia_clang_repository( |
| name = "fuchsia_clang", |
| cipd_tag = "git_revision:c9e46219f38da5c3fbfe41012173dc893516826e", |
| sdk_root_label = "@fuchsia_sdk", |
| sha256 = { |
| "linux": "573ebb62fc5cd9d2357be630cc079fa97b028cd99e2e87132dcd8be31c425984", |
| "mac": "fb9e478d18f35d0a9bb186138a85cf7ef5f9078fbf432fc3ad8f0660b233b3b4", |
| }, |
| ) |
| |
| fuchsia_product_repository( |
| name = "workstation_external_packages", |
| lock_file = "@//:artifact_lock.json", |
| sdk_repository_name = "fuchsia_sdk", |
| ) |
| |
| # Example usage of fuchsia_product_assembly_bundle. |
| # Environment variables are not interpreted so you will need to |
| # manually replace ${FUCHSIA_DIR} below with the path to a build |
| # where `fx build build/assembly:legacy.tgz` has been built. |
| # |
| # BAZEL_FUCHSIA_SDK_ARCHIVE should also be set so that the SDK is retrivied |
| # from the same build. See the docs for fuchsia_sdk_repository for more |
| # information. |
| # |
| # fuchsia_product_assembly_bundle( |
| # name = "local_product_bundle", |
| # archive = "${FUCHSIA_DIR}/fuchsia/out/default/obj/build/assembly/legacy.tgz", |
| # config = "${FUCHSIA_DIR}/fuchsia/out/default/obj/build/assembly/legacy/assembly_config.json", |
| # ) |
| |
| # Flutter |
| load( |
| "@rules_fuchsia//flutter:deps.bzl", |
| "flutter_register_toolchains", |
| ) |
| |
| flutter_register_toolchains( |
| dart_tag = "git_revision:55c93c732da9eb3fcfd1c4dfa6e268b3263382e3", |
| flutter_tag = "git_revision:e886029bf4f874c52838eea3ec11190821ad766c", |
| ) |
| |
| # For the sync_flutter tool. |
| load("//tools/sync_flutter:deps.bzl", "sync_flutter_workspace_setup") |
| |
| sync_flutter_workspace_setup() |