gnu: glib: Upgrade to 2.40.0.
[jackhill/guix/guix.git] / gnu / packages / libevent.scm
CommitLineData
6b32a64a 1;;; GNU Guix --- Functional package management for GNU
90f69c2e 2;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
6b32a64a
LC
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages libevent)
20 #:use-module (gnu packages)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages which)
90f69c2e
LC
26 #:use-module (gnu packages python)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages pkg-config))
6b32a64a
LC
29
30(define-public libevent
31 (package
32 (name "libevent")
33 (version "2.0.21")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append
37 "https://github.com/downloads/libevent/libevent/libevent-"
38 version
39 "-stable.tar.gz"))
40 (sha256
41 (base32
01eafd38
LC
42 "1xblymln9vihdmf1aqkp8chwvnhpdch3786bh30bj75slnl31992"))
43 (patches (list (search-patch "libevent-dns-tests.patch")))))
6b32a64a
LC
44 (build-system gnu-build-system)
45 (inputs
01eafd38 46 `(;; Dependencies used for the tests and for `event_rpcgen.py'.
6b32a64a 47 ("which" ,which)
ee3e314b 48 ("python" ,python-wrapper)))
6b32a64a
LC
49 (home-page "http://libevent.org/")
50 (synopsis
51 "libevent, an event notification library")
52 (description
53 "The libevent API provides a mechanism to execute a callback
54function when a specific event occurs on a file descriptor or after a
55timeout has been reached. Furthermore, libevent also support callbacks
56due to signals or regular timeouts.
57
58libevent is meant to replace the event loop found in event driven
59network servers. An application just needs to call event_dispatch() and
60then add or remove events dynamically without having to change the event
61loop.")
62 (license bsd-3)))
90f69c2e
LC
63
64(define-public libuv
65 (package
66 (name "libuv")
67 (version "0.11.25")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "https://github.com/joyent/libuv/archive/v"
71 version ".tar.gz"))
72 (sha256
73 (base32
74 "1ys2wlypdbv59yywn91d5vl329z50mi7ivi3fj5rjm4mr9g3wnmr"))))
75 (build-system gnu-build-system)
76 (arguments
77 '(#:phases (alist-cons-before
78 'configure 'autogen
79 (lambda _
80 ;; Fashionable people don't run 'make dist' these days, so
81 ;; we need to do that ourselves.
82 (zero? (system* "./autogen.sh")))
83 %standard-phases)
84
85 ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
86 #:tests? #f))
87 (native-inputs `(("autoconf" ,(autoconf-wrapper))
88 ("automake" ,automake)
89 ("libtool" ,libtool "bin")
90
91 ;; libuv.pc is installed only when pkg-config is found.
92 ("pkg-config" ,pkg-config)))
93 (home-page "https://github.com/joyent/libuv")
94 (synopsis "Library for asynchronous I/O")
95 (description
96 "libuv is a multi-platform support library with a focus on asynchronous
97I/O. Among other things, it supports event loops via epoll, kqueue, and
98similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
99resolution, asynchronous file system operations, and threading primitives.")
100
101 ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
102 ;; details.
103 (license x11)))