Hi there,
I’m stuck while building a package that includes OpenSSL. The error message I get is:
error: failed to run custom build command for `openssl-sys v0.9.67`
Caused by:
process didn't exit successfully: `/Users/jost/Desktop/holochain/lair-keystore-client/target/release/build/openssl-sys-8609751769bb813c/build-script-main` (exit status: 101)
I’m running macOS on aarch64-darwin
.
Here’s the nix expression snippet with build inputs:
...
buildInputs = [
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
targets = [ "wasm32-unknown-unknown" ];
})
darwin.apple_sdk.frameworks.AppKit
# openssl.dev
];
# OPENSSL_INCLUDE_DIR = "/nix/store/83ggar88dd5fv8sf5wimww0w2fsgl6n1-openssl-1.1.1p-dev/include";
# OPENSSL_LIB_DIR = "/nix/store/83ggar88dd5fv8sf5wimww0w2fsgl6n1-openssl-1.1.1p-dev/lib";
...
The commented lines don’t make a difference, I’ve tried including openssl
and/or openssl.dev
, as well as pkg-config
, as well as setting those env vars manually - to no avail.
I’m able to cargo build
the binary successfully when I enter a nix-shell. But to build the package, nix-build
seems to use the equivalent of a --pure
shell, and when I build the binary from such a pure shell, I get the error.
So there must be something in my environment which enables the build, that isn’t present in the pure env. I haven’t been able to figure out what it is. There are no OPENSSL
env vars set anyway.
Searched all the websites in the world I believe. Can anyone help me out?