• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""A module defining the third party dependency OpenSSL
2
3The code here was picked up from the `rules_foreign_cc` openssl example
4https://github.com/bazelbuild/rules_foreign_cc/tree/0.5.1/examples/third_party/openssl
5"""
6
7load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
8load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
9
10def openssl_repositories():
11    maybe(
12        http_archive,
13        name = "openssl",
14        build_file = Label("//third_party/openssl:BUILD.openssl.bazel"),
15        sha256 = "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5",
16        strip_prefix = "openssl-1.1.1k",
17        urls = [
18            "https://mirror.bazel.build/www.openssl.org/source/openssl-1.1.1k.tar.gz",
19            "https://www.openssl.org/source/openssl-1.1.1k.tar.gz",
20            "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz",
21        ],
22    )
23
24    maybe(
25        http_archive,
26        name = "nasm_windows",
27        build_file = Label("//third_party/openssl:BUILD.nasm.bazel"),
28        sha256 = "f5c93c146f52b4f1664fa3ce6579f961a910e869ab0dae431bd871bdd2584ef2",
29        strip_prefix = "nasm-2.15.05",
30        urls = [
31            "https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip",
32            "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip",
33        ],
34    )
35
36    maybe(
37        http_archive,
38        name = "perl_windows",
39        build_file = Label("//third_party/openssl:BUILD.perl.bazel"),
40        sha256 = "aeb973da474f14210d3e1a1f942dcf779e2ae7e71e4c535e6c53ebabe632cc98",
41        urls = [
42            "https://mirror.bazel.build/strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-64bit.zip",
43            "https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-64bit.zip",
44        ],
45    )
46