Commit | Line | Data |
---|---|---|
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> |
e8fc1a0d | 6 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
f0ef7b47 | 7 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
6b32a64a LC |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages libevent) | |
25 | #:use-module (gnu packages) | |
26 | #:use-module (guix licenses) | |
27 | #:use-module (guix packages) | |
28 | #:use-module (guix download) | |
29 | #:use-module (guix build-system gnu) | |
ad8f8e75 | 30 | #:use-module (guix build-system perl) |
90f69c2e | 31 | #:use-module (gnu packages autotools) |
ce0614dd | 32 | #:use-module (gnu packages base) |
ad8f8e75 | 33 | #:use-module (gnu packages perl) |
0a030a9c | 34 | #:use-module (gnu packages pkg-config) |
90f69c2e | 35 | #:use-module (gnu packages python) |
0a030a9c | 36 | #:use-module (gnu packages tls)) |
6b32a64a LC |
37 | |
38 | (define-public libevent | |
39 | (package | |
40 | (name "libevent") | |
e8fc1a0d | 41 | (version "2.1.8") |
6b32a64a LC |
42 | (source (origin |
43 | (method url-fetch) | |
44 | (uri (string-append | |
66a30a3e LC |
45 | "https://github.com/libevent/libevent/releases/download/release-" |
46 | version "-stable/libevent-" version "-stable.tar.gz")) | |
6b32a64a LC |
47 | (sha256 |
48 | (base32 | |
e8fc1a0d | 49 | "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n")) |
fd05d7ec MB |
50 | (patches (search-patches "libevent-2.1-dns-tests.patch" |
51 | ;; XXX: Try removing this for > 2.1.8. | |
52 | ;; https://github.com/libevent/libevent/issues/452 | |
53 | "libevent-2.1-skip-failing-test.patch")))) | |
6b32a64a | 54 | (build-system gnu-build-system) |
f0ef7b47 EF |
55 | (arguments |
56 | ;; This skips some of the tests which fail on armhf and aarch64. | |
57 | '(#:configure-flags '("--disable-libevent-regress"))) | |
6b32a64a | 58 | (inputs |
e8fc1a0d MB |
59 | `(("python" ,python-2))) ; for 'event_rpcgen.py' |
60 | (native-inputs | |
61 | `(("which" ,which))) | |
6b32a64a | 62 | (home-page "http://libevent.org/") |
35b9e423 | 63 | (synopsis "Event notification library") |
6b32a64a LC |
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))) | |
90f69c2e | 75 | |
e8fc1a0d MB |
76 | (define-public libevent-2.0 |
77 | (package | |
78 | (inherit libevent) | |
79 | (version "2.0.22") | |
80 | (source (origin | |
512fc6db MW |
81 | (method url-fetch) |
82 | (uri (string-append | |
83 | "https://github.com/libevent/libevent/releases/download/release-" | |
84 | version "-stable/libevent-" version "-stable.tar.gz")) | |
85 | (sha256 | |
86 | (base32 | |
87 | "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki")) | |
88 | (patches | |
89 | (search-patches | |
90 | "libevent-dns-tests.patch" | |
f67337e2 MW |
91 | "libevent-2.0-CVE-2016-10195.patch" |
92 | "libevent-2.0-CVE-2016-10196.patch" | |
93 | "libevent-2.0-CVE-2016-10197.patch" | |
f0ef7b47 EF |
94 | "libevent-2.0-evbuffer-add-use-last-with-datap.patch")))) |
95 | (arguments '()))) | |
e8fc1a0d | 96 | |
c808ca02 ED |
97 | (define-public libev |
98 | (package | |
99 | (name "libev") | |
1b0054bd | 100 | (version "4.24") |
c808ca02 ED |
101 | (source (origin |
102 | (method url-fetch) | |
8fa16f63 | 103 | (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-" |
c808ca02 ED |
104 | version |
105 | ".tar.gz")) | |
106 | (sha256 | |
107 | (base32 | |
1b0054bd | 108 | "08gqsza1czx0nf62nkk183jb0946yzjsymaacxbzdgcs8z9r6dcp")))) |
c808ca02 ED |
109 | (build-system gnu-build-system) |
110 | (home-page "http://software.schmorp.de/pkg/libev.html") | |
111 | (synopsis "Event loop loosely modelled after libevent") | |
112 | (description | |
f76ff984 MW |
113 | "libev provides a full-featured and high-performance event loop that is |
114 | loosely modelled after libevent. It includes relative timers, absolute timers | |
115 | with customized rescheduling, synchronous signals, process status change | |
116 | events, event watchers dealing with the event loop itself, file watchers, and | |
117 | limited support for fork events.") | |
c808ca02 ED |
118 | (license |
119 | (list bsd-2 gpl2+)))) | |
120 | ||
90f69c2e LC |
121 | (define-public libuv |
122 | (package | |
123 | (name "libuv") | |
5e98d4dc | 124 | (version "1.19.2") |
90f69c2e LC |
125 | (source (origin |
126 | (method url-fetch) | |
9b0215de MB |
127 | (uri (string-append "https://dist.libuv.org/dist/v" version |
128 | "/libuv-v" version ".tar.gz")) | |
90f69c2e LC |
129 | (sha256 |
130 | (base32 | |
5e98d4dc | 131 | "1msk9ac1z69whww88ibrwjqkd1apdla6l77cm2fwy5kigq0z5g3w")))) |
90f69c2e LC |
132 | (build-system gnu-build-system) |
133 | (arguments | |
61bed157 MB |
134 | '(#:phases (modify-phases %standard-phases |
135 | (add-after 'unpack 'autogen | |
136 | (lambda _ | |
137 | ;; Fashionable people don't run 'make dist' these days, so | |
138 | ;; we need to do that ourselves. | |
c8b16de7 | 139 | (invoke "sh" "autogen.sh")))) |
90f69c2e LC |
140 | |
141 | ;; XXX: Some tests want /dev/tty, attempt to make connections, etc. | |
142 | #:tests? #f)) | |
464f5447 | 143 | (native-inputs `(("autoconf" ,autoconf-wrapper) |
90f69c2e | 144 | ("automake" ,automake) |
3246cc91 | 145 | ("libtool" ,libtool) |
90f69c2e LC |
146 | |
147 | ;; libuv.pc is installed only when pkg-config is found. | |
148 | ("pkg-config" ,pkg-config))) | |
08f96396 | 149 | (home-page "https://github.com/libuv/libuv") |
90f69c2e LC |
150 | (synopsis "Library for asynchronous I/O") |
151 | (description | |
152 | "libuv is a multi-platform support library with a focus on asynchronous | |
153 | I/O. Among other things, it supports event loops via epoll, kqueue, and | |
154 | similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS | |
155 | resolution, asynchronous file system operations, and threading primitives.") | |
156 | ||
157 | ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for | |
8b4186e1 MB |
158 | ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'. |
159 | (license (list expat cc-by4.0)))) | |
ad8f8e75 | 160 | |
0a030a9c MB |
161 | (define-public perl-anyevent |
162 | (package | |
163 | (name "perl-anyevent") | |
360f6927 | 164 | (version "7.14") |
0a030a9c MB |
165 | (source (origin |
166 | (method url-fetch) | |
167 | (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/" | |
168 | "AnyEvent-" version ".tar.gz")) | |
169 | (sha256 | |
170 | (base32 | |
360f6927 | 171 | "0akxr9y0q9yjkl614x4clbiiayvh5a67y8gmci54plxs4p95i4sk")))) |
0a030a9c MB |
172 | (build-system perl-build-system) |
173 | (native-inputs | |
174 | `(("perl-canary-stability" ,perl-canary-stability))) | |
175 | (propagated-inputs | |
176 | `(("perl-async-interrupt" ,perl-async-interrupt) | |
177 | ("perl-ev" ,perl-ev) | |
178 | ("perl-guard" ,perl-guard) | |
179 | ("perl-json" ,perl-json) | |
180 | ("perl-json-xs" ,perl-json-xs) | |
181 | ("perl-net-ssleay" ,perl-net-ssleay) | |
182 | ("perl-task-weaken" ,perl-task-weaken))) | |
183 | (home-page "http://search.cpan.org/dist/AnyEvent") | |
184 | (synopsis | |
185 | "API for I/O, timer, signal, child process and completion events") | |
186 | (description | |
187 | "This module allows using a variety of events without forcing module | |
d1e4ad1b | 188 | authors to pick a specific event loop, and without noticeable overhead. |
0a030a9c MB |
189 | Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt, |
190 | @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets | |
191 | and Prima). It also comes with a very fast Pure Perl event loop that does | |
192 | not rely on XS.") | |
2f3108ad | 193 | (license perl-license))) |
0a030a9c | 194 | |
ad8f8e75 MB |
195 | (define-public perl-ev |
196 | (package | |
197 | (name "perl-ev") | |
198 | (version "4.22") | |
199 | (source (origin | |
200 | (method url-fetch) | |
201 | (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-" | |
202 | version ".tar.gz")) | |
203 | (sha256 | |
204 | (base32 | |
205 | "14d9115q8f2ca2q3vbcalm55zqsbx8xjq5aj098laj9f9rrzirra")) | |
206 | (modules '((guix build utils))) | |
207 | (snippet | |
208 | '(begin | |
209 | ;; Drop bundled libev. | |
210 | (delete-file-recursively "libev") | |
211 | #t)))) | |
212 | (build-system perl-build-system) | |
213 | (arguments | |
214 | '(#:phases | |
215 | (modify-phases %standard-phases | |
216 | (add-after 'unpack 'unpack-libev | |
217 | ;; This package requires the libev *sources* in order | |
218 | ;; to build. Unpack system libev here... | |
219 | (lambda* (#:key inputs #:allow-other-keys) | |
220 | (mkdir "./libev") | |
221 | (zero? (system* "tar" "-xf" (assoc-ref inputs "libev-source") | |
222 | "-C" "./libev" "--strip-components=1"))))))) | |
223 | (native-inputs | |
224 | `(("libev-source" ,(package-source libev)) | |
225 | ("perl-canary-stability" ,perl-canary-stability))) | |
226 | (propagated-inputs | |
227 | `(("perl-common-sense" ,perl-common-sense))) | |
228 | (home-page "http://search.cpan.org/dist/EV") | |
229 | (synopsis "Perl interface to libev") | |
230 | (description | |
231 | "This module provides an interface to @code{libev}, a high performance | |
232 | full-featured event loop. It can be used through the @code{AnyEvent} module | |
233 | and still be faster than other event loops currently supported in Perl.") | |
2f3108ad | 234 | (license perl-license))) |