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> |
ae9cfc64 | 6 | ;;; Copyright © 2017, 2019, 2020 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") | |
16feaeef | 44 | (version "2.1.11") |
6b32a64a | 45 | (source (origin |
cf3f7aa1 MB |
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 | |
462ad9f5 | 52 | "0g988zqm45sj1hlhhz4il5z4dpi5dl74hzjwzl4md37a09iaqnx6")))) |
6b32a64a | 53 | (build-system gnu-build-system) |
6dde98c3 | 54 | (outputs '("out" "bin")) |
f0ef7b47 | 55 | (arguments |
cf3f7aa1 | 56 | ;; This skips some of the tests which fail on armhf and aarch64. |
f0ef7b47 | 57 | '(#:configure-flags '("--disable-libevent-regress"))) |
6b32a64a | 58 | (inputs |
cf3f7aa1 | 59 | `(("python" ,python-wrapper))) ;for 'event_rpcgen.py' |
e8fc1a0d MB |
60 | (native-inputs |
61 | `(("which" ,which))) | |
1f889a59 | 62 | (home-page "https://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 | |
c808ca02 ED |
76 | (define-public libev |
77 | (package | |
78 | (name "libev") | |
f87a7cc6 | 79 | (version "4.25") |
c808ca02 ED |
80 | (source (origin |
81 | (method url-fetch) | |
8fa16f63 | 82 | (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-" |
c808ca02 ED |
83 | version |
84 | ".tar.gz")) | |
85 | (sha256 | |
86 | (base32 | |
f87a7cc6 | 87 | "1295q0lkkbrlpd5dl5i48bh1rm8mjzh9y795jlvjz3bp4wf7wxbq")))) |
c808ca02 ED |
88 | (build-system gnu-build-system) |
89 | (home-page "http://software.schmorp.de/pkg/libev.html") | |
90 | (synopsis "Event loop loosely modelled after libevent") | |
91 | (description | |
f76ff984 MW |
92 | "libev provides a full-featured and high-performance event loop that is |
93 | loosely modelled after libevent. It includes relative timers, absolute timers | |
94 | with customized rescheduling, synchronous signals, process status change | |
95 | events, event watchers dealing with the event loop itself, file watchers, and | |
96 | limited support for fork events.") | |
c808ca02 ED |
97 | (license |
98 | (list bsd-2 gpl2+)))) | |
99 | ||
90f69c2e LC |
100 | (define-public libuv |
101 | (package | |
102 | (name "libuv") | |
fefd1a7b | 103 | (version "1.30.1") |
90f69c2e LC |
104 | (source (origin |
105 | (method url-fetch) | |
9b0215de MB |
106 | (uri (string-append "https://dist.libuv.org/dist/v" version |
107 | "/libuv-v" version ".tar.gz")) | |
90f69c2e LC |
108 | (sha256 |
109 | (base32 | |
fefd1a7b | 110 | "12s7ifwgbfxblhv46inqa8c2lsnl8cgmvd37y4a4248xhkx1d0s6")))) |
90f69c2e LC |
111 | (build-system gnu-build-system) |
112 | (arguments | |
d64edd2c | 113 | '(;; XXX: Some tests want /dev/tty, attempt to make connections, etc. |
90f69c2e | 114 | #:tests? #f)) |
464f5447 | 115 | (native-inputs `(("autoconf" ,autoconf-wrapper) |
90f69c2e | 116 | ("automake" ,automake) |
3246cc91 | 117 | ("libtool" ,libtool) |
90f69c2e LC |
118 | |
119 | ;; libuv.pc is installed only when pkg-config is found. | |
120 | ("pkg-config" ,pkg-config))) | |
08f96396 | 121 | (home-page "https://github.com/libuv/libuv") |
90f69c2e LC |
122 | (synopsis "Library for asynchronous I/O") |
123 | (description | |
124 | "libuv is a multi-platform support library with a focus on asynchronous | |
125 | I/O. Among other things, it supports event loops via epoll, kqueue, and | |
126 | similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS | |
127 | resolution, asynchronous file system operations, and threading primitives.") | |
128 | ||
129 | ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for | |
8b4186e1 MB |
130 | ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'. |
131 | (license (list expat cc-by4.0)))) | |
ad8f8e75 | 132 | |
ae9cfc64 MB |
133 | ;; This newer version of LibUV is required by 'node'. Package it separately |
134 | ;; to avoid massive rebuilds. | |
135 | (define-public libuv/latest | |
136 | (package/inherit | |
137 | libuv | |
138 | (version "1.34.2") | |
139 | (source (origin | |
140 | (method url-fetch) | |
141 | (uri (string-append "https://dist.libuv.org/dist/v" version | |
142 | "/libuv-v" version ".tar.gz")) | |
143 | (sha256 | |
144 | (base32 | |
145 | "0inzk8qpw78im3fiazrc54qi1gcapbs8dhf0hk3kwpzg0i2kpnb5")))))) | |
146 | ||
0a030a9c MB |
147 | (define-public perl-anyevent |
148 | (package | |
149 | (name "perl-anyevent") | |
4504d183 | 150 | (version "7.17") |
0a030a9c MB |
151 | (source (origin |
152 | (method url-fetch) | |
153 | (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/" | |
154 | "AnyEvent-" version ".tar.gz")) | |
155 | (sha256 | |
156 | (base32 | |
4504d183 | 157 | "11drlj8r02czhjgzkb39axnr8zzyp506r043xfmf93q9kilfmgjh")))) |
0a030a9c MB |
158 | (build-system perl-build-system) |
159 | (native-inputs | |
160 | `(("perl-canary-stability" ,perl-canary-stability))) | |
161 | (propagated-inputs | |
162 | `(("perl-async-interrupt" ,perl-async-interrupt) | |
163 | ("perl-ev" ,perl-ev) | |
164 | ("perl-guard" ,perl-guard) | |
165 | ("perl-json" ,perl-json) | |
166 | ("perl-json-xs" ,perl-json-xs) | |
167 | ("perl-net-ssleay" ,perl-net-ssleay) | |
168 | ("perl-task-weaken" ,perl-task-weaken))) | |
9aba9b12 | 169 | (home-page "https://metacpan.org/release/AnyEvent") |
0a030a9c MB |
170 | (synopsis |
171 | "API for I/O, timer, signal, child process and completion events") | |
172 | (description | |
173 | "This module allows using a variety of events without forcing module | |
d1e4ad1b | 174 | authors to pick a specific event loop, and without noticeable overhead. |
0a030a9c MB |
175 | Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt, |
176 | @code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets | |
177 | and Prima). It also comes with a very fast Pure Perl event loop that does | |
178 | not rely on XS.") | |
2f3108ad | 179 | (license perl-license))) |
0a030a9c | 180 | |
ad8f8e75 MB |
181 | (define-public perl-ev |
182 | (package | |
183 | (name "perl-ev") | |
2c257dbf | 184 | (version "4.25") |
ad8f8e75 MB |
185 | (source (origin |
186 | (method url-fetch) | |
187 | (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-" | |
188 | version ".tar.gz")) | |
189 | (sha256 | |
190 | (base32 | |
2c257dbf | 191 | "0slw68zxrkfribf6lhggdhpay3mdng0nqxlglkwrk19myblchr9f")) |
ad8f8e75 MB |
192 | (modules '((guix build utils))) |
193 | (snippet | |
194 | '(begin | |
195 | ;; Drop bundled libev. | |
196 | (delete-file-recursively "libev") | |
197 | #t)))) | |
198 | (build-system perl-build-system) | |
199 | (arguments | |
200 | '(#:phases | |
201 | (modify-phases %standard-phases | |
202 | (add-after 'unpack 'unpack-libev | |
203 | ;; This package requires the libev *sources* in order | |
204 | ;; to build. Unpack system libev here... | |
205 | (lambda* (#:key inputs #:allow-other-keys) | |
206 | (mkdir "./libev") | |
f16faf0f TGR |
207 | (invoke "tar" "-xf" (assoc-ref inputs "libev-source") |
208 | "-C" "./libev" "--strip-components=1")))))) | |
ad8f8e75 MB |
209 | (native-inputs |
210 | `(("libev-source" ,(package-source libev)) | |
211 | ("perl-canary-stability" ,perl-canary-stability))) | |
212 | (propagated-inputs | |
213 | `(("perl-common-sense" ,perl-common-sense))) | |
9aba9b12 | 214 | (home-page "https://metacpan.org/release/EV") |
ad8f8e75 MB |
215 | (synopsis "Perl interface to libev") |
216 | (description | |
217 | "This module provides an interface to @code{libev}, a high performance | |
218 | full-featured event loop. It can be used through the @code{AnyEvent} module | |
219 | and still be faster than other event loops currently supported in Perl.") | |
2f3108ad | 220 | (license perl-license))) |
2c114220 PN |
221 | |
222 | (define-public perl-rpc-epc-service | |
223 | (package | |
224 | (name "perl-rpc-epc-service") | |
225 | (version "0.0.11") | |
226 | (source | |
227 | (origin | |
228 | (method url-fetch) | |
229 | (uri (string-append | |
230 | "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-" | |
231 | "v" version ".tar.gz")) | |
232 | (sha256 | |
233 | (base32 | |
234 | "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp")))) | |
235 | (build-system perl-build-system) | |
236 | (native-inputs | |
237 | `(("perl-module-build" ,perl-module-build) | |
238 | ("perl-test-simple" ,perl-test-simple))) | |
239 | (propagated-inputs | |
240 | `(("perl-anyevent" ,perl-anyevent) | |
241 | ("perl-data-sexpression" ,perl-data-sexpression))) | |
242 | (arguments | |
243 | ;; Tests seem to fail because they try to start a server. | |
244 | `(#:tests? #f)) | |
245 | (home-page "https://metacpan.org/release/RPC-EPC-Service") | |
246 | (synopsis "Asynchronous remote procedure stack") | |
247 | (description "RPC::EPC::Service enables to connect the other process with | |
248 | the S-expression protocol, like the Swank protocol of the SLIME.") | |
249 | (license perl-license))) |