1{ stdenv, fetchurl, autoreconfHook, python, findutils }:
2
3let version = "2.0.22"; in
4stdenv.mkDerivation {
5 name = "libevent-${version}";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/levent/libevent-${version}-stable.tar.gz";
9 sha256 = "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki";
10 };
11
12 nativeBuildInputs = [ autoreconfHook ];
13 buildInputs = [ python ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
14
15 patchPhase = ''
16 patchShebangs event_rpcgen.py
17 '';
18
19 meta = with stdenv.lib; {
20 description = "Event notification library";
21
22 longDescription =
23 '' The libevent API provides a mechanism to execute a callback function
24 when a specific event occurs on a file descriptor or after a timeout
25 has been reached. Furthermore, libevent also support callbacks due
26 to signals or regular timeouts.
27
28 libevent is meant to replace the event loop found in event driven
29 network servers. An application just needs to call event_dispatch()
30 and then add or remove events dynamically without having to change
31 the event loop.
32 '';
33
34 license = licenses.bsd3;
35 platforms = platforms.all;
36 maintainers = with maintainers; [ wkennington ];
37 };
38}