alexcrichton / openssl-src-rs

Source code and logic to build OpenSSL from source
Apache License 2.0
69 stars 114 forks source link

Fetch openssldir from env variable #162

Closed h7x4 closed 11 months ago

h7x4 commented 2 years ago

Resolves #161

alexcrichton commented 2 years ago

Instead of making this an env var can this be added as a configuration option on the builder?

DanielSidhion commented 11 months ago

As far as I understand, adding this as a configuration option on the builder would imply that every crate that uses this one would need to properly configure it, is that correct? This will still require extra effort to fix every crate that depends on this, because when building with nix (as per #161) there will never be anything in /usr/local/ssl.

I don't know how many crates depend on this, but I think using the env var aligns with what the openssl crate does, which would fix the issue.

I'm struggling with this when trying to package a crate with vendored openssl with nix, and would like to help get this merged.

alexcrichton commented 11 months ago

AFAIK it's primarily openssl-sys, and maybe only openssl-sys, that depends on this crate. If the openssl crate has a convention for this environment variable then that's a good place to configure a builder-based option.

DanielSidhion commented 11 months ago

It looks like there are a few other dependents, but the number is low enough that I agree a builder-based option is best. @h7x4 would you still like to work on this? I can create another PR to work on a builder-based option as well.

alexcrichton commented 11 months ago

Addressed in https://github.com/alexcrichton/openssl-src-rs/pull/220

h7x4 commented 11 months ago

I'm sorry for being so unresponsive about this PR. Thank you for fixing it up @DanielSidhion