2023-06-21 07:43:42 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, apr
|
|
|
|
, scons
|
|
|
|
, openssl
|
|
|
|
, aprutil
|
|
|
|
, zlib
|
|
|
|
, libkrb5
|
|
|
|
, pkg-config
|
|
|
|
, libiconv
|
|
|
|
, fetchpatch
|
|
|
|
}:
|
2014-08-05 09:41:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-03 01:01:44 +00:00
|
|
|
pname = "serf";
|
2023-06-21 07:43:42 +00:00
|
|
|
version = "1.3.10";
|
2014-08-05 09:41:32 +00:00
|
|
|
|
2013-12-30 19:32:53 +00:00
|
|
|
src = fetchurl {
|
2021-11-06 01:56:39 +00:00
|
|
|
url = "mirror://apache/serf/${pname}-${version}.tar.bz2";
|
2023-06-21 07:43:42 +00:00
|
|
|
hash = "sha256-voHvCLqiUW7Np2p3rffe97wyJ+61eLmjO0X3tB3AZOY=";
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
|
2021-03-02 23:13:49 +00:00
|
|
|
nativeBuildInputs = [ pkg-config scons ];
|
2018-11-12 02:52:07 +00:00
|
|
|
buildInputs = [ apr openssl aprutil zlib libiconv ]
|
2021-03-14 16:11:48 +00:00
|
|
|
++ lib.optional (!stdenv.isCygwin) libkrb5;
|
2017-08-08 18:33:33 +00:00
|
|
|
|
2023-04-28 12:21:16 +00:00
|
|
|
patches = [
|
|
|
|
./scons.patch
|
2023-06-21 07:43:42 +00:00
|
|
|
|
2023-04-28 12:21:16 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://src.fedoraproject.org/rpms/libserf/raw/rawhide/f/libserf-1.3.9-errgetfunc.patch";
|
|
|
|
hash = "sha256-FQJvXOIZ0iItvbbcu4kR88j74M7fOi7C/0NN3o1/ub4=";
|
|
|
|
})
|
|
|
|
];
|
2013-12-30 19:32:53 +00:00
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
prefixKey = "PREFIX=";
|
2013-12-30 19:32:53 +00:00
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
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-01-21 17:00:13 +00:00
|
|
|
'' + lib.optionalString (!stdenv.isCygwin) ''
|
2021-03-14 16:11:48 +00:00
|
|
|
sconsFlags+=" GSSAPI=${libkrb5.dev}"
|
2013-12-30 19:32:53 +00:00
|
|
|
'';
|
|
|
|
|
2018-06-09 05:56:48 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2013-12-30 19:32:53 +00:00
|
|
|
description = "HTTP client library based on APR";
|
2023-06-21 07:43:42 +00:00
|
|
|
homepage = "https://serf.apache.org/";
|
2018-06-09 05:56:48 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ orivej raskin ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
}
|