summary refs log tree commit diff
path: root/pkgs/development/compilers/go/cacert.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/go/cacert.patch')
-rw-r--r--pkgs/development/compilers/go/cacert.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/compilers/go/cacert.patch b/pkgs/development/compilers/go/cacert.patch
new file mode 100644
index 000000000000..42a44313835f
--- /dev/null
+++ b/pkgs/development/compilers/go/cacert.patch
@@ -0,0 +1,15 @@
+Go comes with hardcoded cacert. We add the usual in NixOS,
+for easier NixOS life.
+
+diff --git a/src/pkg/crypto/x509/root_unix.go b/src/pkg/crypto/x509/root_unix.go
+index 76e79f4..6ef1dd3 100644
+--- a/src/pkg/crypto/x509/root_unix.go
++++ b/src/pkg/crypto/x509/root_unix.go
+@@ -15,6 +15,7 @@ var certFiles = []string{
+ 	"/etc/ssl/ca-bundle.pem",                 // OpenSUSE
+ 	"/etc/ssl/cert.pem",                      // OpenBSD
+ 	"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD
++	"/etc/ssl/certs/ca-bundle.crt",           // NixOS
+ }
+ 
+ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {