Nix-shell, C++ developer environments, custom libraries and pkg-config

@KernelPanic, well, I think that the --pure option is not what I’m missing. I do not have a problem that I see too much stuff within my nix-shell session. I’m also happy that I can do nix-shell -p libssh to get access to the libssh library in my build environment, and I like this modularity. What I am not happy with is the fact that Nix’s pkg-config wrapper doesn’t let me extend the list of places to look for the *.pc files via the standard $PKG_CONFIG_PATH env variable.

If I’m simultaneously working on libA, which needs OpenSSL, and projectB, which needs libA and libssh, then that’s a workflow where Nix is making my experience rather complicated. Of course I’m already starting my shell via nix-shell -p openssl libssh, but the problem is that I don’t know how to build my own libA within this nix-shell environment in a way that a subsequent call to pkg-config will find it. Once again, I need pkg-config to recognize and find openssl, libssh (both from Nixpkgs and enabled via nix-shell -p ...) and my libA that I just installed into my own location at the same time.