gnu: Add iml.
[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>
0d3dbe3f 6;;; Copyright © 2017, 2019 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>
6b32a64a
LC
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 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)
ad8f8e75 32 #:use-module (guix build-system perl)
90f69c2e 33 #:use-module (gnu packages autotools)
ce0614dd 34 #:use-module (gnu packages base)
ad8f8e75 35 #:use-module (gnu packages perl)
2c114220 36 #:use-module (gnu packages perl-check)
0a030a9c 37 #:use-module (gnu packages pkg-config)
90f69c2e 38 #:use-module (gnu packages python)
0a030a9c 39 #:use-module (gnu packages tls))
6b32a64a
LC
40
41(define-public libevent
42 (package
43 (name "libevent")
0d3dbe3f 44 (version "2.1.10")
6b32a64a
LC
45 (source (origin
46 (method url-fetch)
47 (uri (string-append
66a30a3e
LC
48 "https://github.com/libevent/libevent/releases/download/release-"
49 version "-stable/libevent-" version "-stable.tar.gz"))
6b32a64a
LC
50 (sha256
51 (base32
0d3dbe3f 52 "1c25928gdv495clxk2v1d4gkr5py7ack4gx2n7d13frnld0syr78"))))
6b32a64a 53 (build-system gnu-build-system)
f0ef7b47
EF
54 (arguments
55 ;; This skips some of the tests which fail on armhf and aarch64.
56 '(#:configure-flags '("--disable-libevent-regress")))
6b32a64a 57 (inputs
e8fc1a0d
MB
58 `(("python" ,python-2))) ; for 'event_rpcgen.py'
59 (native-inputs
60 `(("which" ,which)))
1f889a59 61 (home-page "https://libevent.org/")
35b9e423 62 (synopsis "Event notification library")
6b32a64a
LC
63 (description
64 "The libevent API provides a mechanism to execute a callback
65function when a specific event occurs on a file descriptor or after a
66timeout has been reached. Furthermore, libevent also support callbacks
67due to signals or regular timeouts.
68
69libevent is meant to replace the event loop found in event driven
70network servers. An application just needs to call event_dispatch() and
71then add or remove events dynamically without having to change the event
72loop.")
73 (license bsd-3)))
90f69c2e 74
c808ca02
ED
75(define-public libev
76 (package
77 (name "libev")
1b0054bd 78 (version "4.24")
c808ca02
ED
79 (source (origin
80 (method url-fetch)
8fa16f63 81 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
c808ca02
ED
82 version
83 ".tar.gz"))
84 (sha256
85 (base32
1b0054bd 86 "08gqsza1czx0nf62nkk183jb0946yzjsymaacxbzdgcs8z9r6dcp"))))
c808ca02
ED
87 (build-system gnu-build-system)
88 (home-page "http://software.schmorp.de/pkg/libev.html")
89 (synopsis "Event loop loosely modelled after libevent")
90 (description
f76ff984
MW
91 "libev provides a full-featured and high-performance event loop that is
92loosely modelled after libevent. It includes relative timers, absolute timers
93with customized rescheduling, synchronous signals, process status change
94events, event watchers dealing with the event loop itself, file watchers, and
95limited support for fork events.")
c808ca02
ED
96 (license
97 (list bsd-2 gpl2+))))
98
90f69c2e
LC
99(define-public libuv
100 (package
101 (name "libuv")
f9960e25 102 (version "1.24.0")
90f69c2e
LC
103 (source (origin
104 (method url-fetch)
9b0215de
MB
105 (uri (string-append "https://dist.libuv.org/dist/v" version
106 "/libuv-v" version ".tar.gz"))
90f69c2e
LC
107 (sha256
108 (base32
f9960e25 109 "01pg0zsfr8mxlpipkbpw0dpsl26x5s966f5br7dx9ac29abk419q"))))
90f69c2e
LC
110 (build-system gnu-build-system)
111 (arguments
d64edd2c 112 '(;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
90f69c2e 113 #:tests? #f))
464f5447 114 (native-inputs `(("autoconf" ,autoconf-wrapper)
90f69c2e 115 ("automake" ,automake)
3246cc91 116 ("libtool" ,libtool)
90f69c2e
LC
117
118 ;; libuv.pc is installed only when pkg-config is found.
119 ("pkg-config" ,pkg-config)))
08f96396 120 (home-page "https://github.com/libuv/libuv")
90f69c2e
LC
121 (synopsis "Library for asynchronous I/O")
122 (description
123 "libuv is a multi-platform support library with a focus on asynchronous
124I/O. Among other things, it supports event loops via epoll, kqueue, and
125similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
126resolution, asynchronous file system operations, and threading primitives.")
127
128 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
8b4186e1
MB
129 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
130 (license (list expat cc-by4.0))))
ad8f8e75 131
0a030a9c
MB
132(define-public perl-anyevent
133 (package
134 (name "perl-anyevent")
17ab1e43 135 (version "7.15")
0a030a9c
MB
136 (source (origin
137 (method url-fetch)
138 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
139 "AnyEvent-" version ".tar.gz"))
140 (sha256
141 (base32
17ab1e43 142 "0m73r67ah9xmcwzxs50jxf8ncd8h71mi4wf2mvnqkxvibhrv478i"))))
0a030a9c
MB
143 (build-system perl-build-system)
144 (native-inputs
145 `(("perl-canary-stability" ,perl-canary-stability)))
146 (propagated-inputs
147 `(("perl-async-interrupt" ,perl-async-interrupt)
148 ("perl-ev" ,perl-ev)
149 ("perl-guard" ,perl-guard)
150 ("perl-json" ,perl-json)
151 ("perl-json-xs" ,perl-json-xs)
152 ("perl-net-ssleay" ,perl-net-ssleay)
153 ("perl-task-weaken" ,perl-task-weaken)))
9aba9b12 154 (home-page "https://metacpan.org/release/AnyEvent")
0a030a9c
MB
155 (synopsis
156 "API for I/O, timer, signal, child process and completion events")
157 (description
158 "This module allows using a variety of events without forcing module
d1e4ad1b 159authors to pick a specific event loop, and without noticeable overhead.
0a030a9c
MB
160Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
161@code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
162and Prima). It also comes with a very fast Pure Perl event loop that does
163not rely on XS.")
2f3108ad 164 (license perl-license)))
0a030a9c 165
ad8f8e75
MB
166(define-public perl-ev
167 (package
168 (name "perl-ev")
2c257dbf 169 (version "4.25")
ad8f8e75
MB
170 (source (origin
171 (method url-fetch)
172 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
173 version ".tar.gz"))
174 (sha256
175 (base32
2c257dbf 176 "0slw68zxrkfribf6lhggdhpay3mdng0nqxlglkwrk19myblchr9f"))
ad8f8e75
MB
177 (modules '((guix build utils)))
178 (snippet
179 '(begin
180 ;; Drop bundled libev.
181 (delete-file-recursively "libev")
182 #t))))
183 (build-system perl-build-system)
184 (arguments
185 '(#:phases
186 (modify-phases %standard-phases
187 (add-after 'unpack 'unpack-libev
188 ;; This package requires the libev *sources* in order
189 ;; to build. Unpack system libev here...
190 (lambda* (#:key inputs #:allow-other-keys)
191 (mkdir "./libev")
f16faf0f
TGR
192 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
193 "-C" "./libev" "--strip-components=1"))))))
ad8f8e75
MB
194 (native-inputs
195 `(("libev-source" ,(package-source libev))
196 ("perl-canary-stability" ,perl-canary-stability)))
197 (propagated-inputs
198 `(("perl-common-sense" ,perl-common-sense)))
9aba9b12 199 (home-page "https://metacpan.org/release/EV")
ad8f8e75
MB
200 (synopsis "Perl interface to libev")
201 (description
202 "This module provides an interface to @code{libev}, a high performance
203full-featured event loop. It can be used through the @code{AnyEvent} module
204and still be faster than other event loops currently supported in Perl.")
2f3108ad 205 (license perl-license)))
2c114220
PN
206
207(define-public perl-rpc-epc-service
208 (package
209 (name "perl-rpc-epc-service")
210 (version "0.0.11")
211 (source
212 (origin
213 (method url-fetch)
214 (uri (string-append
215 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
216 "v" version ".tar.gz"))
217 (sha256
218 (base32
219 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
220 (build-system perl-build-system)
221 (native-inputs
222 `(("perl-module-build" ,perl-module-build)
223 ("perl-test-simple" ,perl-test-simple)))
224 (propagated-inputs
225 `(("perl-anyevent" ,perl-anyevent)
226 ("perl-data-sexpression" ,perl-data-sexpression)))
227 (arguments
228 ;; Tests seem to fail because they try to start a server.
229 `(#:tests? #f))
230 (home-page "https://metacpan.org/release/RPC-EPC-Service")
231 (synopsis "Asynchronous remote procedure stack")
232 (description "RPC::EPC::Service enables to connect the other process with
233the S-expression protocol, like the Swank protocol of the SLIME.")
234 (license perl-license)))