gdb: use system zlib, fix guile support

This commit is contained in:
Nikolay Amiantov 2015-11-26 15:00:36 +03:00
parent bf14849534
commit d96f7128e1

View File

@ -1,6 +1,8 @@
{ fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo { fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo, zlib
, dejagnu, python, perl, pkgconfig, guile, target ? null , dejagnu, perl, pkgconfig
, python ? null
, guile ? null
, target ? null
# Additional dependencies for GNU/Hurd. # Additional dependencies for GNU/Hurd.
, mig ? null, hurd ? null , mig ? null, hurd ? null
@ -30,32 +32,29 @@ stdenv.mkDerivation rec {
sha256 = "1a08c9svaihqmz2mm44il1gwa810gmwkckns8b0y0v3qz52amgby"; sha256 = "1a08c9svaihqmz2mm44il1gwa810gmwkckns8b0y0v3qz52amgby";
}; };
# I think python is not a native input, but I leave it nativeBuildInputs = [ pkgconfig texinfo perl ]
# here while I will not need it cross building
nativeBuildInputs = [ texinfo python perl ]
++ stdenv.lib.optional isGNU mig; ++ stdenv.lib.optional isGNU mig;
buildInputs = [ ncurses readline gmp mpfr expat /* pkgconfig guile */ ] buildInputs = [ ncurses readline gmp mpfr expat zlib python guile ]
++ stdenv.lib.optional isGNU hurd ++ stdenv.lib.optional isGNU hurd
++ stdenv.lib.optional doCheck dejagnu; ++ stdenv.lib.optional doCheck dejagnu;
enableParallelBuilding = true; enableParallelBuilding = true;
configureFlags = with stdenv.lib; configureFlags = with stdenv.lib;
'' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline [ "--with-gmp=${gmp}" "--with-mpfr=${mpfr}" "--with-system-readline"
--with-expat --with-libexpat-prefix=${expat} "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat}"
--with-separate-debug-dir=/run/current-system/sw/lib/debug "--with-separate-debug-dir=/run/current-system/sw/lib/debug"
'' ]
+ optionalString (target != null) " --target=${target.config}" ++ optional (target != null) "--target=${target.config}"
+ optionalString (elem stdenv.system platforms.cygwin) " --without-python"; ++ optional (elem stdenv.system platforms.cygwin) "--without-python";
crossAttrs = { crossAttrs = {
# Do not add --with-python here to avoid cross building it. # Do not add --with-python here to avoid cross building it.
configureFlags = configureFlags = with stdenv.lib;
'' --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} --with-system-readline [ "--with-gmp=${gmp.crossDrv}" "--with-mpfr=${mpfr.crossDrv}" "--with-system-readline"
--with-expat --with-libexpat-prefix=${expat.crossDrv} --without-python "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.crossDrv}" "--without-python"
'' + stdenv.lib.optionalString (target != null) ] ++ optional (target != null) "--target=${target.config}";
" --target=${target.config}";
}; };
postInstall = postInstall =