go: patching it to get the nixos cacert bundle taken just fine
This commit is contained in:
parent
3d2e1508ee
commit
6655bc783e
15
pkgs/development/compilers/go/cacert.patch
Normal file
15
pkgs/development/compilers/go/cacert.patch
Normal file
@ -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) {
|
@ -44,6 +44,7 @@ stdenv.mkDerivation {
|
|||||||
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
patches = [ ./cacert.patch ];
|
||||||
|
|
||||||
GOOS = "linux";
|
GOOS = "linux";
|
||||||
GOARCH = if (stdenv.system == "i686-linux") then "386"
|
GOARCH = if (stdenv.system == "i686-linux") then "386"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user