Hey all, i am working in an enterprise environment where there is an tls intercepting proxy between the nix build host and the internet. I wanted to build a rust package with “buildRustPackage”, however i cannot get it to run through the proxy. On the host i tried to set every Environment variable to the prepared cacert package instead of the default one:
CURL_CA_BUNDLE
SSL_CERT_FILE
NIX_SSL_CERT_FILE
CARGO_HTTP_CAINFO
however everything seems to be ignored by buildRustPackage . Overriding cacert or even cargo via an overlay is not really an option for me as it would mean a mass rebuild.
Has anyone managed to work around this or found a good solution such as overriding the rust environment only?
EDIT: any chance for some documentation on how to handle restrictive networks, proxies and TLS intercepting proxies? Like which env vars to set, how to configure the nix-daemon, etc? I saw stdenv also has support for "GIT_PROXY_COMMAND" and "SOCKS_SERVER", i never knew!
@Sandro How did you make the fetcher read the cert? I’m trying to do something similiar in fetchCargoTarball but it seems that in the sandbox the fetcher can’t access anything. Could you please give me some hints? Thanks!
No, I mean that this fetcher is probably missing options to add the extra certificates or the tool is using it’s own ssl store and we need to add some flag to it. But I don’t know for sure because I didn’t look into it.