aboutsummaryrefslogtreecommitdiff
path: root/WORKSPACE
blob: 342cafd876ac38890c658ac147e737f817c5b3e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
workspace(name = "nugget_test_systemtestharness")

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

http_archive(
    name = "gtest",
    url = "https://github.com/google/googletest/archive/release-1.8.1.zip",
    sha256 = "927827c183d01734cc5cfef85e0ff3f5a92ffe6188e0d18e909c5efebf28a0c7",
    strip_prefix = "googletest-release-1.8.1",
)

http_archive(
    name = "com_google_protobuf",
    url = "https://github.com/google/protobuf/archive/v3.6.1.2.zip",
    strip_prefix = "protobuf-3.6.1.2",
    sha256 = "d6618d117698132dadf0f830b762315807dc424ba36ab9183f1f436008a2fdb6",
)

http_archive(
    name = "com_google_protobuf_cc",
    url = "https://github.com/google/protobuf/archive/v3.6.1.2.zip",
    strip_prefix = "protobuf-3.6.1.2",
    sha256 = "d6618d117698132dadf0f830b762315807dc424ba36ab9183f1f436008a2fdb6",
)

http_archive(
    name = "com_github_gflags_gflags",
    url = "https://github.com/gflags/gflags/archive/v2.2.1.zip",
    strip_prefix = "gflags-2.2.1",
    sha256 = "4e44b69e709c826734dbbbd5208f61888a2faf63f239d73d8ba0011b2dccc97a",
)

http_archive(
    name = "boringssl",
    url = "https://boringssl.googlesource.com/boringssl/+archive/74ffd81aa7ec3d0aa3d3d820dbeda934958ca81a.tar.gz",
    # branch master-with-bazel
)

new_local_repository(
    name = "nugget_thirdparty_libmpsse",
    path = "../../third_party/libmpsse/src",
    build_file_content = """
cc_library(
    name = "libmpsse",
    srcs = [
        "fast.c",
        "mpsse.c",
        "support.c",
    ],
    hdrs = [
        "config.h",
        "mpsse.h",
        "support.h",
    ],
    copts = [
        "-Wall",
        "-fPIC",
        "-fno-strict-aliasing",
        "-g",
        "-O2",
    ],
    defines = [
        "LIBFTDI1=0",
    ],
    linkopts = [
        "-lftdi",
    ],
    visibility = ["//visibility:public"],
)
""",
)

## This is the rule for when this repository is outside of repo.
# new_git_repository(
#     name = "ahdlc",
#     remote = "https://nugget-os.googlesource.com/third_party/ahdlc",
# )

## Use this when a subproject of repo.
new_local_repository(
    name = "nugget_thirdparty_ahdlc",
    path = "../../third_party/ahdlc",
    build_file_content = """
cc_library(
    name = "ahdlc",
    srcs = [
        "src/lib/crc_16.c",
        "src/lib/frame_layer.c",
    ],
    hdrs = [
        "src/lib/inc/crc_16.h",
        "src/lib/inc/frame_layer.h",
        "src/lib/inc/frame_layer_types.h",
    ],
    visibility = ["//visibility:public"],
)
""",
)

local_repository(
    name = "nugget_core_nugget",
    path = "../../core/nugget",
)

local_repository(
    name = "nugget_host_generic",
    path = "../../host/generic",
)

local_repository(
    name = "nugget_host_generic_libnos",
    path = "../../host/generic/libnos",
)

local_repository(
    name = "nugget_host_generic_libnos_datagram",
    path = "../../host/generic/libnos_datagram",
)

local_repository(
    name = "nugget_host_generic_libnos_transport",
    path = "../../host/generic/libnos_transport",
)

local_repository(
    name = "nugget_host_generic_libnos_generator",
    path = "../../host/generic/libnos/generator",
)

local_repository(
    name = "nugget_host_generic_nugget_proto",
    path = "../../host/generic/nugget/proto",
)

local_repository(
    name = "nugget_host_linux_citadel_libnos_datagram",
    path = "../../host/linux/citadel/libnos_datagram",
)

local_repository(
    name = "nugget_test_systemtestharness_tools",
    path = "tools",
)