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