gnu: qtwebengine: Rename to qtwebengine-5.
[jackhill/guix/guix.git] / gnu / packages / libevent.scm
CommitLineData
6b32a64a 1;;; GNU Guix --- Functional package management for GNU
464f5447 2;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
512fc6db 3;;; Copyright © 2015, 2017 Mark H Weaver <mhw@netris.org>
c808ca02 4;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
73b8714f 5;;; Copyright © 2016 David Thompson <davet@gnu.org>
ae9cfc64 6;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
f0ef7b47 7;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
17ab1e43 8;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
2c114220 9;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
42772a2f 10;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
6b32a64a
LC
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages libevent)
28 #:use-module (gnu packages)
29 #:use-module (guix licenses)
30 #:use-module (guix packages)
31 #:use-module (guix download)
cd1cbb61 32 #:use-module (guix git-download)
6b32a64a 33 #:use-module (guix build-system gnu)
ad8f8e75 34 #:use-module (guix build-system perl)
90f69c2e 35 #:use-module (gnu packages autotools)
ce0614dd 36 #:use-module (gnu packages base)
ad8f8e75 37 #:use-module (gnu packages perl)
2c114220 38 #:use-module (gnu packages perl-check)
0a030a9c 39 #:use-module (gnu packages pkg-config)
90f69c2e 40 #:use-module (gnu packages python)
0a030a9c 41 #:use-module (gnu packages tls))
6b32a64a
LC
42
43(define-public libevent
44 (package
45 (name "libevent")
843cc80b 46 (version "2.1.12")
6b32a64a 47 (source (origin
cf3f7aa1
MB
48 (method url-fetch)
49 (uri (string-append
50 "https://github.com/libevent/libevent/releases/download/release-"
51 version "-stable/libevent-" version "-stable.tar.gz"))
52 (sha256
53 (base32
843cc80b 54 "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj"))))
6b32a64a 55 (build-system gnu-build-system)
6dde98c3 56 (outputs '("out" "bin"))
f0ef7b47 57 (arguments
cf3f7aa1 58 ;; This skips some of the tests which fail on armhf and aarch64.
0be0f249
DM
59 '(#:configure-flags '("--disable-libevent-regress"
60 "--disable-openssl")))
6b32a64a 61 (inputs
cf3f7aa1 62 `(("python" ,python-wrapper))) ;for 'event_rpcgen.py'
e8fc1a0d 63 (native-inputs
8394619b 64 (list which))
1f889a59 65 (home-page "https://libevent.org/")
35b9e423 66 (synopsis "Event notification library")
6b32a64a
LC
67 (description
68 "The libevent API provides a mechanism to execute a callback
69function when a specific event occurs on a file descriptor or after a
70timeout has been reached. Furthermore, libevent also support callbacks
71due to signals or regular timeouts.
72
73libevent is meant to replace the event loop found in event driven
74network servers. An application just needs to call event_dispatch() and
75then add or remove events dynamically without having to change the event
76loop.")
77 (license bsd-3)))
90f69c2e 78
c808ca02
ED
79(define-public libev
80 (package
81 (name "libev")
667374cf 82 (version "4.33")
c808ca02
ED
83 (source (origin
84 (method url-fetch)
8fa16f63 85 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
c808ca02
ED
86 version
87 ".tar.gz"))
88 (sha256
89 (base32
667374cf 90 "1sjs4324is7fp21an4aas2z4dwsvs6z4xwrmp72vwpq1s6wbfzjh"))))
c808ca02 91 (build-system gnu-build-system)
295eaeeb
MB
92 (arguments
93 '(#:configure-flags '("--disable-static")))
c808ca02
ED
94 (home-page "http://software.schmorp.de/pkg/libev.html")
95 (synopsis "Event loop loosely modelled after libevent")
96 (description
f76ff984
MW
97 "libev provides a full-featured and high-performance event loop that is
98loosely modelled after libevent. It includes relative timers, absolute timers
99with customized rescheduling, synchronous signals, process status change
100events, event watchers dealing with the event loop itself, file watchers, and
101limited support for fork events.")
c808ca02
ED
102 (license
103 (list bsd-2 gpl2+))))
104
90f69c2e
LC
105(define-public libuv
106 (package
107 (name "libuv")
11c20005 108 (version "1.41.1")
90f69c2e
LC
109 (source (origin
110 (method url-fetch)
9b0215de
MB
111 (uri (string-append "https://dist.libuv.org/dist/v" version
112 "/libuv-v" version ".tar.gz"))
90f69c2e
LC
113 (sha256
114 (base32
11c20005 115 "0zb818sjwnxn5yv3qvkxaprjf037yqmjipk5i3a8rg1q4izhrnv5"))))
90f69c2e
LC
116 (build-system gnu-build-system)
117 (arguments
f0136e4d
MB
118 '(#:configure-flags '("--disable-static")
119 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
90f69c2e 120 #:tests? #f))
8394619b
LC
121 (native-inputs (list autoconf automake libtool
122 ;; libuv.pc is installed only when pkg-config is found.
123 pkg-config))
08f96396 124 (home-page "https://github.com/libuv/libuv")
90f69c2e
LC
125 (synopsis "Library for asynchronous I/O")
126 (description
127 "libuv is a multi-platform support library with a focus on asynchronous
128I/O. Among other things, it supports event loops via epoll, kqueue, and
129similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
130resolution, asynchronous file system operations, and threading primitives.")
131
132 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
8b4186e1
MB
133 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
134 (license (list expat cc-by4.0))))
ad8f8e75 135
c39092c7
JL
136(define-public libuv-for-node
137 ;; When upgrading Node, also upgrade this. Get the version from
138 ;; https://github.com/nodejs/node/blob/master/deps/uv/include/uv/version.h
139 (package
140 (inherit libuv)
141 (name "libuv")
63915955 142 (version "1.42.0")
c39092c7
JL
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "https://dist.libuv.org/dist/v" version
146 "/libuv-v" version ".tar.gz"))
147 (sha256
148 (base32
63915955 149 "0wpb9pz3r8nksnrf4zbixj2kk9whr7abi45ydrwyv2js2ljrc4j3"))))
c39092c7
JL
150 (properties '((hidden? . #t)))))
151
cd1cbb61
LC
152(define-public libuv-julia
153 (let ((commit "fb3e3364c33ae48c827f6b103e05c3f0e78b79a9")
154 (revision "3"))
155 ;; When upgrading Julia, also upgrade this. Get the commit from
156 ;; https://github.com/JuliaLang/julia/blob/v1.6.1/deps/libuv.version
157 (package
158 (inherit libuv)
159 (name "libuv-julia")
160 (version (git-version "2.0.0" revision commit))
161 (source (origin
162 (method git-fetch)
163 (uri (git-reference
164 (url "https://github.com/JuliaLang/libuv")
165 (commit commit)))
166 (file-name (git-file-name name version))
167 (sha256
168 (base32
169 "1kqpn19d20aka30h6q5h8lnzyp0vw0xzgx0wm4w2r5j6yf76m2hr"))))
170 (home-page "https://github.com/JuliaLang/libuv")
171 (properties '((hidden? . #t))))))
172
42772a2f
LHGH
173(define-public libuv-for-luv
174 ;; When upgrading make-lua-luv, also upgrade this. Get the version from
175 ;; https://github.com/luvit/luv/blob/master/CMakeLists.txt
176 (package
177 (inherit libuv)
178 (name "libuv")
179 (version "1.43.0")
180 (source (origin
181 (method url-fetch)
182 (uri (string-append "https://dist.libuv.org/dist/v" version
183 "/libuv-v" version ".tar.gz"))
184 (sha256
185 (base32
186 "194kwq3jfj9s628kzkchdca534rikjw0xiyas0cjbphqmsvjpmwh"))))
187 (properties '((hidden? . #t)))))
188
0a030a9c
MB
189(define-public perl-anyevent
190 (package
191 (name "perl-anyevent")
4504d183 192 (version "7.17")
0a030a9c
MB
193 (source (origin
194 (method url-fetch)
195 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
196 "AnyEvent-" version ".tar.gz"))
197 (sha256
198 (base32
4504d183 199 "11drlj8r02czhjgzkb39axnr8zzyp506r043xfmf93q9kilfmgjh"))))
0a030a9c
MB
200 (build-system perl-build-system)
201 (native-inputs
8394619b 202 (list perl-canary-stability))
0a030a9c 203 (propagated-inputs
8394619b
LC
204 (list perl-async-interrupt
205 perl-ev
206 perl-guard
207 perl-json
208 perl-json-xs
209 perl-net-ssleay
210 perl-task-weaken))
9aba9b12 211 (home-page "https://metacpan.org/release/AnyEvent")
0a030a9c
MB
212 (synopsis
213 "API for I/O, timer, signal, child process and completion events")
214 (description
215 "This module allows using a variety of events without forcing module
d1e4ad1b 216authors to pick a specific event loop, and without noticeable overhead.
0a030a9c
MB
217Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
218@code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
219and Prima). It also comes with a very fast Pure Perl event loop that does
220not rely on XS.")
2f3108ad 221 (license perl-license)))
0a030a9c 222
ad8f8e75
MB
223(define-public perl-ev
224 (package
225 (name "perl-ev")
94cbae1b 226 (version "4.31")
ad8f8e75
MB
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
230 version ".tar.gz"))
231 (sha256
232 (base32
94cbae1b 233 "1jxlhnvrqim39977zwavjrcbdf9bifb46pwaxvm0s8klq121kjwb"))
ad8f8e75
MB
234 (modules '((guix build utils)))
235 (snippet
236 '(begin
237 ;; Drop bundled libev.
238 (delete-file-recursively "libev")
239 #t))))
240 (build-system perl-build-system)
241 (arguments
242 '(#:phases
243 (modify-phases %standard-phases
244 (add-after 'unpack 'unpack-libev
245 ;; This package requires the libev *sources* in order
246 ;; to build. Unpack system libev here...
247 (lambda* (#:key inputs #:allow-other-keys)
248 (mkdir "./libev")
f16faf0f
TGR
249 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
250 "-C" "./libev" "--strip-components=1"))))))
ad8f8e75
MB
251 (native-inputs
252 `(("libev-source" ,(package-source libev))
253 ("perl-canary-stability" ,perl-canary-stability)))
254 (propagated-inputs
8394619b 255 (list perl-common-sense))
9aba9b12 256 (home-page "https://metacpan.org/release/EV")
ad8f8e75
MB
257 (synopsis "Perl interface to libev")
258 (description
259 "This module provides an interface to @code{libev}, a high performance
260full-featured event loop. It can be used through the @code{AnyEvent} module
261and still be faster than other event loops currently supported in Perl.")
2f3108ad 262 (license perl-license)))
2c114220
PN
263
264(define-public perl-rpc-epc-service
265 (package
266 (name "perl-rpc-epc-service")
267 (version "0.0.11")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (string-append
272 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
273 "v" version ".tar.gz"))
274 (sha256
275 (base32
276 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
277 (build-system perl-build-system)
278 (native-inputs
8394619b 279 (list perl-module-build perl-test-simple))
2c114220 280 (propagated-inputs
8394619b 281 (list perl-anyevent perl-data-sexpression))
2c114220
PN
282 (arguments
283 ;; Tests seem to fail because they try to start a server.
284 `(#:tests? #f))
285 (home-page "https://metacpan.org/release/RPC-EPC-Service")
286 (synopsis "Asynchronous remote procedure stack")
287 (description "RPC::EPC::Service enables to connect the other process with
288the S-expression protocol, like the Swank protocol of the SLIME.")
289 (license perl-license)))