mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
serf: fix build
This commit is contained in:
parent
0ff782e141
commit
f4ca99166a
@ -1,4 +1,5 @@
|
||||
{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, kerberos, pkgconfig, gnused }:
|
||||
{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, kerberos
|
||||
, pkgconfig, gnused, expat, openldap }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "serf-1.3.9";
|
||||
@ -8,18 +9,22 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ apr scons openssl aprutil zlib ]
|
||||
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos
|
||||
++ [ pkgconfig ];
|
||||
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;
|
||||
|
||||
configurePhase = ''
|
||||
${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
|
||||
postPatch = ''
|
||||
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"]})' \
|
||||
-e 's,$OPENSSL/lib,${openssl.out}/lib,' \
|
||||
-e 's,$OPENSSL/include,${openssl.dev}/include,' \
|
||||
-i SConstruct
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
scons PREFIX="$out" OPENSSL="${openssl.dev}" ZLIB="${zlib.dev}" APR="$(echo "${apr.dev}"/bin/*-config)" \
|
||||
scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr.dev}"/bin/*-config)" CFLAGS="-I${zlib.dev}/include" \
|
||||
LINKFLAGS="-L${zlib.out}/lib -L${expat}/lib -L${openldap}/lib" \
|
||||
APU="$(echo "${aprutil.dev}"/bin/*-config)" CC="${
|
||||
if stdenv.cc.isClang then "clang" else "${stdenv.cc}/bin/gcc"
|
||||
}" ${
|
||||
|
Loading…
Reference in New Issue
Block a user