From 68493cd8dc25a1e2e4d1007305a39cc710855d86 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 2 Jun 2015 11:32:16 +0200 Subject: [PATCH] Revert "curl: propagate inputs instead of patching pkgconfig" This reverts commit 206d63edaccfccaeedbc5d7fb8828fe8fb6d8305. --- pkgs/tools/networking/curl/default.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index ad2c9ec68970..f8b3ad9355ad 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # Use pkgconfig only when necessary nativeBuildInputs = optional (!isLight) pkgconfig; - propagatedBuildInputs = [ + buildInputs = [ optZlib optOpenssl optLibssh2 optLibnghttp2 optC-ares optGss optRtmpdump optOpenldap optLibidn ]; @@ -102,6 +102,27 @@ stdenv.mkDerivation rec { (mkEnable (optC-ares != null) "ares" null) ]; + # 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} + '' + optionalString (optOpenssl != null) '' + sed -i 's,\(-lssl\|-lcrypto\),-L${optOpenssl}/lib \1,' $out/lib/pkgconfig/libcurl.pc + '' + optionalString (optLibssh2 != null) '' + sed -i 's,\(-lssh2\),-L${optLibssh2}/lib \1,' $out/lib/pkgconfig/libcurl.pc + '' + optionalString (optLibnghttp2 != null) '' + sed -i 's,\(-lnghttp2\),-L${optLibnghttp2}/lib \1,' $out/lib/pkgconfig/libcurl.pc + '' + optionalString (optC-ares != null) '' + sed -i 's,\(-lcares\),-L${optC-ares}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + '' + optionalString (optGss != null) '' + sed -i 's,\(-lgss\),-L${optGss}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + '' + optionalString (optRtmpdump != null) '' + sed -i 's,\(-lrtmp\),-L${optRtmpdump}/lib \1,' $out/lib/pkgconfig/libcurl.pc + '' + optionalString (optOpenldap != null) '' + sed -i 's,\(-lgss\),-L${optOpenldap}/lib \1,' $out/lib/{libcurl.la,pkgconfig/libcurl.pc} + '' + optionalString (optLibidn != null) '' + sed -i 's,\(-lidn\),-L${optLibidn}/lib \1,' $out/lib/pkgconfig/libcurl.pc + ''; + meta = { description = "A command line tool for transferring files with URL syntax"; homepage = http://curl.haxx.se/;