diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-07-05 14:34:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-05 14:34:54 -0400 |
commit | f513d580b06c37ef516a9af18f68b7567e6a05fe (patch) | |
tree | 1ce23ba0e1da3b0f649f7f32a82f4d323e04eb5b | |
parent | a4476912f82185f01b16b8146b12619b68416650 (diff) | |
parent | 620238009444730c3ad5aa419248fa698626f49a (diff) | |
download | nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar.gz nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar.bz2 nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar.lz nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar.xz nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.tar.zst nixlib-f513d580b06c37ef516a9af18f68b7567e6a05fe.zip |
Merge pull request #43040 from matthewbauer/darwin-closure-reductions
Darwin stdenv tweaks
-rw-r--r-- | pkgs/development/libraries/libuv/default.nix | 34 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/apple-sdk/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 1 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/security-tool/default.nix | 3 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
5 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index 1e01497c7629..c902a8b216a8 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -1,5 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig -, ApplicationServices, CoreServices }: +{ stdenv, lib, fetchpatch, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }: stdenv.mkDerivation rec { version = "1.21.0"; @@ -12,6 +11,13 @@ stdenv.mkDerivation rec { sha256 = "1jjg34ppnlrnb634q9mla7whl7rm9xmjgnzckrznqcycwzir074b"; }; + patches = [ + (fetchpatch { + url = "https://github.com/libuv/libuv/pull/1909.patch"; + sha256 = "1s2692h4dvqnzwwicrkpj0zph1i2bhv39w31z5vh7ssgvykaradj"; + }) + ]; + postPatch = let toDisable = [ "getnameinfo_basic" "udp_send_hang_loop" # probably network-dependent @@ -19,15 +25,28 @@ stdenv.mkDerivation rec { "getaddrinfo_fail" "getaddrinfo_fail_sync" "threadpool_multiple_event_loops" # times out on slow machines ] - # sometimes: timeout (no output), failed uv_listen - ++ stdenv.lib.optionals stdenv.isDarwin [ "process_title" "emfile" ]; + # 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" + ]; tdRegexp = lib.concatStringsSep "\\|" toDisable; in lib.optionalString doCheck '' sed '/${tdRegexp}/d' -i test/test-list.h ''; nativeBuildInputs = [ automake autoconf libtool pkgconfig ]; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ]; preConfigure = '' LIBTOOLIZE=libtoolize ./autogen.sh @@ -35,10 +54,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # 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; + doCheck = true; meta = with lib; { description = "A multi-platform support library with a focus on asynchronous I/O"; diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index d4a48b9c3725..c23a2148143a 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -71,6 +71,8 @@ let # because we copy files from the system preferLocalBuild = true; + disallowedRequisites = [ sdk ]; + installPhase = '' linkFramework() { local path="$1" diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index f8c424089f09..9e47b8d02fdf 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -86,7 +86,6 @@ with frameworks; with libs; { QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ]; QuickLook = [ ApplicationServices CF ]; QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; - Ruby = []; SceneKit = []; ScreenSaver = []; Scripting = []; diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index ff35c2928902..4566d82835f7 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { sha256 = "0apcz4vy2z5645jhrs60wj3w27mncjjqv42h5lln36g6qs2n9113"; }; + disallowedRequisites = [ apple_sdk.sdk ]; + patchPhase = '' # copied from libsecurity_generic cp -R ${osx_private_sdk}/include/SecurityPrivateHeaders Security @@ -97,4 +99,3 @@ stdenv.mkDerivation rec { license = licenses.apsl20; }; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac3a5a2b5ed9..43044273edac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10683,9 +10683,7 @@ with pkgs; then darwin.libunwind else callPackage ../development/libraries/libunwind { }; - libuv = callPackage ../development/libraries/libuv { - inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices; - }; + libuv = callPackage ../development/libraries/libuv { }; libv4l = lowPrio (v4l_utils.override { withUtils = false; |