fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
7b101e07
patching
1"""Dependencies for the `@rules_rust_examples//sys` package""" 2 3load ( "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" ) 4load ( "@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" ) 5load ( "//sys/basic/3rdparty/crates:defs.bzl" , basic_crate_repositories = "crate_repositories" ) 6load ( "//sys/complex/3rdparty/crates:defs.bzl" , complex_crate_repositories = "crate_repositories" ) 7load ( "//third_party/openssl:openssl_repositories.bzl" , "openssl_repositories" ) 8 9def sys_deps (): 10"""This macro loads dependencies for the `sys` crate examples 11 12Commonly `*-sys` crates are built on top of some existing library and 13will have a number of dependencies. The examples here use 14[crate_universe](https://bazelbuild.github.io/rules_rust/crate_universe.html) 15to gather these dependencies and make them avaialble in the workspace. 16""" 17 18# Required by `//sys/complex` 19openssl_repositories () 20 21basic_crate_repositories () 22complex_crate_repositories () 23 24maybe ( 25http_archive , 26name = "zlib" , 27build_file = Label ( "//sys/complex/3rdparty:BUILD.zlib.bazel" ), 28sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" , 29strip_prefix = "zlib-1.2.11" , 30urls = [ 31"https://zlib.net/zlib-1.2.11.tar.gz" , 32"https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.11.tar.gz" , 33], 34) 35 36maybe ( 37http_archive , 38name = "libgit2" , 39build_file = Label ( "//sys/complex/3rdparty:BUILD.libgit2.bazel" ), 40sha256 = "d25866a4ee275a64f65be2d9a663680a5cf1ed87b7ee4c534997562c828e500d" , 41# The version here should match the version used with the Rust crate `libgit2-sys` 42# https://github.com/rust-lang/git2-rs/tree/libgit2-sys-0.15.2+1.6.4/libgit2-sys 43strip_prefix = "libgit2-1.6.4" , 44urls = [ "https://github.com/libgit2/libgit2/archive/refs/tags/v1.6.4.tar.gz" ], 45)