buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58071)
cacert already exposes NIX_SSL_CERT_FILE in its setupHook. Fetchers and builders are already setup to use this variable and there's no need to export them manually.
This commit is contained in:
parent
400b6032c8
commit
6d7d69ff3e
@ -36,7 +36,7 @@ let
|
||||
go-modules = go.stdenv.mkDerivation {
|
||||
name = "${name}-go-modules";
|
||||
|
||||
nativeBuildInputs = [ go git ];
|
||||
nativeBuildInputs = [ go git cacert ];
|
||||
|
||||
inherit (args) src;
|
||||
inherit (go) GOOS GOARCH;
|
||||
@ -45,16 +45,6 @@ let
|
||||
|
||||
GO111MODULE = "on";
|
||||
|
||||
# XXX: Add support for other fetchers, such as hg, bzr and alike.
|
||||
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
# Instruct Go where to find the cacert.
|
||||
# SSL_CERT_FILE is used by Linux machines.
|
||||
# NIX_SSL_CERT_FILE is used by Darwin machines based on
|
||||
# pkgs/development/compilers/go/ssl-cert-file-1.9.patch.
|
||||
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
|
||||
"GIT_PROXY_COMMAND" "SOCKS_SERVER"
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user