openssl
is a split package (with multiple outputs). Read more about it there especially “using a split package”
The dir your are looking for is actually the attribute openssl.dev
in nix parlance.
Side comment: openssl
still points to v1.0.2. If you are starting a fresh project you might want to use openssl_1_1_0
:
nix-env -iA nixos.openssl_1_1_0