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, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2018, 2019 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 "0g988zqm45sj1hlhhz4il5z4dpi5dl74hzjwzl4md37a09iaqnx6"))))
53 (build-system gnu-build-system)
54 (outputs '("out" "bin"))
56 ;; This skips some of the tests which fail on armhf and aarch64.
57 '(#:configure-flags '("--disable-libevent-regress")))
59 `(("python" ,python-wrapper))) ;for 'event_rpcgen.py'
62 (home-page "https://libevent.org/")
63 (synopsis "Event notification library")
65 "The libevent API provides a mechanism to execute a callback
66 function when a specific event occurs on a file descriptor or after a
67 timeout has been reached. Furthermore, libevent also support callbacks
68 due to signals or regular timeouts.
70 libevent is meant to replace the event loop found in event driven
71 network servers. An application just needs to call event_dispatch() and
72 then add or remove events dynamically without having to change the event
82 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
87 "0nkfqv69wfyy2bpga4d53iqydycpik8jp8x6q70353hia8mmv1gd"))))
88 (build-system gnu-build-system)
90 '(#:configure-flags '("--disable-static")))
91 (home-page "http://software.schmorp.de/pkg/libev.html")
92 (synopsis "Event loop loosely modelled after libevent")
94 "libev provides a full-featured and high-performance event loop that is
95 loosely modelled after libevent. It includes relative timers, absolute timers
96 with customized rescheduling, synchronous signals, process status change
97 events, event watchers dealing with the event loop itself, file watchers, and
98 limited support for fork events.")
100 (list bsd-2 gpl2+))))
108 (uri (string-append "https://dist.libuv.org/dist/v" version
109 "/libuv-v" version ".tar.gz"))
112 "0126mfmaw3s92dsga60sydgwjmzwg9cd36n127pydmisah17v50f"))))
113 (build-system gnu-build-system)
115 '(#:configure-flags '("--disable-static")
116 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
118 (native-inputs `(("autoconf" ,autoconf-wrapper)
119 ("automake" ,automake)
122 ;; libuv.pc is installed only when pkg-config is found.
123 ("pkg-config" ,pkg-config)))
124 (home-page "https://github.com/libuv/libuv")
125 (synopsis "Library for asynchronous I/O")
127 "libuv is a multi-platform support library with a focus on asynchronous
128 I/O. Among other things, it supports event loops via epoll, kqueue, and
129 similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
130 resolution, asynchronous file system operations, and threading primitives.")
132 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
133 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
134 (license (list expat cc-by4.0))))
136 (define-public perl-anyevent
138 (name "perl-anyevent")
142 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
143 "AnyEvent-" version ".tar.gz"))
146 "11drlj8r02czhjgzkb39axnr8zzyp506r043xfmf93q9kilfmgjh"))))
147 (build-system perl-build-system)
149 `(("perl-canary-stability" ,perl-canary-stability)))
151 `(("perl-async-interrupt" ,perl-async-interrupt)
153 ("perl-guard" ,perl-guard)
154 ("perl-json" ,perl-json)
155 ("perl-json-xs" ,perl-json-xs)
156 ("perl-net-ssleay" ,perl-net-ssleay)
157 ("perl-task-weaken" ,perl-task-weaken)))
158 (home-page "https://metacpan.org/release/AnyEvent")
160 "API for I/O, timer, signal, child process and completion events")
162 "This module allows using a variety of events without forcing module
163 authors to pick a specific event loop, and without noticeable overhead.
164 Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
165 @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
166 and Prima). It also comes with a very fast Pure Perl event loop that does
168 (license perl-license)))
170 (define-public perl-ev
176 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
180 "1jxlhnvrqim39977zwavjrcbdf9bifb46pwaxvm0s8klq121kjwb"))
181 (modules '((guix build utils)))
184 ;; Drop bundled libev.
185 (delete-file-recursively "libev")
187 (build-system perl-build-system)
190 (modify-phases %standard-phases
191 (add-after 'unpack 'unpack-libev
192 ;; This package requires the libev *sources* in order
193 ;; to build. Unpack system libev here...
194 (lambda* (#:key inputs #:allow-other-keys)
196 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
197 "-C" "./libev" "--strip-components=1"))))))
199 `(("libev-source" ,(package-source libev))
200 ("perl-canary-stability" ,perl-canary-stability)))
202 `(("perl-common-sense" ,perl-common-sense)))
203 (home-page "https://metacpan.org/release/EV")
204 (synopsis "Perl interface to libev")
206 "This module provides an interface to @code{libev}, a high performance
207 full-featured event loop. It can be used through the @code{AnyEvent} module
208 and still be faster than other event loops currently supported in Perl.")
209 (license perl-license)))
211 (define-public perl-rpc-epc-service
213 (name "perl-rpc-epc-service")
219 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
220 "v" version ".tar.gz"))
223 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
224 (build-system perl-build-system)
226 `(("perl-module-build" ,perl-module-build)
227 ("perl-test-simple" ,perl-test-simple)))
229 `(("perl-anyevent" ,perl-anyevent)
230 ("perl-data-sexpression" ,perl-data-sexpression)))
232 ;; Tests seem to fail because they try to start a server.
234 (home-page "https://metacpan.org/release/RPC-EPC-Service")
235 (synopsis "Asynchronous remote procedure stack")
236 (description "RPC::EPC::Service enables to connect the other process with
237 the S-expression protocol, like the Swank protocol of the SLIME.")
238 (license perl-license)))