blob: 8531cb31243d2fe9ea329854c5a458ab94b84205 [file] [log] [blame]
Chris Frantz831c08b2022-05-11 15:43:41 -07001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
5load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
6
7def http_archive_or_local(**kwargs):
8 local = kwargs.pop("local", None)
9 if local:
10 native.local_repository(
11 name = kwargs.get("name"),
12 path = local,
13 )
14 else:
15 http_archive(**kwargs)