diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-07-05 12:18:02 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-07-05 14:28:50 -0400 |
commit | 620238009444730c3ad5aa419248fa698626f49a (patch) | |
tree | 48628971b0583b0c51f99235cdda0ae62abe78d6 | |
parent | c7ab795274fab9206de81f4ad81bc544d2c9fd1b (diff) | |
download | nixlib-620238009444730c3ad5aa419248fa698626f49a.tar nixlib-620238009444730c3ad5aa419248fa698626f49a.tar.gz nixlib-620238009444730c3ad5aa419248fa698626f49a.tar.bz2 nixlib-620238009444730c3ad5aa419248fa698626f49a.tar.lz nixlib-620238009444730c3ad5aa419248fa698626f49a.tar.xz nixlib-620238009444730c3ad5aa419248fa698626f49a.tar.zst nixlib-620238009444730c3ad5aa419248fa698626f49a.zip |
libuv: use fetchpatch for apple patch
-rw-r--r-- | pkgs/development/libraries/libuv/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/libraries/libuv/make-apple-frameworks-optional.patch | 176 |
2 files changed, 7 insertions, 178 deletions
diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index cc92ff3fdd5c..4758591e9298 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }: +{ stdenv, lib, fetchpatch, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }: stdenv.mkDerivation rec { version = "1.20.3"; @@ -11,7 +11,12 @@ stdenv.mkDerivation rec { sha256 = "1a8a679wni560z7x6w5i431vh2g0f34cznflcn52klx1vwcggrg7"; }; - patches = [ ./make-apple-frameworks-optional.patch ]; + patches = [ + (fetchpatch { + url = "https://github.com/libuv/libuv/pull/1909.patch"; + sha256 = "1s2692h4dvqnzwwicrkpj0zph1i2bhv39w31z5vh7ssgvykaradj"; + }) + ]; postPatch = let toDisable = [ diff --git a/pkgs/development/libraries/libuv/make-apple-frameworks-optional.patch b/pkgs/development/libraries/libuv/make-apple-frameworks-optional.patch deleted file mode 100644 index 195fcbf03393..000000000000 --- a/pkgs/development/libraries/libuv/make-apple-frameworks-optional.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 6d03644817fb263489dc9fdf550bf1fac274fd8f Mon Sep 17 00:00:00 2001 -From: Matthew Bauer <mjbauer95@gmail.com> -Date: Wed, 4 Jul 2018 14:49:33 -0400 -Subject: [PATCH] Make apple frameworks optional -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Previously, you had to have the apple sdk frameworks downloaded to -build on “Darwin”. There are certain cases where this is not desired, -so an Autoconf conditional is added to check for their availability. -When they are not available, proctitle & fsevents are unavailable. - -These frameworks are proprietary- owned and developed by Apple Inc. -They have never been released publically so we should not make -everyone use it in a core library like libuv. ---- - configure.ac | 2 ++ - src/unix/darwin-proctitle.c | 8 +++----- - src/unix/fsevents.c | 6 +++--- - test/test-list.h | 12 ++++++++++++ - 4 files changed, 20 insertions(+), 8 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c3a6a779..2df943c0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -69,4 +69,6 @@ AS_CASE([$host_os],[mingw*], [ - AS_CASE([$host_os], [netbsd*], [AC_CHECK_LIB([kvm], [kvm_open])]) - AC_CHECK_HEADERS([sys/ahafs_evProds.h]) - AC_CONFIG_FILES([Makefile libuv.pc]) -+AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h) -+AC_CHECK_HEADERS(CoreServices/CoreServices.h) - AC_OUTPUT -diff --git a/src/unix/darwin-proctitle.c b/src/unix/darwin-proctitle.c -index dabde223..f5506a32 100644 ---- a/src/unix/darwin-proctitle.c -+++ b/src/unix/darwin-proctitle.c -@@ -26,9 +26,7 @@ - #include <stdlib.h> - #include <string.h> - --#include <TargetConditionals.h> -- --#if !TARGET_OS_IPHONE -+#if HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H - # include <CoreFoundation/CoreFoundation.h> - # include <ApplicationServices/ApplicationServices.h> - #endif -@@ -58,7 +56,7 @@ static int uv__pthread_setname_np(const char* name) { - - - int uv__set_process_title(const char* title) { --#if TARGET_OS_IPHONE -+#if !HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H - return uv__pthread_setname_np(title); - #else - CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef, -@@ -205,5 +203,5 @@ out: - dlclose(application_services_handle); - - return err; --#endif /* !TARGET_OS_IPHONE */ -+#endif /* !HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H */ - } -diff --git a/src/unix/fsevents.c b/src/unix/fsevents.c -index ee45299b..3135e738 100644 ---- a/src/unix/fsevents.c -+++ b/src/unix/fsevents.c -@@ -21,7 +21,7 @@ - #include "uv.h" - #include "internal.h" - --#if TARGET_OS_IPHONE -+#if !HAVE_CORESERVICES_CORESERVICES_H - - /* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */ - -@@ -38,7 +38,7 @@ int uv__fsevents_close(uv_fs_event_t* handle) { - void uv__fsevents_loop_delete(uv_loop_t* loop) { - } - --#else /* TARGET_OS_IPHONE */ -+#else /* !HAVE_CORESERVICES_CORESERVICES_H */ - - #include <dlfcn.h> - #include <assert.h> -@@ -916,4 +916,4 @@ int uv__fsevents_close(uv_fs_event_t* handle) { - return 0; - } - --#endif /* TARGET_OS_IPHONE */ -+#endif /* !HAVE_CORESERVICES_CORESERVICES_H */ -diff --git a/test/test-list.h b/test/test-list.h -index e59c6b65..160f6b36 100644 ---- a/test/test-list.h -+++ b/test/test-list.h -@@ -229,7 +229,9 @@ TEST_DECLARE (get_passwd) - TEST_DECLARE (handle_fileno) - TEST_DECLARE (homedir) - TEST_DECLARE (tmpdir) -+#if !__APPLE__ - TEST_DECLARE (hrtime) -+#endif - TEST_DECLARE (getaddrinfo_fail) - TEST_DECLARE (getaddrinfo_fail_sync) - TEST_DECLARE (getaddrinfo_basic) -@@ -306,6 +308,7 @@ TEST_DECLARE (fs_futime) - TEST_DECLARE (fs_file_open_append) - TEST_DECLARE (fs_stat_missing_path) - TEST_DECLARE (fs_read_file_eof) -+#if !__APPLE__ || HAVE_CORESERVICES_CORESERVICES_H - TEST_DECLARE (fs_event_watch_dir) - TEST_DECLARE (fs_event_watch_dir_recursive) - #ifdef _WIN32 -@@ -327,6 +330,7 @@ TEST_DECLARE (fs_event_close_in_callback) - TEST_DECLARE (fs_event_start_and_close) - TEST_DECLARE (fs_event_error_reporting) - TEST_DECLARE (fs_event_getpath) -+#endif - TEST_DECLARE (fs_scandir_empty_dir) - TEST_DECLARE (fs_scandir_non_existent_dir) - TEST_DECLARE (fs_scandir_file) -@@ -426,9 +430,11 @@ TEST_DECLARE (fork_socketpair) - TEST_DECLARE (fork_socketpair_started) - TEST_DECLARE (fork_signal_to_child) - TEST_DECLARE (fork_signal_to_child_closed) -+#if !__APPLE__ || HAVE_CORESERVICES_CORESERVICES_H - TEST_DECLARE (fork_fs_events_child) - TEST_DECLARE (fork_fs_events_child_dir) - TEST_DECLARE (fork_fs_events_file_parent_child) -+#endif - #ifndef __MVS__ - TEST_DECLARE (fork_threadpool_queue_work_simple) - #endif -@@ -721,7 +727,9 @@ TASK_LIST_START - - TEST_ENTRY (tmpdir) - -+#if !__APPLE__ - TEST_ENTRY (hrtime) -+#endif - - TEST_ENTRY_CUSTOM (getaddrinfo_fail, 0, 0, 10000) - TEST_ENTRY_CUSTOM (getaddrinfo_fail_sync, 0, 0, 10000) -@@ -851,6 +859,7 @@ TASK_LIST_START - TEST_ENTRY (fs_stat_missing_path) - TEST_ENTRY (fs_read_file_eof) - TEST_ENTRY (fs_file_open_append) -+#if !__APPLE__ || HAVE_CORESERVICES_CORESERVICES_H - TEST_ENTRY (fs_event_watch_dir) - TEST_ENTRY (fs_event_watch_dir_recursive) - #ifdef _WIN32 -@@ -872,6 +881,7 @@ TASK_LIST_START - TEST_ENTRY (fs_event_start_and_close) - TEST_ENTRY (fs_event_error_reporting) - TEST_ENTRY (fs_event_getpath) -+#endif - TEST_ENTRY (fs_scandir_empty_dir) - TEST_ENTRY (fs_scandir_non_existent_dir) - TEST_ENTRY (fs_scandir_file) -@@ -921,9 +931,11 @@ TASK_LIST_START - TEST_ENTRY (fork_socketpair_started) - TEST_ENTRY (fork_signal_to_child) - TEST_ENTRY (fork_signal_to_child_closed) -+#if !__APPLE__ || HAVE_CORESERVICES_CORESERVICES_H - TEST_ENTRY (fork_fs_events_child) - TEST_ENTRY (fork_fs_events_child_dir) - TEST_ENTRY (fork_fs_events_file_parent_child) -+#endif - #ifndef __MVS__ - TEST_ENTRY (fork_threadpool_queue_work_simple) - #endif --- -2.17.1 - |