-
-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What nixpackages are required for this crate? #1663
Comments
I have zero experience with nix unfortunately. |
Ah, no worries. Can I leave this open in case anyone else knows? |
I have the same problem. When setting
And sure enough, the
Help would very much be appreciated. I think there's something else that's missing here. |
I'm also interested in getting this working. |
I've had some success with |
I, too, don't know about nix, but the error means |
This fixed the issue of Rust/pkg-config finding openssl for me: https://discourse.nixos.org/t/rust-openssl-woes/12340/3 |
I tried to build |
In my experience, this works with a combination of: rustPlatform.buildRustPackage {
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
# Needed to get openssl-sys to use pkg-config.
# Doesn't seem to like OpenSSL 3
OPENSSL_NO_VENDOR = 1;
buildInputs = lib.optionals stdenv.isLinux [ openssl_1_1 ];
...
} |
If anyone reading this issue has had the following issue: The solution I found was setting |
What seems to work for me was which I found with |
|
Here is what I needed to put in my # configuration.nix
{ pkgs, ... }: {
environment.systemPackages = [ pkgs.pkg-config ];
# set environment variable for fish shell
programs.fish.shellInit = "export PKG_CONFIG_PATH=${pkgs.openssl.dev}/lib/pkgconfig";
} |
For folks trying to build this crate with the |
environment.systemPackages = with pkgs; [
# ...
openssl
];
environment.variables = {
PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
};
|
Can confirm that setting this environment variable makes this crate compile on NixOS. |
I have tried
openssl
,openssl-dev
together but it still says it cannot find the directory of my installation. Any ideas?The text was updated successfully, but these errors were encountered: