summary refs log tree commit diff
path: root/pkgs/development/libraries/c-ares
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-08-16 21:30:56 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-08-16 22:06:24 +0200
commit062ae9ee0a22d672256daa2fe30a31ba39eaacc3 (patch)
treefa4e4ef6a17eef7522b4dfc0022987d12f03b26b /pkgs/development/libraries/c-ares
parent2058c69de08dc2ca49c3ac683268c712c82da971 (diff)
downloadnixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar.gz
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar.bz2
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar.lz
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar.xz
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.tar.zst
nixpkgs-062ae9ee0a22d672256daa2fe30a31ba39eaacc3.zip
c-ares: fix darwin cmake-config
Diffstat (limited to 'pkgs/development/libraries/c-ares')
-rw-r--r--pkgs/development/libraries/c-ares/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix
index a22437d3993..17624549117 100644
--- a/pkgs/development/libraries/c-ares/default.nix
+++ b/pkgs/development/libraries/c-ares/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, writeTextDir }:
+{ targetPlatform, stdenv, fetchurl, writeTextDir }:
 
 let self =
 stdenv.mkDerivation rec {
@@ -36,12 +36,12 @@ stdenv.mkDerivation rec {
 
       set_target_properties(c-ares::cares PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${self}/include"
-        INTERFACE_LINK_LIBRARIES "nsl;rt"
+        ${stdenv.lib.optionalString stdenv.isLinux ''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"
+        IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${targetPlatform.extensions.sharedLibrary}"
+        IMPORTED_SONAME_RELEASE "libcares${targetPlatform.extensions.sharedLibrary}"
         )
       add_library(c-ares::cares_shared INTERFACE IMPORTED)
       set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")