gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / libevent.scm
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>
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)
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))
40
41 (define-public libevent
42 (package
43 (name "libevent")
44 (version "2.1.11")
45 (source (origin
46 (method url-fetch)
47 (uri (string-append
48 "https://github.com/libevent/libevent/releases/download/release-"
49 version "-stable/libevent-" version "-stable.tar.gz"))
50 (sha256
51 (base32
52 "0g988zqm45sj1hlhhz4il5z4dpi5dl74hzjwzl4md37a09iaqnx6"))))
53 (build-system gnu-build-system)
54 (outputs '("out" "bin"))
55 (arguments
56 ;; This skips some of the tests which fail on armhf and aarch64.
57 '(#:configure-flags '("--disable-libevent-regress")))
58 (inputs
59 `(("python" ,python-wrapper))) ;for 'event_rpcgen.py'
60 (native-inputs
61 `(("which" ,which)))
62 (home-page "https://libevent.org/")
63 (synopsis "Event notification library")
64 (description
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.
69
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
73 loop.")
74 (license bsd-3)))
75
76 (define-public libev
77 (package
78 (name "libev")
79 (version "4.31")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
83 version
84 ".tar.gz"))
85 (sha256
86 (base32
87 "0nkfqv69wfyy2bpga4d53iqydycpik8jp8x6q70353hia8mmv1gd"))))
88 (build-system gnu-build-system)
89 (arguments
90 '(#:configure-flags '("--disable-static")))
91 (home-page "http://software.schmorp.de/pkg/libev.html")
92 (synopsis "Event loop loosely modelled after libevent")
93 (description
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.")
99 (license
100 (list bsd-2 gpl2+))))
101
102 (define-public libuv
103 (package
104 (name "libuv")
105 (version "1.35.0")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "https://dist.libuv.org/dist/v" version
109 "/libuv-v" version ".tar.gz"))
110 (sha256
111 (base32
112 "0126mfmaw3s92dsga60sydgwjmzwg9cd36n127pydmisah17v50f"))))
113 (build-system gnu-build-system)
114 (arguments
115 '(#:configure-flags '("--disable-static")
116 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
117 #:tests? #f))
118 ;; TODO replace with autoconf on core-updates
119 (native-inputs `(("autoconf" ,autoconf-wrapper)
120 ("automake" ,automake)
121 ("libtool" ,libtool)
122
123 ;; libuv.pc is installed only when pkg-config is found.
124 ("pkg-config" ,pkg-config)))
125 (home-page "https://github.com/libuv/libuv")
126 (synopsis "Library for asynchronous I/O")
127 (description
128 "libuv is a multi-platform support library with a focus on asynchronous
129 I/O. Among other things, it supports event loops via epoll, kqueue, and
130 similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
131 resolution, asynchronous file system operations, and threading primitives.")
132
133 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
134 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
135 (license (list expat cc-by4.0))))
136
137 (define-public libuv-for-node
138 ;; When upgrading Node, also upgrade this. Get the version from
139 ;; https://github.com/nodejs/node/blob/master/deps/uv/include/uv/version.h
140 (package
141 (inherit libuv)
142 (name "libuv")
143 (version "1.40.0")
144 (source (origin
145 (method url-fetch)
146 (uri (string-append "https://dist.libuv.org/dist/v" version
147 "/libuv-v" version ".tar.gz"))
148 (sha256
149 (base32
150 "1551k3ab27vbg9517l9b4iqbramwxdkwgpf53knas05cbfwhvab1"))))
151 (properties '((hidden? . #t)))))
152
153 (define-public perl-anyevent
154 (package
155 (name "perl-anyevent")
156 (version "7.17")
157 (source (origin
158 (method url-fetch)
159 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
160 "AnyEvent-" version ".tar.gz"))
161 (sha256
162 (base32
163 "11drlj8r02czhjgzkb39axnr8zzyp506r043xfmf93q9kilfmgjh"))))
164 (build-system perl-build-system)
165 (native-inputs
166 `(("perl-canary-stability" ,perl-canary-stability)))
167 (propagated-inputs
168 `(("perl-async-interrupt" ,perl-async-interrupt)
169 ("perl-ev" ,perl-ev)
170 ("perl-guard" ,perl-guard)
171 ("perl-json" ,perl-json)
172 ("perl-json-xs" ,perl-json-xs)
173 ("perl-net-ssleay" ,perl-net-ssleay)
174 ("perl-task-weaken" ,perl-task-weaken)))
175 (home-page "https://metacpan.org/release/AnyEvent")
176 (synopsis
177 "API for I/O, timer, signal, child process and completion events")
178 (description
179 "This module allows using a variety of events without forcing module
180 authors to pick a specific event loop, and without noticeable overhead.
181 Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
182 @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
183 and Prima). It also comes with a very fast Pure Perl event loop that does
184 not rely on XS.")
185 (license perl-license)))
186
187 (define-public perl-ev
188 (package
189 (name "perl-ev")
190 (version "4.31")
191 (source (origin
192 (method url-fetch)
193 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
194 version ".tar.gz"))
195 (sha256
196 (base32
197 "1jxlhnvrqim39977zwavjrcbdf9bifb46pwaxvm0s8klq121kjwb"))
198 (modules '((guix build utils)))
199 (snippet
200 '(begin
201 ;; Drop bundled libev.
202 (delete-file-recursively "libev")
203 #t))))
204 (build-system perl-build-system)
205 (arguments
206 '(#:phases
207 (modify-phases %standard-phases
208 (add-after 'unpack 'unpack-libev
209 ;; This package requires the libev *sources* in order
210 ;; to build. Unpack system libev here...
211 (lambda* (#:key inputs #:allow-other-keys)
212 (mkdir "./libev")
213 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
214 "-C" "./libev" "--strip-components=1"))))))
215 (native-inputs
216 `(("libev-source" ,(package-source libev))
217 ("perl-canary-stability" ,perl-canary-stability)))
218 (propagated-inputs
219 `(("perl-common-sense" ,perl-common-sense)))
220 (home-page "https://metacpan.org/release/EV")
221 (synopsis "Perl interface to libev")
222 (description
223 "This module provides an interface to @code{libev}, a high performance
224 full-featured event loop. It can be used through the @code{AnyEvent} module
225 and still be faster than other event loops currently supported in Perl.")
226 (license perl-license)))
227
228 (define-public perl-rpc-epc-service
229 (package
230 (name "perl-rpc-epc-service")
231 (version "0.0.11")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append
236 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
237 "v" version ".tar.gz"))
238 (sha256
239 (base32
240 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
241 (build-system perl-build-system)
242 (native-inputs
243 `(("perl-module-build" ,perl-module-build)
244 ("perl-test-simple" ,perl-test-simple)))
245 (propagated-inputs
246 `(("perl-anyevent" ,perl-anyevent)
247 ("perl-data-sexpression" ,perl-data-sexpression)))
248 (arguments
249 ;; Tests seem to fail because they try to start a server.
250 `(#:tests? #f))
251 (home-page "https://metacpan.org/release/RPC-EPC-Service")
252 (synopsis "Asynchronous remote procedure stack")
253 (description "RPC::EPC::Service enables to connect the other process with
254 the S-expression protocol, like the Swank protocol of the SLIME.")
255 (license perl-license)))