diff options
author | Shea Levy <shea@shealevy.com> | 2018-01-08 21:27:12 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-01-08 21:27:32 -0500 |
commit | 6d3ff29d038c05eab7c6989f88906912489e2ad9 (patch) | |
tree | f28112740d0b6b04ae5ed6d7fea972947411f45d /pkgs/development/libraries/c-ares | |
parent | 9d7883374c83c0d3c0d54a0bd5b1b8fd35847431 (diff) |
Add grpc.
Diffstat (limited to 'pkgs/development/libraries/c-ares')
-rw-r--r-- | pkgs/development/libraries/c-ares/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/libraries/c-ares/release.patch | 19 |
2 files changed, 46 insertions, 2 deletions
diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index 14ff7a5f16c30..6b3b69f999711 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -1,5 +1,6 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, writeTextDir }: +let self = stdenv.mkDerivation rec { name = "c-ares-1.13.0"; @@ -14,4 +15,28 @@ stdenv.mkDerivation rec { license = licenses.mit; platforms = platforms.all; }; -} + + # Adapted from running a cmake build + passthru.cmake-config = writeTextDir "c-ares-config.cmake" + '' + set(c-ares_INCLUDE_DIR "${self}/include") + + set(c-ares_LIBRARY c-ares::cares) + + add_library(c-ares::cares SHARED IMPORTED) + + set_target_properties(c-ares::cares PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${self}/include" + INTERFACE_LINK_LIBRARIES "nsl;rt" + ) + set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(c-ares::cares PROPERTIES + IMPORTED_LOCATION_RELEASE "${self}/lib/libcares.so.2.2.0" + IMPORTED_SONAME_RELEASE "libcares.so.2" + ) + add_library(c-ares::cares_shared INTERFACE IMPORTED) + set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") + set(c-ares_SHARED_LIBRARY c-ares::cares_shared) + ''; + +}; in self diff --git a/pkgs/development/libraries/c-ares/release.patch b/pkgs/development/libraries/c-ares/release.patch new file mode 100644 index 0000000000000..e745648062a5b --- /dev/null +++ b/pkgs/development/libraries/c-ares/release.patch @@ -0,0 +1,19 @@ +diff -aur c-ares-cares-1_13_0/ares_version.h c-ares-1.13.0/ares_version.h +--- c-ares-cares-1_13_0/ares_version.h 2017-06-20 02:00:21.000000000 -0400 ++++ c-ares-1.13.0/ares_version.h 2017-06-20 02:03:54.000000000 -0400 +@@ -6,12 +6,12 @@ + #define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, <daniel@haxx.se>." + + #define ARES_VERSION_MAJOR 1 +-#define ARES_VERSION_MINOR 12 +-#define ARES_VERSION_PATCH 1 ++#define ARES_VERSION_MINOR 13 ++#define ARES_VERSION_PATCH 0 + #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ + (ARES_VERSION_MINOR<<8)|\ + (ARES_VERSION_PATCH)) +-#define ARES_VERSION_STR "1.12.1-DEV" ++#define ARES_VERSION_STR "1.13.0" + + #if (ARES_VERSION >= 0x010700) + # define CARES_HAVE_ARES_LIBRARY_INIT 1 |