Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / curl.scm
CommitLineData
6b9105e5 1;;; GNU Guix --- Functional package management for GNU
8cab7580 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
74d72608 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
a55e2b22 4;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz>
9d9847e1 5;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
bdbb7c18 6;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
6b9105e5
AE
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages curl)
b5b73a82 24 #:use-module ((guix licenses) #:prefix license:)
6b9105e5
AE
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
b6b29c77 28 #:use-module (gnu packages)
6b9105e5 29 #:use-module (gnu packages compression)
6b9105e5
AE
30 #:use-module (gnu packages groff)
31 #:use-module (gnu packages gsasl)
32 #:use-module (gnu packages libidn)
33 #:use-module (gnu packages openldap)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
c0e57fb8 36 #:use-module (gnu packages python)
a7fd7b68
AE
37 #:use-module (gnu packages ssh)
38 #:use-module (gnu packages tls))
6b9105e5
AE
39
40(define-public curl
41 (package
42 (name "curl")
79355ae3 43 (version "7.50.3")
6b9105e5
AE
44 (source (origin
45 (method url-fetch)
6588c283 46 (uri (string-append "https://curl.haxx.se/download/curl-"
6b9105e5
AE
47 version ".tar.lzma"))
48 (sha256
49 (base32
79355ae3 50 "1spmk0345hq0sgpwxs8d410268lmg3wf1x9v23hxff7wxki5fm4c"))))
6b9105e5 51 (build-system gnu-build-system)
9d9847e1
LC
52 (outputs '("out"
53 "doc")) ;1.2 MiB of man3 pages
6b9105e5 54 (inputs `(("gnutls" ,gnutls)
6b9105e5
AE
55 ("gss" ,gss)
56 ("libidn" ,libidn)
8d5ceb12 57 ("libssh2" ,libssh2)
6b9105e5 58 ("openldap" ,openldap)
6b9105e5 59 ("zlib" ,zlib)))
c4c4cc05
JD
60 (native-inputs
61 `(("perl" ,perl)
62 ;; to enable the --manual option and make test 1026 pass
63 ("groff" ,groff)
c0e57fb8
SHT
64 ("pkg-config" ,pkg-config)
65 ("python" ,python-2)))
6b9105e5 66 (arguments
c0e57fb8
SHT
67 `(#:configure-flags '("--with-gnutls" "--with-gssapi")
68 ;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl
69 #:phases
5625adfc 70 (modify-phases %standard-phases
9d9847e1
LC
71 (add-after
72 'install 'move-man3-pages
73 (lambda* (#:key outputs #:allow-other-keys)
74 ;; Move section 3 man pages to "doc".
75 (let ((out (assoc-ref outputs "out"))
76 (doc (assoc-ref outputs "doc")))
77 (mkdir-p (string-append doc "/share/man"))
78 (rename-file (string-append out "/share/man/man3")
79 (string-append doc "/share/man/man3"))
80 #t)))
5625adfc
LC
81 (replace
82 'check
83 (lambda _
84 (substitute* "tests/runtests.pl"
85 (("/bin/sh") (which "sh")))
186de634 86
5625adfc
LC
87 ;; XXX FIXME: Test #1510 seems to work on some machines and not
88 ;; others, possibly based on the kernel version. It works on GuixSD
89 ;; on x86_64 with linux-libre-4.1, but fails on Hydra for both i686
90 ;; and x86_64 with the following error:
91 ;;
92 ;; test 1510...[HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)]
93 ;;
94 ;; 1510: output (log/stderr1510) FAILED:
a124bbd2
SB
95 ;; --- log/check-expected 2015-06-27 07:45:53.166720834 +0000
96 ;; +++ log/check-generated 2015-06-27 07:45:53.166720834 +0000
5625adfc
LC
97 ;; @@ -1,5 +1,5 @@
98 ;; * Connection #0 to host server1.example.com left intact[LF]
99 ;; * Connection #1 to host server2.example.com left intact[LF]
100 ;; * Connection #2 to host server3.example.com left intact[LF]
101 ;; -* Closing connection 0[LF]
102 ;; +* Closing connection 1[LF]
103 ;; * Connection #3 to host server4.example.com left intact[LF]
104 (delete-file "tests/data/test1510")
d2e3caba 105
5625adfc
LC
106 ;; The top-level "make check" does "make -C tests quiet-test", which
107 ;; is too quiet. Use the "test" target instead, which is more
108 ;; verbose.
109 (zero? (system* "make" "-C" "tests" "test")))))))
35b9e423 110 (synopsis "Command line tool for transferring data with URL syntax")
6b9105e5
AE
111 (description
112 "curl is a command line tool for transferring data with URL syntax,
113supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP,
114LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
7c125ce0
AK
115curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP
116form based upload, proxies, cookies, file transfer resume, user+password
117authentication (Basic, Digest, NTLM, Negotiate, kerberos...), proxy
118tunneling, and so on.")
166191b3 119 (license (license:non-copyleft "file://COPYING"
7c125ce0 120 "See COPYING in the distribution."))
6b9105e5 121 (home-page "http://curl.haxx.se/")))