From 9eced61d2adbb61ee8e0f446775728d032078dcb Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Tue, 12 Apr 2016 11:43:43 +0200 Subject: [PATCH] git: respect $SSL_CERT_FILE This allows git to work on systems without /etc/ssl/certs/ca-certificates.crt, such as OS X, instead of failing with "error setting certificate verify locations". --- .../version-management/git-and-tools/git/default.nix | 1 + .../git-and-tools/git/ssl-cert-file.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/git/ssl-cert-file.patch diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 4f41ffb916ef2..082a791a69c26 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { ./symlinks-in-bin.patch ./git-sh-i18n.patch ./ssh-path.patch + ./ssl-cert-file.patch ]; postPatch = '' diff --git a/pkgs/applications/version-management/git-and-tools/git/ssl-cert-file.patch b/pkgs/applications/version-management/git-and-tools/git/ssl-cert-file.patch new file mode 100644 index 0000000000000..bafd65e8c93e1 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git/ssl-cert-file.patch @@ -0,0 +1,11 @@ +diff -ru git-2.7.4-orig/http.c git-2.7.4/http.c +--- git-2.7.4-orig/http.c 2016-03-17 21:47:59.000000000 +0100 ++++ git-2.7.4/http.c 2016-04-12 11:38:33.187070848 +0200 +@@ -544,6 +544,7 @@ + #if LIBCURL_VERSION_NUM >= 0x070908 + set_from_env(&ssl_capath, "GIT_SSL_CAPATH"); + #endif ++ set_from_env(&ssl_cainfo, "SSL_CERT_FILE"); + set_from_env(&ssl_cainfo, "GIT_SSL_CAINFO"); + + set_from_env(&user_agent, "GIT_HTTP_USER_AGENT");