2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, apr
|
|
|
|
, scons
|
|
|
|
, openssl
|
|
|
|
, aprutil
|
|
|
|
, zlib
|
|
|
|
, libkrb5
|
|
|
|
, pkg-config
|
|
|
|
, libiconv
|
|
|
|
, fetchpatch
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
pname = "serf";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://apache/serf/${pname}-${version}.tar.bz2";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-voHvCLqiUW7Np2p3rffe97wyJ+61eLmjO0X3tB3AZOY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
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 ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optional (!stdenv.hostPlatform.isCygwin) libkrb5;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = [
|
|
|
|
./scons.patch
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://src.fedoraproject.org/rpms/libserf/raw/rawhide/f/libserf-1.3.9-errgetfunc.patch";
|
|
|
|
hash = "sha256-FQJvXOIZ0iItvbbcu4kR88j74M7fOi7C/0NN3o1/ub4=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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}"
|
2024-09-26 11:04:55 +00:00
|
|
|
'' + lib.optionalString (!stdenv.hostPlatform.isCygwin) ''
|
2021-04-05 15:23:46 +00:00
|
|
|
sconsFlags+=" GSSAPI=${libkrb5.dev}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://serf.apache.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ orivej raskin ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|