2015-09-28 17:16:05 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig
|
2015-06-21 08:56:48 +01:00
|
|
|
, ApplicationServices, CoreServices }:
|
2014-07-09 01:08:45 +01:00
|
|
|
|
2016-04-25 15:04:22 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-02-17 13:57:41 +00:00
|
|
|
version = "1.11.0";
|
2016-04-25 15:04:22 +01:00
|
|
|
name = "libuv-${version}";
|
2014-07-09 01:08:45 +01:00
|
|
|
|
2016-04-25 15:04:22 +01:00
|
|
|
src = fetchFromGitHub {
|
2015-01-08 04:56:06 +00:00
|
|
|
owner = "libuv";
|
2014-07-09 01:08:45 +01:00
|
|
|
repo = "libuv";
|
|
|
|
rev = "v${version}";
|
2017-02-17 13:57:41 +00:00
|
|
|
sha256 = "02sm7f3l0shpfz25b77q2jjvlypc1mmz4zpzfgfmiplhgxxaa6la";
|
2014-07-09 01:08:45 +01:00
|
|
|
};
|
|
|
|
|
2016-12-22 10:30:03 +00:00
|
|
|
postPatch = let
|
|
|
|
toDisable = [
|
|
|
|
"getnameinfo_basic" # probably network-dependent
|
|
|
|
"spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
|
2017-01-07 02:09:49 +00:00
|
|
|
"getaddrinfo_fail" "getaddrinfo_fail_sync"
|
2017-02-28 08:14:38 +00:00
|
|
|
]
|
2017-03-05 11:38:20 +00:00
|
|
|
# sometimes: timeout (no output), failed uv_listen
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ "process_title" "emfile" ];
|
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 ];
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
|
2014-07-09 01:08:45 +01:00
|
|
|
|
2016-04-25 15:04:22 +01:00
|
|
|
preConfigure = ''
|
|
|
|
LIBTOOLIZE=libtoolize ./autogen.sh
|
|
|
|
'';
|
2014-07-09 01:08:45 +01:00
|
|
|
|
2016-11-29 17:40:30 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2016-04-25 15:04:22 +01: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 01:08:45 +01:00
|
|
|
};
|
|
|
|
|
2016-04-25 15:04:22 +01:00
|
|
|
}
|