2018-07-05 16:18:02 +00:00
|
|
|
{ stdenv, lib, fetchpatch, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }:
|
2014-07-09 00:08:45 +00:00
|
|
|
|
2016-04-25 14:04:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-10-12 21:11:18 +00:00
|
|
|
version = "1.23.1";
|
2016-04-25 14:04:22 +00:00
|
|
|
name = "libuv-${version}";
|
2014-07-09 00:08:45 +00:00
|
|
|
|
2016-04-25 14:04:22 +00:00
|
|
|
src = fetchFromGitHub {
|
2015-01-08 04:56:06 +00:00
|
|
|
owner = "libuv";
|
2014-07-09 00:08:45 +00:00
|
|
|
repo = "libuv";
|
|
|
|
rev = "v${version}";
|
2018-10-12 21:11:18 +00:00
|
|
|
sha256 = "14h8dcyx81sbckbgmqhagncyz8s6z6qzpx0fy8p79whq5hb3f4jg";
|
2014-07-09 00:08:45 +00:00
|
|
|
};
|
|
|
|
|
2018-07-05 16:18:02 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2018-07-19 14:12:58 +00:00
|
|
|
url = "https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d.patch";
|
2018-07-05 16:18:02 +00:00
|
|
|
sha256 = "1s2692h4dvqnzwwicrkpj0zph1i2bhv39w31z5vh7ssgvykaradj";
|
|
|
|
})
|
|
|
|
];
|
2018-07-04 19:02:07 +00:00
|
|
|
|
2016-12-22 10:30:03 +00:00
|
|
|
postPatch = let
|
|
|
|
toDisable = [
|
2017-05-30 17:24:32 +00:00
|
|
|
"getnameinfo_basic" "udp_send_hang_loop" # probably network-dependent
|
2016-12-22 10:30:03 +00:00
|
|
|
"spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
|
2017-01-07 02:09:49 +00:00
|
|
|
"getaddrinfo_fail" "getaddrinfo_fail_sync"
|
2017-07-14 19:52:36 +00:00
|
|
|
"threadpool_multiple_event_loops" # times out on slow machines
|
2017-02-28 08:14:38 +00:00
|
|
|
]
|
2018-07-04 19:05:54 +00:00
|
|
|
# Sometimes: timeout (no output), failed uv_listen. Someone
|
|
|
|
# should report these failures to libuv team. There tests should
|
|
|
|
# be much more robust.
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
"process_title" "emfile" "poll_duplex" "poll_unidirectional"
|
|
|
|
"ipc_listen_before_write" "ipc_listen_after_write" "ipc_tcp_connection"
|
|
|
|
"tcp_alloc_cb_fail" "tcp_ping_pong" "tcp_ref3" "tcp_ref4"
|
|
|
|
"tcp_bind6_error_inval" "tcp_bind6_error_addrinuse" "tcp_read_stop"
|
|
|
|
"tcp_unexpected_read" "tcp_write_to_half_open_connection"
|
|
|
|
"tcp_oob" "tcp_close_accept" "tcp_create_early_accept"
|
|
|
|
"tcp_create_early" "tcp_close" "tcp_bind_error_inval"
|
|
|
|
"tcp_bind_error_addrinuse" "tcp_shutdown_after_write"
|
|
|
|
"tcp_open" "tcp_write_queue_order" "tcp_try_write" "tcp_writealot"
|
|
|
|
"multiple_listen" "delayed_accept"
|
|
|
|
"shutdown_close_tcp" "shutdown_eof" "shutdown_twice" "callback_stack"
|
2018-09-09 17:36:05 +00:00
|
|
|
"tty_pty" "condvar_5"
|
2018-09-06 22:27:57 +00:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isAarch32 [
|
|
|
|
# I observe this test failing with some regularity on ARMv7:
|
|
|
|
# https://github.com/libuv/libuv/issues/1871
|
|
|
|
"shutdown_close_pipe"
|
2018-07-04 19:05:54 +00:00
|
|
|
];
|
2016-12-22 10:30:03 +00:00
|
|
|
tdRegexp = lib.concatStringsSep "\\|" toDisable;
|
|
|
|
in lib.optionalString doCheck ''
|
|
|
|
sed '/${tdRegexp}/d' -i test/test-list.h
|
|
|
|
'';
|
2016-11-29 17:40:30 +00:00
|
|
|
|
2017-02-17 13:57:41 +00:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
2014-07-09 00:08:45 +00:00
|
|
|
|
2016-04-25 14:04:22 +00:00
|
|
|
preConfigure = ''
|
|
|
|
LIBTOOLIZE=libtoolize ./autogen.sh
|
|
|
|
'';
|
2014-07-09 00:08:45 +00:00
|
|
|
|
2016-11-29 17:40:30 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-07-04 19:05:54 +00:00
|
|
|
doCheck = true;
|
2016-11-29 17:40:30 +00:00
|
|
|
|
2016-04-25 14:04:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A multi-platform support library with a focus on asynchronous I/O";
|
|
|
|
homepage = https://github.com/libuv/libuv;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2018-10-23 17:37:33 +00:00
|
|
|
license = with licenses; [ mit isc bsd2 bsd3 cc-by-40 ];
|
2014-07-09 00:08:45 +00:00
|
|
|
};
|
|
|
|
|
2016-04-25 14:04:22 +00:00
|
|
|
}
|