summary refs log tree commit diff
path: root/pkgs/tools/networking/curl
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-06 15:32:17 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-13 20:18:48 +0200
commit99e4371526a9cc48f1f10e2e9f144e3e839ad709 (patch)
tree1cc37b42aae06673023c0e7c4168dda47d12f182 /pkgs/tools/networking/curl
parente71c9cfaa23ddaffc03667e2020cf2ee6bd71fb7 (diff)
downloadnixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar.gz
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar.bz2
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar.lz
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar.xz
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.tar.zst
nixlib-99e4371526a9cc48f1f10e2e9f144e3e839ad709.zip
curl: split into multiple outputs
Also use pkgconfig to be safer and fix (some) referrers.
Diffstat (limited to 'pkgs/tools/networking/curl')
-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 f9f638ec8136..5a134e572ae9 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 = "050q6i20lbh7dyyhva2sbp8dbyp6sghlkbpvq2bvcasqwsx4298y";
   };
 
+  outputs = [ "dev" "out" "bin" "doc" ]; # man3 is "dev-doc"
+
+  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.
@@ -59,6 +62,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