2021-03-09 03:18:52 +00:00
|
|
|
{ lib, stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, kerberos
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
pname = "serf";
|
|
|
|
version = "1.3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-09 03:18:52 +00:00
|
|
|
url = "https://www.apache.org/dist/serf/${pname}-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ pkg-config scons ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ apr openssl aprutil zlib libiconv ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional (!stdenv.isCygwin) kerberos;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./scons.patch ];
|
|
|
|
|
|
|
|
prefixKey = "PREFIX=";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sconsFlags+=" APR=$(echo ${apr.dev}/bin/*-config)"
|
|
|
|
sconsFlags+=" APU=$(echo ${aprutil.dev}/bin/*-config)"
|
|
|
|
sconsFlags+=" CC=$CC"
|
|
|
|
sconsFlags+=" OPENSSL=${openssl}"
|
|
|
|
sconsFlags+=" ZLIB=${zlib}"
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString (!stdenv.isCygwin) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
sconsFlags+=" GSSAPI=${kerberos.dev}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTTP client library based on APR";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ orivej raskin ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|