diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2012-08-03 22:55:10 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2012-08-05 20:50:54 +0200 |
commit | 6655bc783e2db1c29701a363c8886d44db101bf9 (patch) | |
tree | 051dcb646e77d638fc28d85da81bd050e9e96abb /pkgs/development/compilers | |
parent | 3d2e1508eed0845fbba57ed0bf134454249f1aae (diff) | |
download | nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar.gz nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar.bz2 nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar.lz nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar.xz nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.tar.zst nixpkgs-6655bc783e2db1c29701a363c8886d44db101bf9.zip |
go: patching it to get the nixos cacert bundle taken just fine
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/go/cacert.patch | 15 | ||||
-rw-r--r-- | pkgs/development/compilers/go/default.nix | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/compilers/go/cacert.patch b/pkgs/development/compilers/go/cacert.patch new file mode 100644 index 00000000000..42a44313835 --- /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) { diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index a5b75ed9435..459ce6310bf 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation { sed -i '/TestHostname/areturn' src/pkg/os/os_test.go ''; + patches = [ ./cacert.patch ]; GOOS = "linux"; GOARCH = if (stdenv.system == "i686-linux") then "386" |