2018-07-04 21:02:07 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }:
|
2014-07-09 02:08:45 +02:00
|
|
|
|
2016-04-25 16:04:22 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-06-14 13:08:32 +02:00
|
|
|
version = "1.20.3";
|
2016-04-25 16:04:22 +02:00
|
|
|
name = "libuv-${version}";
|
2014-07-09 02:08:45 +02:00
|
|
|
|
2016-04-25 16:04:22 +02:00
|
|
|
src = fetchFromGitHub {
|
2015-01-08 05:56:06 +01:00
|
|
|
owner = "libuv";
|
2014-07-09 02:08:45 +02:00
|
|
|
repo = "libuv";
|
|
|
|
rev = "v${version}";
|
2018-06-14 13:08:32 +02:00
|
|
|
sha256 = "1a8a679wni560z7x6w5i431vh2g0f34cznflcn52klx1vwcggrg7";
|
2014-07-09 02:08:45 +02:00
|
|
|
};
|
|
|
|
|
2018-07-04 21:02:07 +02:00
|
|
|
patches = [ ./make-apple-frameworks-optional.patch ];
|
|
|
|
|
2016-12-22 11:30:03 +01:00
|
|
|
postPatch = let
|
|
|
|
toDisable = [
|
2017-05-30 19:24:32 +02:00
|
|
|
"getnameinfo_basic" "udp_send_hang_loop" # probably network-dependent
|
2016-12-22 11:30:03 +01:00
|
|
|
"spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
|
2017-01-07 03:09:49 +01:00
|
|
|
"getaddrinfo_fail" "getaddrinfo_fail_sync"
|
2017-07-14 21:52:36 +02:00
|
|
|
"threadpool_multiple_event_loops" # times out on slow machines
|
2017-02-28 09:14:38 +01:00
|
|
|
]
|
2017-03-05 12:38:20 +01:00
|
|
|
# sometimes: timeout (no output), failed uv_listen
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ "process_title" "emfile" ];
|
2016-12-22 11:30:03 +01:00
|
|
|
tdRegexp = lib.concatStringsSep "\\|" toDisable;
|
|
|
|
in lib.optionalString doCheck ''
|
|
|
|
sed '/${tdRegexp}/d' -i test/test-list.h
|
|
|
|
'';
|
2016-11-29 18:40:30 +01:00
|
|
|
|
2017-02-17 14:57:41 +01:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
2014-07-09 02:08:45 +02:00
|
|
|
|
2016-04-25 16:04:22 +02:00
|
|
|
preConfigure = ''
|
|
|
|
LIBTOOLIZE=libtoolize ./autogen.sh
|
|
|
|
'';
|
2014-07-09 02:08:45 +02:00
|
|
|
|
2016-11-29 18:40:30 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-03-09 13:41:09 +01:00
|
|
|
# These should be turned back on, but see https://github.com/NixOS/nixpkgs/issues/23651
|
|
|
|
# For now the tests are just breaking large swaths of the nixpkgs binary cache for Darwin,
|
|
|
|
# and I'd rather have everything else work at all than have stronger assurance here.
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2016-11-29 18:40:30 +01:00
|
|
|
|
2016-04-25 16:04:22 +02: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;
|
2014-07-09 02:08:45 +02:00
|
|
|
};
|
|
|
|
|
2016-04-25 16:04:22 +02:00
|
|
|
}
|