1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
5 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
26 (define-module (gnu packages libevent)
27 #:use-module (gnu packages)
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system perl)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages perl-check)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages tls))
41 (define-public libevent
48 "https://github.com/libevent/libevent/releases/download/release-"
49 version "-stable/libevent-" version "-stable.tar.gz"))
52 "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n"))
53 (patches (search-patches "libevent-2.1-dns-tests.patch"
54 ;; XXX: Try removing this for > 2.1.8.
55 ;; https://github.com/libevent/libevent/issues/452
56 "libevent-2.1-skip-failing-test.patch"))))
57 (build-system gnu-build-system)
59 ;; This skips some of the tests which fail on armhf and aarch64.
60 '(#:configure-flags '("--disable-libevent-regress")))
62 `(("python" ,python-2))) ; for 'event_rpcgen.py'
65 (home-page "http://libevent.org/")
66 (synopsis "Event notification library")
68 "The libevent API provides a mechanism to execute a callback
69 function when a specific event occurs on a file descriptor or after a
70 timeout has been reached. Furthermore, libevent also support callbacks
71 due to signals or regular timeouts.
73 libevent is meant to replace the event loop found in event driven
74 network servers. An application just needs to call event_dispatch() and
75 then add or remove events dynamically without having to change the event
79 (define-public libevent-2.0
86 "https://github.com/libevent/libevent/releases/download/release-"
87 version "-stable/libevent-" version "-stable.tar.gz"))
90 "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki"))
93 "libevent-dns-tests.patch"
94 "libevent-2.0-CVE-2016-10195.patch"
95 "libevent-2.0-CVE-2016-10196.patch"
96 "libevent-2.0-CVE-2016-10197.patch"
97 "libevent-2.0-evbuffer-add-use-last-with-datap.patch"))))
106 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
111 "08gqsza1czx0nf62nkk183jb0946yzjsymaacxbzdgcs8z9r6dcp"))))
112 (build-system gnu-build-system)
113 (home-page "http://software.schmorp.de/pkg/libev.html")
114 (synopsis "Event loop loosely modelled after libevent")
116 "libev provides a full-featured and high-performance event loop that is
117 loosely modelled after libevent. It includes relative timers, absolute timers
118 with customized rescheduling, synchronous signals, process status change
119 events, event watchers dealing with the event loop itself, file watchers, and
120 limited support for fork events.")
122 (list bsd-2 gpl2+))))
130 (uri (string-append "https://dist.libuv.org/dist/v" version
131 "/libuv-v" version ".tar.gz"))
134 "1rqlh0ag02fni8ildz3anc26z9vz69vwf5qmzsid2gvzzfkigy6a"))))
135 (build-system gnu-build-system)
137 '(;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
139 (native-inputs `(("autoconf" ,autoconf-wrapper)
140 ("automake" ,automake)
143 ;; libuv.pc is installed only when pkg-config is found.
144 ("pkg-config" ,pkg-config)))
145 (home-page "https://github.com/libuv/libuv")
146 (synopsis "Library for asynchronous I/O")
148 "libuv is a multi-platform support library with a focus on asynchronous
149 I/O. Among other things, it supports event loops via epoll, kqueue, and
150 similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
151 resolution, asynchronous file system operations, and threading primitives.")
153 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
154 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
155 (license (list expat cc-by4.0))))
157 ;; This version is required for Node versions < 10.
158 (define-public libuv-1.19
164 (uri (string-append "https://dist.libuv.org/dist/v" version
165 "/libuv-v" version ".tar.gz"))
168 "1msk9ac1z69whww88ibrwjqkd1apdla6l77cm2fwy5kigq0z5g3w"))))))
170 (define-public perl-anyevent
172 (name "perl-anyevent")
176 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
177 "AnyEvent-" version ".tar.gz"))
180 "0akxr9y0q9yjkl614x4clbiiayvh5a67y8gmci54plxs4p95i4sk"))))
181 (build-system perl-build-system)
183 `(("perl-canary-stability" ,perl-canary-stability)))
185 `(("perl-async-interrupt" ,perl-async-interrupt)
187 ("perl-guard" ,perl-guard)
188 ("perl-json" ,perl-json)
189 ("perl-json-xs" ,perl-json-xs)
190 ("perl-net-ssleay" ,perl-net-ssleay)
191 ("perl-task-weaken" ,perl-task-weaken)))
192 (home-page "https://metacpan.org/release/AnyEvent")
194 "API for I/O, timer, signal, child process and completion events")
196 "This module allows using a variety of events without forcing module
197 authors to pick a specific event loop, and without noticeable overhead.
198 Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
199 @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
200 and Prima). It also comes with a very fast Pure Perl event loop that does
202 (license perl-license)))
204 (define-public perl-ev
210 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
214 "14d9115q8f2ca2q3vbcalm55zqsbx8xjq5aj098laj9f9rrzirra"))
215 (modules '((guix build utils)))
218 ;; Drop bundled libev.
219 (delete-file-recursively "libev")
221 (build-system perl-build-system)
224 (modify-phases %standard-phases
225 (add-after 'unpack 'unpack-libev
226 ;; This package requires the libev *sources* in order
227 ;; to build. Unpack system libev here...
228 (lambda* (#:key inputs #:allow-other-keys)
230 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
231 "-C" "./libev" "--strip-components=1"))))))
233 `(("libev-source" ,(package-source libev))
234 ("perl-canary-stability" ,perl-canary-stability)))
236 `(("perl-common-sense" ,perl-common-sense)))
237 (home-page "https://metacpan.org/release/EV")
238 (synopsis "Perl interface to libev")
240 "This module provides an interface to @code{libev}, a high performance
241 full-featured event loop. It can be used through the @code{AnyEvent} module
242 and still be faster than other event loops currently supported in Perl.")
243 (license perl-license)))
245 (define-public perl-rpc-epc-service
247 (name "perl-rpc-epc-service")
253 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
254 "v" version ".tar.gz"))
257 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
258 (build-system perl-build-system)
260 `(("perl-module-build" ,perl-module-build)
261 ("perl-test-simple" ,perl-test-simple)))
263 `(("perl-anyevent" ,perl-anyevent)
264 ("perl-data-sexpression" ,perl-data-sexpression)))
266 ;; Tests seem to fail because they try to start a server.
268 (home-page "https://metacpan.org/release/RPC-EPC-Service")
269 (synopsis "Asynchronous remote procedure stack")
270 (description "RPC::EPC::Service enables to connect the other process with
271 the S-expression protocol, like the Swank protocol of the SLIME.")
272 (license perl-license)))