2017-08-08 19:33:33 +01:00
|
|
|
{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, kerberos
|
2018-07-21 01:44:44 +01:00
|
|
|
, pkgconfig, libiconv }:
|
2014-08-05 10:41:32 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-02-03 00:56:15 +00:00
|
|
|
name = "serf-1.3.9";
|
2014-08-05 10:41:32 +01:00
|
|
|
|
2013-12-30 19:32:53 +00:00
|
|
|
src = fetchurl {
|
2017-02-03 00:56:15 +00:00
|
|
|
url = "https://www.apache.org/dist/serf/${name}.tar.bz2";
|
|
|
|
sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l";
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
|
2017-08-08 19:33:33 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-08-09 22:53:08 +01:00
|
|
|
buildInputs = [ apr scons openssl aprutil zlib libiconv ]
|
2017-08-08 19:33:33 +01:00
|
|
|
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;
|
|
|
|
|
2018-06-09 06:56:48 +01:00
|
|
|
patches = [ ./scons.patch ];
|
2013-12-30 19:32:53 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2018-06-09 06:56:48 +01:00
|
|
|
scons \
|
|
|
|
-j $NIX_BUILD_CORES \
|
|
|
|
APR="$(echo ${apr.dev}/bin/*-config)" \
|
|
|
|
APU="$(echo ${aprutil.dev}/bin/*-config)" \
|
|
|
|
CC=$CC \
|
|
|
|
OPENSSL=${openssl} \
|
|
|
|
PREFIX="$out" \
|
|
|
|
ZLIB=${zlib} \
|
|
|
|
${
|
|
|
|
if stdenv.isCygwin then "" else "GSSAPI=${kerberos.dev}"
|
|
|
|
}
|
2013-12-30 19:32:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
scons install
|
|
|
|
'';
|
|
|
|
|
2018-06-09 06:56:48 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-12-30 19:32:53 +00:00
|
|
|
description = "HTTP client library based on APR";
|
2018-06-09 06:56:48 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ orivej raskin ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
}
|