The openssl package does not install the pkg-config configuration. This means that, for example, the opam conf-openssl package cannot figure out how to use a nix-installed openssl.
I notice that /nix/store/ili5fbi77c2n0qy7px7kz02fbcmvpy71-openssl-1.1.1a-dev/ has the .pc files I need but I do not know how to put those in a place where opam can reliably use them.
nix-env -i openssl~/.nix-profile/lib/pkgconfig/openssl.pc (or libssl.pc or libcrypto.pc) - system: `"x86_64-linux"`
- host os: `Linux 4.18.0-041800rc6-generic, Ubuntu, 18.10 (Cosmic Cuttlefish)`
- multi-user?: `no`
- sandbox: `no`
- version: `nix-env (Nix) 2.0.4`
- channels(cmr): `"nixpkgs-19.03pre167188.4b6020faf58"`
- nixpkgs: `/home/cmr/.nix-defexpr/channels/nixpkgs`
Actually, I guess this isn't a supported usecase of nix, given https://nixos.wiki/wiki/FAQ/I_installed_a_library_but_my_compiler_is_not_finding_it._Why%3F ?
I think the opam package was just misguided about how to use nix and it never worked.
You can get openssl in your PKGCONFIG_PATH like this:
nix-shell -p pkgconfig openssl --run 'echo $PKG_CONFIG_PATH'
I guess in the context of opam, when using nix dependencies, it should always run inside some sort of nix-shell. thank you for the help, I am not a nix user, just trying to not break the opam package.
Most helpful comment
You can get openssl in your PKGCONFIG_PATH like this: