From 5e24b9e4ed4093c7803f837496c1825e57fbefac Mon Sep 17 00:00:00 2001 From: Andrew Dunham Date: Thu, 28 Nov 2019 13:39:20 -0800 Subject: [PATCH] buildBazelPackage: also set the SSL_CERT_FILE environment variable --- pkgs/build-support/build-bazel-package/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index be256b8e591b..d1a8983b2098 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -46,6 +46,9 @@ in stdenv.mkDerivation (fBuildAttrs // { export HOME="$NIX_BUILD_TOP" # This is needed for git_repository with https remotes export GIT_SSL_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt" + # This is needed for Bazel fetchers that are themselves programs (e.g. + # rules_go using the go toolchain) + export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt" ''; buildPhase = fFetchAttrs.buildPhase or ''