2014-08-21 02:30:50 +00:00
|
|
|
{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, krb5, pkgconfig, gnused }:
|
2014-08-05 09:41:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-09-02 10:44:44 +00:00
|
|
|
name = "serf-1.3.7";
|
2014-08-05 09:41:32 +00:00
|
|
|
|
2013-12-30 19:32:53 +00:00
|
|
|
src = fetchurl {
|
2014-08-05 09:41:32 +00:00
|
|
|
url = "http://serf.googlecode.com/svn/src_releases/${name}.tar.bz2";
|
2014-08-31 14:36:07 +00:00
|
|
|
sha256 = "1bphz616dv1svc50kkm8xbgyszhg3ni2dqbij99sfvjycr7bgk7c";
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
|
2014-08-05 09:41:32 +00:00
|
|
|
buildInputs = [ apr scons openssl aprutil zlib krb5 pkgconfig ];
|
|
|
|
|
2013-12-30 19:32:53 +00:00
|
|
|
configurePhase = ''
|
2014-08-21 02:30:50 +00:00
|
|
|
${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"PATH":os.environ["PATH"]})' -i SConstruct
|
|
|
|
${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_CFLAGS_COMPILE":os.environ["NIX_CFLAGS_COMPILE"]})' -i SConstruct
|
|
|
|
${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_LDFLAGS":os.environ["NIX_LDFLAGS"]})' -i SConstruct
|
2013-12-30 19:32:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \
|
2014-08-17 20:17:13 +00:00
|
|
|
APU="$(echo "${aprutil}"/bin/*-config)" GSSAPI="${krb5}" CC="${
|
2014-12-17 18:11:30 +00:00
|
|
|
if stdenv.isDarwin then "clang" else "${stdenv.cc}/bin/gcc"
|
2014-08-17 20:17:13 +00:00
|
|
|
}"
|
2013-12-30 19:32:53 +00:00
|
|
|
'';
|
|
|
|
|
2014-08-17 20:17:13 +00:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-L/usr/lib";
|
|
|
|
|
2013-12-30 19:32:53 +00:00
|
|
|
installPhase = ''
|
|
|
|
scons install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "HTTP client library based on APR";
|
2014-09-02 10:44:44 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2013-12-30 19:32:53 +00:00
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
2014-01-23 10:57:31 +00:00
|
|
|
hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
2013-12-30 19:32:53 +00:00
|
|
|
};
|
|
|
|
}
|