about summary refs log tree commit diff
path: root/pkgs/tools/networking/curl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/curl/default.nix')
-rw-r--r--pkgs/tools/networking/curl/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 3c77d2a6c8d6..5e283943baf4 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl
+{ stdenv, fetchurl, pkgconfig
 , idnSupport ? false, libidn ? null
 , ldapSupport ? false, openldap ? null
 , zlibSupport ? false, zlib ? null
@@ -23,6 +23,9 @@ stdenv.mkDerivation rec {
     sha256 = "1slq5c0v9wa8hajgimhkxhvsrd07jmih8sa3gjsl597qp5k4w5b5";
   };
 
+  outputs = [ "dev" "out" "bin" "man" "docdev" ];
+
+  nativeBuildInputs = [ pkgconfig ];
   # Zlib and OpenSSL must be propagated because `libcurl.la' contains
   # "-lz -lssl", which aren't necessary direct build inputs of
   # applications that use Curl.
@@ -60,6 +63,11 @@ stdenv.mkDerivation rec {
   CXX = "g++";
   CXXCPP = "g++ -E";
 
+  postInstall = ''
+    moveToOutput bin/curl-config "$dev"
+    sed '/^dependency_libs/s|${libssh2.dev}|${libssh2.out}|' -i "$out"/lib/*.la
+  '';
+
   crossAttrs = {
     # We should refer to the cross built openssl
     # For the 'urandom', maybe it should be a cross-system option