Skip to content

Conversation

@Familex
Copy link

@Familex Familex commented May 23, 2025

Cargo was throwing this error during build:

...
error: could not find system library 'openssl' required by the 'openssl-sys' crate

--- stderr
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl' not found

...

It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
could not be found. If you have OpenSSL installed you can likely fix this by
installing `pkg-config`.
...

I moved pkg-config from buildInputs to nativeBuildInputs, adding it to PATH.

That fixed the issue for me, but I don't understand why shell.nix was written that way.
@Builditluc, was pkg-config installed on your host system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant