gnu: mutt: Update to 1.9.5.
[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>
678dd8a5 6;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
79d95250 7;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
8a1716fe 8;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
fdcbe78b 9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
6b9105e5
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages curl)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
6b9105e5
AE
28 #:use-module (guix packages)
29 #:use-module (guix download)
8de9d532 30 #:use-module (guix git-download)
79d95250 31 #:use-module (guix utils)
6b9105e5 32 #:use-module (guix build-system gnu)
8de9d532 33 #:use-module (guix build-system go)
b6b29c77 34 #:use-module (gnu packages)
6b9105e5 35 #:use-module (gnu packages compression)
8de9d532 36 #:use-module (gnu packages golang)
6b9105e5
AE
37 #:use-module (gnu packages groff)
38 #:use-module (gnu packages gsasl)
39 #:use-module (gnu packages libidn)
40 #:use-module (gnu packages openldap)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages pkg-config)
c0e57fb8 43 #:use-module (gnu packages python)
a7fd7b68
AE
44 #:use-module (gnu packages ssh)
45 #:use-module (gnu packages tls))
6b9105e5
AE
46
47(define-public curl
48 (package
49 (name "curl")
da663457 50 (version "7.57.0")
9a02dcf3 51 (replacement curl-7.59.0)
6b9105e5
AE
52 (source (origin
53 (method url-fetch)
6588c283 54 (uri (string-append "https://curl.haxx.se/download/curl-"
e0afc09d 55 version ".tar.xz"))
6b9105e5
AE
56 (sha256
57 (base32
da663457 58 "0y3qbjjcxhcvm1yawp3spfssjbskv0g6gyzld6ckif5pf8ygvxpm"))))
6b9105e5 59 (build-system gnu-build-system)
9d9847e1
LC
60 (outputs '("out"
61 "doc")) ;1.2 MiB of man3 pages
6b9105e5 62 (inputs `(("gnutls" ,gnutls)
6b9105e5
AE
63 ("gss" ,gss)
64 ("libidn" ,libidn)
8d5ceb12 65 ("libssh2" ,libssh2)
6b9105e5 66 ("openldap" ,openldap)
6b9105e5 67 ("zlib" ,zlib)))
c4c4cc05
JD
68 (native-inputs
69 `(("perl" ,perl)
70 ;; to enable the --manual option and make test 1026 pass
71 ("groff" ,groff)
c0e57fb8
SHT
72 ("pkg-config" ,pkg-config)
73 ("python" ,python-2)))
dc138d6d
MB
74 (native-search-paths
75 ;; Note: This search path is respected by the `curl` command-line tool only.
76 ;; Ideally we would bake this into libcurl itself so other users can benefit,
77 ;; but it's not supported upstream due to thread safety concerns.
78 (list (search-path-specification
79 (variable "CURL_CA_BUNDLE")
80 (file-type 'regular)
81 (separator #f) ;single entry
82 (files '("etc/ssl/certs/ca-certificates.crt")))))
6b9105e5 83 (arguments
c0e57fb8
SHT
84 `(#:configure-flags '("--with-gnutls" "--with-gssapi")
85 ;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl
86 #:phases
5625adfc 87 (modify-phases %standard-phases
9d9847e1
LC
88 (add-after
89 'install 'move-man3-pages
90 (lambda* (#:key outputs #:allow-other-keys)
91 ;; Move section 3 man pages to "doc".
92 (let ((out (assoc-ref outputs "out"))
93 (doc (assoc-ref outputs "doc")))
94 (mkdir-p (string-append doc "/share/man"))
95 (rename-file (string-append out "/share/man/man3")
96 (string-append doc "/share/man/man3"))
97 #t)))
5625adfc
LC
98 (replace
99 'check
100 (lambda _
101 (substitute* "tests/runtests.pl"
102 (("/bin/sh") (which "sh")))
186de634 103
5625adfc
LC
104 ;; XXX FIXME: Test #1510 seems to work on some machines and not
105 ;; others, possibly based on the kernel version. It works on GuixSD
106 ;; on x86_64 with linux-libre-4.1, but fails on Hydra for both i686
107 ;; and x86_64 with the following error:
108 ;;
109 ;; test 1510...[HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)]
110 ;;
111 ;; 1510: output (log/stderr1510) FAILED:
a124bbd2
SB
112 ;; --- log/check-expected 2015-06-27 07:45:53.166720834 +0000
113 ;; +++ log/check-generated 2015-06-27 07:45:53.166720834 +0000
5625adfc
LC
114 ;; @@ -1,5 +1,5 @@
115 ;; * Connection #0 to host server1.example.com left intact[LF]
116 ;; * Connection #1 to host server2.example.com left intact[LF]
117 ;; * Connection #2 to host server3.example.com left intact[LF]
118 ;; -* Closing connection 0[LF]
119 ;; +* Closing connection 1[LF]
120 ;; * Connection #3 to host server4.example.com left intact[LF]
121 (delete-file "tests/data/test1510")
d2e3caba 122
5625adfc
LC
123 ;; The top-level "make check" does "make -C tests quiet-test", which
124 ;; is too quiet. Use the "test" target instead, which is more
125 ;; verbose.
971af38c 126 (zero? (system* "make" "-C" "tests" "test")))))))
35b9e423 127 (synopsis "Command line tool for transferring data with URL syntax")
6b9105e5
AE
128 (description
129 "curl is a command line tool for transferring data with URL syntax,
130supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP,
131LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
7c125ce0
AK
132curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP
133form based upload, proxies, cookies, file transfer resume, user+password
134authentication (Basic, Digest, NTLM, Negotiate, kerberos...), proxy
135tunneling, and so on.")
166191b3 136 (license (license:non-copyleft "file://COPYING"
7c125ce0 137 "See COPYING in the distribution."))
14251e30 138 (home-page "https://curl.haxx.se/")))
e1444afa 139
9a02dcf3 140(define-public curl-7.59.0
e1444afa
LF
141 (package
142 (inherit curl)
9a02dcf3 143 (version "7.59.0")
e1444afa
LF
144 (source
145 (origin
146 (method url-fetch)
147 (uri (string-append "https://curl.haxx.se/download/curl-"
79d95250 148 version ".tar.xz"))
e1444afa
LF
149 (sha256
150 (base32
9a02dcf3 151 "1z310hrjm2vmbcpkyp81dcmj9rk127zkjyawpy2pah0nz6yslkp4"))))))
8de9d532
LF
152
153(define-public kurly
154 (package
155 (name "kurly")
fdcbe78b 156 (version "1.2.1")
8de9d532
LF
157 (source (origin
158 (method git-fetch)
159 (uri (git-reference
160 (url "https://github.com/davidjpeacock/kurly.git")
161 (commit (string-append "v" version))))
c2c04cde 162 (file-name (git-file-name name version))
8de9d532
LF
163 (sha256
164 (base32
fdcbe78b 165 "01kp33gvzxmk6ipz7323wqwmbc90q2mwzsjig8rzpqsm4kji5hi6"))))
8de9d532
LF
166 (build-system go-build-system)
167 (arguments
4880fddd
LF
168 `(#:import-path "github.com/davidjpeacock/kurly"
169 #:install-source? #f
170 #:phases
171 (modify-phases %standard-phases
fdcbe78b
TGR
172 (add-after 'install 'install-documentation
173 (lambda* (#:key import-path outputs #:allow-other-keys)
174 (let* ((source (string-append "src/" import-path))
175 (out (assoc-ref outputs "out"))
176 (doc (string-append out "/share/doc/" ,name "-" ,version))
177 (man (string-append out "/share/man/man1")))
178 (with-directory-excursion source
179 (install-file "README.md" doc)
180 (mkdir-p man)
181 (copy-file "meta/kurly.man"
182 (string-append man "/kurly.1")))
4880fddd 183 #t))))))
8de9d532
LF
184 (inputs
185 `(("go-github-com-alsm-ioprogress" ,go-github-com-alsm-ioprogress)
186 ("go-github-com-aki237-nscjar" ,go-github-com-aki237-nscjar)
187 ("go-github-com-davidjpeacock-cli" ,go-github-com-davidjpeacock-cli)))
188 (synopsis "Command-line HTTP client")
189 (description "kurly is an alternative to the @code{curl} program written in
190Go. kurly is designed to operate in a similar manner to curl, with select
191features. Notably, kurly is not aiming for feature parity, but common flags and
192mechanisms particularly within the HTTP(S) realm are to be expected. kurly does
193not offer a replacement for libcurl.")
194 (home-page "https://github.com/davidjpeacock/kurly")
195 (license license:asl2.0)))