serf: update scons patch, enable kerberos on darwin
NIX_CFLAGS_COMPILE set by the old patch is long not recognized by cc wrappers.
This commit is contained in:
parent
2b1915b9f6
commit
5d960b51c6
|
@ -13,31 +13,32 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ apr scons openssl aprutil zlib libiconv ]
|
buildInputs = [ apr scons openssl aprutil zlib libiconv ]
|
||||||
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;
|
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;
|
||||||
|
|
||||||
postPatch = ''
|
patches = [ ./scons.patch ];
|
||||||
sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"PATH":os.environ["PATH"]})' \
|
|
||||||
-e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_CFLAGS_COMPILE":os.environ["NIX_CFLAGS_COMPILE"]})' \
|
|
||||||
-e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_LDFLAGS":os.environ["NIX_LDFLAGS"]})' \
|
|
||||||
-i SConstruct
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr.dev}"/bin/*-config)" CFLAGS="-I${zlib.dev}/include" \
|
scons \
|
||||||
LINKFLAGS="-L${zlib.out}/lib -L${openldap}/lib -L${libiconv}/lib" \
|
-j $NIX_BUILD_CORES \
|
||||||
APU="$(echo "${aprutil.dev}"/bin/*-config)" CC=$CC ${
|
APR="$(echo ${apr.dev}/bin/*-config)" \
|
||||||
if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos.dev}\""
|
APU="$(echo ${aprutil.dev}/bin/*-config)" \
|
||||||
|
CC=$CC \
|
||||||
|
OPENSSL=${openssl} \
|
||||||
|
PREFIX="$out" \
|
||||||
|
ZLIB=${zlib} \
|
||||||
|
${
|
||||||
|
if stdenv.isCygwin then "" else "GSSAPI=${kerberos.dev}"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-L/usr/lib";
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
scons install
|
scons install
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
description = "HTTP client library based on APR";
|
description = "HTTP client library based on APR";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [stdenv.lib.maintainers.raskin];
|
maintainers = with maintainers; [ orivej raskin ];
|
||||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 4358a23..0d862e7 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -155,6 +155,7 @@ if sys.platform == 'win32':
|
||||||
|
env = Environment(variables=opts,
|
||||||
|
tools=('default', 'textfile',),
|
||||||
|
CPPPATH=['.', ],
|
||||||
|
+ ENV=os.environ,
|
||||||
|
)
|
||||||
|
|
||||||
|
env.Append(BUILDERS = {
|
Loading…
Reference in New Issue