gnu: r-curl: Fix patch to respect CURL_CA_BUNDLE.
authorRicardo Wurmus <rekado@elephly.net>
Fri, 27 Mar 2020 22:36:33 +0000 (23:36 +0100)
committerRicardo Wurmus <rekado@elephly.net>
Fri, 27 Mar 2020 22:38:31 +0000 (23:38 +0100)
Fixes <https://debbugs.gnu.org/40262>.

* gnu/packages/cran.scm (r-curl)[arguments]: Ensure CURLOPT_CAINFO actually
gets set.

gnu/packages/cran.scm

index 573630f..759b926 100644 (file)
@@ -677,7 +677,11 @@ LaTeX.")
                (("if \\(!grepl\\(\"mingw\".*")
                 "if (FALSE)\n"))
              (substitute* "src/handle.c"
-               (("#ifdef _WIN32") "#if 1"))
+               (("/\\* Only set" m)
+                (string-append "\
+const char *_ca_bundle = getenv(\"CURL_CA_BUNDLE\");
+if(_ca_bundle != NULL) { curl_easy_setopt(handle, CURLOPT_CAINFO, _ca_bundle); }
+" m)))
              #t)))))
     (inputs
      `(("libcurl" ,curl)