projects/guix·blob kernel-updates · refs

364 lines · 14.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015, 2017 Mark H Weaver <[email protected]>
4;;; Copyright © 2015 Eric Dvorsak <[email protected]>
5;;; Copyright © 2016 David Thompson <[email protected]>
6;;; Copyright © 2017, 2019, 2020 Marius Bakke <[email protected]>
7;;; Copyright © 2017 Efraim Flashner <[email protected]>
8;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2019 Pierre Neidhardt <[email protected]>
10;;; Copyright © 2022 Luis Henrique Gomes Higino <[email protected]>
11;;; Copyright © 2023 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2026 Jelle Licht <[email protected]>
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages libevent)
30 #:use-module (gnu packages)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system perl)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages perl-check)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages python)
44 #:use-module (gnu packages tls))
45
46(define-public libevent
47 (package
48 (name "libevent")
49 (version "2.1.12")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append
53 "https://github.com/libevent/libevent/releases/download/release-"
54 version "-stable/libevent-" version "-stable.tar.gz"))
55 (sha256
56 (base32
57 "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj"))))
58 (build-system gnu-build-system)
59 (outputs '("out" "bin"))
60 (arguments
61 ;; This skips some of the tests which fail on armhf and aarch64.
62 '(#:configure-flags '("--disable-libevent-regress"
63 "--disable-openssl")))
64 (inputs
65 (list python-wrapper)) ;for 'event_rpcgen.py'
66 (native-inputs
67 (list which))
68 (home-page "https://libevent.org/")
69 (synopsis "Event notification library")
70 (description
71 "The libevent API provides a mechanism to execute a callback
72function when a specific event occurs on a file descriptor or after a
73timeout has been reached. Furthermore, libevent also support callbacks
74due to signals or regular timeouts.
75
76libevent is meant to replace the event loop found in event driven
77network servers. An application just needs to call event_dispatch() and
78then add or remove events dynamically without having to change the event
79loop.")
80 (license license:bsd-3)))
81
82(define-public libevent-with-openssl
83 (package/inherit libevent
84 (name "libevent-with-openssl")
85 (inputs (modify-inputs inputs
86 (prepend openssl)))
87 (arguments
88 ;; This skips some of the tests which fail on armhf and aarch64.
89 '(#:configure-flags '("--disable-libevent-regress")))))
90
91(define-public libev
92 (package
93 (name "libev")
94 (version "4.33")
95 (source (origin
96 (method url-fetch)
97 (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
98 version
99 ".tar.gz"))
100 (sha256
101 (base32
102 "1sjs4324is7fp21an4aas2z4dwsvs6z4xwrmp72vwpq1s6wbfzjh"))))
103 (build-system gnu-build-system)
104 (arguments
105 '(#:configure-flags '("--disable-static")))
106 (home-page "http://software.schmorp.de/pkg/libev.html")
107 (synopsis "Event loop loosely modelled after libevent")
108 (description
109 "libev provides a full-featured and high-performance event loop that is
110loosely modelled after libevent. It includes relative timers, absolute timers
111with customized rescheduling, synchronous signals, process status change
112events, event watchers dealing with the event loop itself, file watchers, and
113limited support for fork events.")
114 (license (list license:bsd-2 license:gpl2+))))
115
116(define-public libuv
117 (package
118 (name "libuv")
119 (version "1.44.2")
120 (source (origin
121 (method url-fetch)
122 (uri (string-append "https://dist.libuv.org/dist/v" version
123 "/libuv-v" version ".tar.gz"))
124 (sha256
125 (base32
126 "1d1wy1061cf2mfygr2j6jbm0da2mhsf0l9yq4rjkqrsmijbdrz6c"))))
127 (build-system gnu-build-system)
128 (arguments
129 '(#:configure-flags '("--disable-static")
130 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
131 #:tests? #f))
132 (native-inputs (list autoconf automake libtool
133 ;; libuv.pc is installed only when pkg-config is found.
134 pkg-config))
135 (home-page "https://github.com/libuv/libuv")
136 (synopsis "Library for asynchronous I/O")
137 (description
138 "libuv is a multi-platform support library with a focus on asynchronous
139I/O. Among other things, it supports event loops via epoll, kqueue, and
140similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
141resolution, asynchronous file system operations, and threading primitives.")
142
143 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
144 ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'.
145 (license (list license:expat license:cc-by4.0))))
146
147(define-public libuv-for-node
148 ;; When upgrading Node, also upgrade this. Get the version from
149 ;; https://github.com/nodejs/node/blob/master/deps/uv/include/uv/version.h
150 (package
151 (inherit libuv)
152 (name "libuv")
153 (version "1.42.0")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "https://dist.libuv.org/dist/v" version
157 "/libuv-v" version ".tar.gz"))
158 (sha256
159 (base32
160 "0wpb9pz3r8nksnrf4zbixj2kk9whr7abi45ydrwyv2js2ljrc4j3"))))
161 (properties '((hidden? . #t)))))
162
163(define-public libuv-for-node-lts
164 ;; When upgrading Node, also upgrade this. Get the version from
165 ;; https://github.com/nodejs/node/blob/main/deps/uv/include/uv/version.h
166 (package
167 (inherit libuv)
168 (name "libuv")
169 (version "1.52.1")
170 (source (origin
171 (method url-fetch)
172 (uri (string-append "https://dist.libuv.org/dist/v" version
173 "/libuv-v" version ".tar.gz"))
174 (sha256
175 (base32
176 "1rzrrylgqyjcnjarph3r2h5i3cxjpx7j7svr4bkc0d73wswi3mb6"))))
177 (properties '((hidden? . #t)))))
178
179(define-public libuv-for-r-httpuv
180 ;; When upgrading r-httpuv, also upgrade this.
181 (package
182 (inherit libuv)
183 (name "libuv")
184 (version "1.43.0")
185 (source (origin
186 (method url-fetch)
187 (uri (string-append "https://dist.libuv.org/dist/v" version
188 "/libuv-v" version ".tar.gz"))
189 (sha256
190 (base32
191 "194kwq3jfj9s628kzkchdca534rikjw0xiyas0cjbphqmsvjpmwh"))))
192 (properties '((hidden? . #t)))))
193
194(define-public libuv-julia
195 (let ((commit "e6f0e4900e195c8352f821abe2b3cffc3089547b")
196 (revision "4"))
197 ;; When upgrading Julia, also upgrade this. Get the commit from
198 ;; https://github.com/JuliaLang/julia/blob/v1.8.2/deps/libuv.version
199 (package
200 (inherit libuv)
201 (name "libuv-julia")
202 (version (git-version "2.0.0" revision commit))
203 (source (origin
204 (method git-fetch)
205 (uri (git-reference
206 (url "https://github.com/JuliaLang/libuv")
207 (commit commit)))
208 (file-name (git-file-name name version))
209 (sha256
210 (base32
211 "0ib2cprvbyviwrzm0fw6dqvlbm9akf2kj3vjzp82q3gii74cv3c9"))))
212 (arguments
213 '(#:configure-flags '("--with-pic")
214 #:tests? #f))
215 (home-page "https://github.com/JuliaLang/libuv")
216 (properties '((hidden? . #t))))))
217
218(define-public libuv-for-luv
219 ;; When upgrading make-lua-luv, also upgrade this. Get the version from
220 ;; https://github.com/luvit/luv/blob/master/CMakeLists.txt
221 (package
222 (inherit libuv)
223 (name "libuv")
224 (version "1.52.1")
225 (source (origin
226 (method url-fetch)
227 (uri (string-append "https://dist.libuv.org/dist/v" version
228 "/libuv-v" version ".tar.gz"))
229 (sha256
230 (base32
231 "1rzrrylgqyjcnjarph3r2h5i3cxjpx7j7svr4bkc0d73wswi3mb6"))))
232 (properties '((hidden? . #t)))))
233
234(define-public perl-anyevent
235 (package
236 (name "perl-anyevent")
237 (version "7.17")
238 (source (origin
239 (method url-fetch)
240 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/"
241 "AnyEvent-" version ".tar.gz"))
242 (sha256
243 (base32
244 "11drlj8r02czhjgzkb39axnr8zzyp506r043xfmf93q9kilfmgjh"))))
245 (build-system perl-build-system)
246 (native-inputs
247 (list perl-canary-stability))
248 (propagated-inputs
249 (list perl-async-interrupt
250 perl-ev
251 perl-guard
252 perl-json
253 perl-json-xs
254 perl-net-ssleay
255 perl-task-weaken))
256 (home-page "https://metacpan.org/release/AnyEvent")
257 (synopsis
258 "API for I/O, timer, signal, child process and completion events")
259 (description
260 "This module allows using a variety of events without forcing module
261authors to pick a specific event loop, and without noticeable overhead.
262Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt,
263@code{Event::Lib}, Irssi, @code{IO::Async} and POE (and thus also WxWidgets
264and Prima). It also comes with a very fast Pure Perl event loop that does
265not rely on XS.")
266 (license license:perl-license)))
267
268(define-public perl-ev
269 (package
270 (name "perl-ev")
271 (version "4.31")
272 (source (origin
273 (method url-fetch)
274 (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-"
275 version ".tar.gz"))
276 (sha256
277 (base32
278 "1jxlhnvrqim39977zwavjrcbdf9bifb46pwaxvm0s8klq121kjwb"))
279 (modules '((guix build utils)))
280 (snippet
281 '(begin
282 ;; Drop bundled libev.
283 (delete-file-recursively "libev")
284 #t))))
285 (build-system perl-build-system)
286 (arguments
287 '(#:phases
288 (modify-phases %standard-phases
289 (add-after 'unpack 'unpack-libev
290 ;; This package requires the libev *sources* in order
291 ;; to build. Unpack system libev here...
292 (lambda* (#:key inputs #:allow-other-keys)
293 (mkdir "./libev")
294 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
295 "-C" "./libev" "--strip-components=1"))))))
296 (native-inputs
297 `(("libev-source" ,(package-source libev))
298 ("perl-canary-stability" ,perl-canary-stability)))
299 (propagated-inputs
300 (list perl-common-sense))
301 (home-page "https://metacpan.org/release/EV")
302 (synopsis "Perl interface to libev")
303 (description
304 "This module provides an interface to @code{libev}, a high performance
305full-featured event loop. It can be used through the @code{AnyEvent} module
306and still be faster than other event loops currently supported in Perl.")
307 (license license:perl-license)))
308
309(define-public perl-rpc-epc-service
310 (package
311 (name "perl-rpc-epc-service")
312 (version "0.0.11")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (string-append
317 "mirror://cpan/authors/id/K/KI/KIWANAMI/RPC-EPC-Service-"
318 "v" version ".tar.gz"))
319 (sha256
320 (base32
321 "1qwb284z4ig3xzy21m1b3w8bkb8k6l2ij6cjz93znn2j6qs42pwp"))))
322 (build-system perl-build-system)
323 (native-inputs
324 (list perl-module-build perl-test-simple))
325 (propagated-inputs
326 (list perl-anyevent perl-data-sexpression))
327 (arguments
328 ;; Tests seem to fail because they try to start a server.
329 `(#:tests? #f))
330 (home-page "https://metacpan.org/release/RPC-EPC-Service")
331 (synopsis "Asynchronous remote procedure stack")
332 (description "RPC::EPC::Service enables to connect the other process with
333the S-expression protocol, like the Swank protocol of the SLIME.")
334 (license license:perl-license)))
335
336(define-public uvwasi
337 (package
338 (name "uvwasi")
339 (version "0.0.23")
340 (source
341 (origin
342 (method git-fetch)
343 (uri (git-reference
344 (url "https://github.com/nodejs/uvwasi")
345 (commit (string-append "v" version))))
346 (file-name (git-file-name name version))
347 (sha256 (base32
348 "0xlffyl8j6c16dl5r4s7nrm2v1mxpmy9wf2ispak2i0i6flzzz7s"))
349 (patches (search-patches "uvwasi-fix-assert-side-effects.patch"))))
350 (build-system cmake-build-system)
351 (inputs (list libuv))
352 (home-page "https://github.com/nodejs/uvwasi")
353 (synopsis "WASI syscall API built atop libuv")
354 (description "@code{uvwasi} implements the @acronym{WASI, WebAssembly
355System Interface} system call API, so that WebAssembly runtimes can easily
356implement WASI calls. Under the hood, @code{uvwasi} leverages @code{libuv}
357where possible for maximum portability.")
358 (license license:expat)))
359
360(define-public uvwasi-for-node-lts
361 (hidden-package
362 (package/inherit uvwasi
363 (inputs (modify-inputs inputs
364 (replace "libuv" libuv-for-node-lts))))))