Skip to content

Commit

Permalink
Updated examples using openssl to no longer assume a relative path to it
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Aug 9, 2021
1 parent 73f228f commit af3d4e0
Show file tree
Hide file tree
Showing 25 changed files with 207 additions and 244 deletions.
7 changes: 7 additions & 0 deletions examples/crate_universe/has_aliased_deps/BUILD.openssl.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ configure_make(
],
visibility = ["//visibility:public"],
)

filegroup(
name = "gen_dir",
srcs = [":openssl"],
output_group = "gen_dir",
visibility = ["//visibility:public"],
)
7 changes: 5 additions & 2 deletions examples/crate_universe/has_aliased_deps/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ def deps():
overrides = {
"openssl-sys": crate.override(
extra_build_script_env_vars = {
"OPENSSL_DIR": "../openssl/openssl",
"OPENSSL_DIR": "$(execpath @openssl//:gen_dir)",
},
extra_bazel_deps = {
"cfg(all())": ["@openssl//:openssl"],
},
extra_build_script_bazel_data_deps = {
"cfg(all())": ["@openssl//:openssl"],
"cfg(all())": [
"@openssl//:openssl",
"@openssl//:gen_dir",
],
},
),
},
Expand Down
70 changes: 32 additions & 38 deletions examples/sys/complex/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions examples/sys/complex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ rust_rules_workspace_name = "rules_rust"
package_aliases_dir = "raze"
default_gen_buildrs = true

[package.metadata.raze.crates.openssl-sys.'0.9.60']
build_data_dependencies = ["@openssl"]
additional_deps = ["@openssl"]
buildrs_additional_environment_variables = { OPENSSL_DIR="../openssl/openssl" }
[package.metadata.raze.crates.openssl-sys.'*']
# build.rs file: https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/build/main.rs
build_data_dependencies = [
"@openssl//:openssl",
"@openssl//:gen_dir",
]
data_attr = "[\"@openssl//:openssl\"]"
additional_deps = ["@openssl//:openssl"]
[package.metadata.raze.crates.openssl-sys.'*'.buildrs_additional_environment_variables]
OPENSSL_DIR="$(execpath @openssl//:gen_dir)"
OPENSSL_STATIC="1"

[package.metadata.raze.crates.libssh2-sys.'0.2.20']
build_data_dependencies = ["@openssl"]
Loading

0 comments on commit af3d4e0

Please sign in to comment.