diff options
author | Yann Hodique <hodiquey@vmware.com> | 2017-05-07 14:09:24 -0700 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-05-08 13:14:46 +0200 |
commit | 19ebff1d95dae17cff81f8e9c133d82827317ed2 (patch) | |
tree | f461d354975a62589dd168b31a139b5cb351918d /pkgs/development | |
parent | 0a4cf89ae46d75077aa13929153fbff5b7432d4e (diff) | |
download | nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar.gz nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar.bz2 nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar.lz nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar.xz nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.tar.zst nixlib-19ebff1d95dae17cff81f8e9c133d82827317ed2.zip |
go: 1.7.4 -> 1.7.5
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/go/1.7.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/go/1.8.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/go/ssl-cert-file-1.7.patch | 78 | ||||
-rw-r--r-- | pkgs/development/compilers/go/ssl-cert-file.patch (renamed from pkgs/development/compilers/go/ssl-cert-file-1.8.patch) | 0 |
4 files changed, 4 insertions, 82 deletions
diff --git a/pkgs/development/compilers/go/1.7.nix b/pkgs/development/compilers/go/1.7.nix index 76f6141e2e34..7ecae36a4d5a 100644 --- a/pkgs/development/compilers/go/1.7.nix +++ b/pkgs/development/compilers/go/1.7.nix @@ -24,13 +24,13 @@ in stdenv.mkDerivation rec { name = "go-${version}"; - version = "1.7.4"; + version = "1.7.5"; src = fetchFromGitHub { owner = "golang"; repo = "go"; rev = "go${version}"; - sha256 = "1ks3xph20afrfp3vqs1sjnkpjb0lgxblv8706wa3iiyg7rka4axv"; + sha256 = "00radlwbrssn0x3naamb33cfx7ap2jv7s51bqr705nmn2j5yyblk"; }; # perl is used for testing go vet @@ -105,7 +105,7 @@ stdenv.mkDerivation rec { patches = [ ./remove-tools-1.7.patch - ./ssl-cert-file-1.7.patch + ./ssl-cert-file.patch ./creds-test.patch # This test checks for the wrong thing with recent tzdata. It's been fixed in master but the patch diff --git a/pkgs/development/compilers/go/1.8.nix b/pkgs/development/compilers/go/1.8.nix index 60125b2e22a9..48948430cb20 100644 --- a/pkgs/development/compilers/go/1.8.nix +++ b/pkgs/development/compilers/go/1.8.nix @@ -107,7 +107,7 @@ stdenv.mkDerivation rec { patches = [ ./remove-tools-1.8.patch - ./ssl-cert-file-1.8.patch + ./ssl-cert-file.patch ./creds-test.patch ./remove-test-pie-1.8.patch diff --git a/pkgs/development/compilers/go/ssl-cert-file-1.7.patch b/pkgs/development/compilers/go/ssl-cert-file-1.7.patch deleted file mode 100644 index e35ad9e4b759..000000000000 --- a/pkgs/development/compilers/go/ssl-cert-file-1.7.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go -index a4b33c7..9700b75 100644 ---- a/src/crypto/x509/root_cgo_darwin.go -+++ b/src/crypto/x509/root_cgo_darwin.go -@@ -151,11 +151,20 @@ int FetchPEMRoots(CFDataRef *pemRoots) { - import "C" - import ( - "errors" -+ "io/ioutil" -+ "os" - "unsafe" - ) - - func loadSystemRoots() (*CertPool, error) { - roots := NewCertPool() -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } - - var data C.CFDataRef = nil - err := C.FetchPEMRoots(&data) -diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go -index 59b303d..d4a34ac 100644 ---- a/src/crypto/x509/root_darwin.go -+++ b/src/crypto/x509/root_darwin.go -@@ -28,16 +28,25 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate - // The linker will not include these unused functions in binaries built with cgo enabled. - - func execSecurityRoots() (*CertPool, error) { -+ var ( -+ mu sync.Mutex -+ roots = NewCertPool() -+ ) -+ -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } -+ - cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", "/System/Library/Keychains/SystemRootCertificates.keychain") - data, err := cmd.Output() - if err != nil { - return nil, err - } - -- var ( -- mu sync.Mutex -- roots = NewCertPool() -- ) - add := func(cert *Certificate) { - mu.Lock() - defer mu.Unlock() -diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go -index 7bcb3d6..3986e1a 100644 ---- a/src/crypto/x509/root_unix.go -+++ b/src/crypto/x509/root_unix.go -@@ -24,6 +24,14 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate - - func loadSystemRoots() (*CertPool, error) { - roots := NewCertPool() -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } -+ - var firstErr error - for _, file := range certFiles { - data, err := ioutil.ReadFile(file) diff --git a/pkgs/development/compilers/go/ssl-cert-file-1.8.patch b/pkgs/development/compilers/go/ssl-cert-file.patch index 052655eed52c..052655eed52c 100644 --- a/pkgs/development/compilers/go/ssl-cert-file-1.8.patch +++ b/pkgs/development/compilers/go/ssl-cert-file.patch |