Skip to content

Fix nix-shell: move pkg-config to nativeBuildInputs#257

Merged
Builditluc merged 1 commit intoBuilditluc:mainfrom
Familex:fix/nix-shell
Dec 2, 2025
Merged

Fix nix-shell: move pkg-config to nativeBuildInputs#257
Builditluc merged 1 commit intoBuilditluc:mainfrom
Familex:fix/nix-shell

Conversation

@Familex
Copy link
Contributor

@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?

@Builditluc
Copy link
Owner

Hey @Familex, please excuse my late reply. Thank you for updating the shell.nix file.

why shell.nix was written that way

Well, tbh. the file worked for me at least until last year (could also be that I installed pkg-config on my host system).

@Builditluc Builditluc merged commit 87c6209 into Builditluc:main Dec 2, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in wiki-tui: Roadmap Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants