diff options
author | William A. Kennington III <william@wkennington.com> | 2015-05-11 15:12:38 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-05-11 15:12:38 -0700 |
commit | 26c37ded73ce084275d748be26887cf4023c91d6 (patch) | |
tree | ba5bed650142ed5427dffd1a31ab3eeb7658eb67 /pkgs/tools/networking/curl | |
parent | 3e5a0c0034ab68aed388796b2918d50e9d4cee62 (diff) |
curl: Improve .pc and .la patching
Diffstat (limited to 'pkgs/tools/networking/curl')
-rw-r--r-- | pkgs/tools/networking/curl/default.nix | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index f8b3ad9355ad6..689dc3d7d5efa 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -103,24 +103,30 @@ stdenv.mkDerivation rec { ]; # Fix all broken refernces to dependencies in .la and .pc files - postInstall = optionalString (optZlib != null) '' - sed -i 's,\(-lz\),-L${optZlib}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + postInstall = '' + sed -i \ + '' + optionalString (optZlib != null) '' + -e 's,\(-lz\),-L${optZlib}/lib \1,' \ '' + optionalString (optOpenssl != null) '' - sed -i 's,\(-lssl\|-lcrypto\),-L${optOpenssl}/lib \1,' $out/lib/pkgconfig/libcurl.pc + -e 's,\(-lssl\|-lcrypto\),-L${optOpenssl}/lib \1,' \ '' + optionalString (optLibssh2 != null) '' - sed -i 's,\(-lssh2\),-L${optLibssh2}/lib \1,' $out/lib/pkgconfig/libcurl.pc + -e 's,\(-lssh2\),-L${optLibssh2}/lib \1,' \ '' + optionalString (optLibnghttp2 != null) '' - sed -i 's,\(-lnghttp2\),-L${optLibnghttp2}/lib \1,' $out/lib/pkgconfig/libcurl.pc + -e 's,\(-lnghttp2\),-L${optLibnghttp2}/lib \1,' \ '' + optionalString (optC-ares != null) '' - sed -i 's,\(-lcares\),-L${optC-ares}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + -e 's,\(-lcares\),-L${optC-ares}/lib \1,' \ '' + optionalString (optGss != null) '' - sed -i 's,\(-lgss\),-L${optGss}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + -e 's,\(-lgss\),-L${optGss}/lib \1,' \ '' + optionalString (optRtmpdump != null) '' - sed -i 's,\(-lrtmp\),-L${optRtmpdump}/lib \1,' $out/lib/pkgconfig/libcurl.pc + -e 's,\(-lrtmp\),-L${optRtmpdump}/lib \1,' \ '' + optionalString (optOpenldap != null) '' - sed -i 's,\(-lgss\),-L${optOpenldap}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + -e 's,\(-lgss\),-L${optOpenldap}/lib \1,' \ '' + optionalString (optLibidn != null) '' - sed -i 's,\(-lidn\),-L${optLibidn}/lib \1,' $out/lib/pkgconfig/libcurl.pc + -e 's,\(-lidn\),-L${optLibidn}/lib \1,' \ + '' + optionalString (!stdenv.isDarwin) '' + $out/lib/libcurl.la \ + '' + '' + $out/lib/pkgconfig/libcurl.pc ''; meta = { |