git.iko.soy/typeable/nixpkgs
on master help sign in
go: Respect $NIX_SSL_CERT_FILE
commitf36f21c650538dbecd6e4c723f601b8b43176ffb authorDaiderd Jordan <daiderd@gmail.com> dateSat 18 Mar 2017, 19:38 (10 years ago) parent8565047
4 files changed+10−10
pkgs/development/compilers/go/1.7.nix+2−2 pkgs/development/compilers/go/1.8.nix+2−2 pkgs/development/compilers/go/cacert-1.7.patch → pkgs/development/compilers/go/ssl-cert-file-1.7.patch+3−3 pkgs/development/compilers/go/cacert-1.8.patch → pkgs/development/compilers/go/ssl-cert-file-1.8.patch+3−3
pkgs/development/compilers/go/1.7.nix+2−2
@@ -105,7 +105,7 @@ stdenv.mkDerivation rec {
105105
106106 patches =
107107 [ ./remove-tools-1.7.patch
108− ./cacert-1.7.patch
108+ ./ssl-cert-file-1.7.patch
109109 ./creds-test.patch
110110
111111 # This test checks for the wrong thing with recent tzdata. It's been fixed in master but the patch
@@ -116,7 +116,7 @@ stdenv.mkDerivation rec {
116116 })
117117 ];
118118
119− SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
119+ NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
120120
121121 GOOS = if stdenv.isDarwin then "darwin" else "linux";
122122 GOARCH = if stdenv.isDarwin then "amd64"
pkgs/development/compilers/go/1.8.nix+2−2
@@ -107,7 +107,7 @@ stdenv.mkDerivation rec {
107107
108108 patches =
109109 [ ./remove-tools-1.8.patch
110− ./cacert-1.8.patch
110+ ./ssl-cert-file-1.8.patch
111111 ./creds-test.patch
112112 ./remove-test-pie-1.8.patch
113113
@@ -119,7 +119,7 @@ stdenv.mkDerivation rec {
119119 })
120120 ];
121121
122− SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
122+ NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
123123
124124 GOOS = if stdenv.isDarwin then "darwin" else "linux";
125125 GOARCH = if stdenv.isDarwin then "amd64"
pkgs/development/compilers/go/cacert-1.7.patch → pkgs/development/compilers/go/ssl-cert-file-1.7.patchrenamed+3−3
@@ -13,7 +13,7 @@ index a4b33c7..9700b75 100644
1313
1414 func loadSystemRoots() (*CertPool, error) {
1515 roots := NewCertPool()
16−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
16++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
1717+ data, err := ioutil.ReadFile(file)
1818+ if err == nil {
1919+ roots.AppendCertsFromPEM(data)
@@ -36,7 +36,7 @@ index 59b303d..d4a34ac 100644
3636+ roots = NewCertPool()
3737+ )
3838+
39−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
39++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
4040+ data, err := ioutil.ReadFile(file)
4141+ if err == nil {
4242+ roots.AppendCertsFromPEM(data)
@@ -65,7 +65,7 @@ index 7bcb3d6..3986e1a 100644
6565
6666 func loadSystemRoots() (*CertPool, error) {
6767 roots := NewCertPool()
68−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
68++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
6969+ data, err := ioutil.ReadFile(file)
7070+ if err == nil {
7171+ roots.AppendCertsFromPEM(data)
pkgs/development/compilers/go/cacert-1.8.patch → pkgs/development/compilers/go/ssl-cert-file-1.8.patchrenamed+3−3
@@ -13,7 +13,7 @@ index a4b33c7..9700b75 100644
1313
1414 func loadSystemRoots() (*CertPool, error) {
1515 roots := NewCertPool()
16−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
16++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
1717+ data, err := ioutil.ReadFile(file)
1818+ if err == nil {
1919+ roots.AppendCertsFromPEM(data)
@@ -43,7 +43,7 @@ index 66cdb5e..bb28036 100644
4343 numVerified int // number of execs of 'security verify-cert', for debug stats
4444 )
4545
46−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
46++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
4747+ data, err := ioutil.ReadFile(file)
4848+ if err == nil {
4949+ roots.AppendCertsFromPEM(data)
@@ -67,7 +67,7 @@ index 7bcb3d6..3986e1a 100644
6767
6868 func loadSystemRoots() (*CertPool, error) {
6969 roots := NewCertPool()
70−+ if file := os.Getenv("SSL_CERT_FILE"); file != "" {
70++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
7171+ data, err := ioutil.ReadFile(file)
7272+ if err == nil {
7373+ roots.AppendCertsFromPEM(data)