Merge recent staging built on Hydra

http://hydra.nixos.org/eval/1231884
Only Darwin jobs seem to be queued now,
but we can't afford to wait for that single build slave.
This commit is contained in:
Vladimír Čunát
2015-12-05 11:11:51 +01:00
68 changed files with 621 additions and 275 deletions

View File

@@ -1,24 +0,0 @@
source $stdenv/setup
installFlags="PREFIX=$out"
if test -n "$sharedLibrary"; then
preBuild() {
make -f Makefile-libbz2_so
}
preInstall() {
mkdir -p $out/lib
mv libbz2.so* $out/lib
(cd $out/lib && ln -s libbz2.so.1.0.? libbz2.so && ln -s libbz2.so.1.0.? libbz2.so.1);
}
fi
postInstall() {
rm $out/bin/bunzip2* $out/bin/bzcat*
ln -s bzip2 $out/bin/bunzip2
ln -s bzip2 $out/bin/bzcat
}
genericBuild

View File

@@ -1,36 +1,72 @@
{ stdenv, fetchurl, linkStatic ? false }:
{ stdenv, fetchurl, libtool, autoconf, automake, gnum4, linkStatic ? false }:
let version = "1.0.6"; in
let
version = "1.0.6";
stdenv.mkDerivation {
sharedLibrary = !stdenv.isDarwin && !(stdenv ? isStatic)
&& stdenv.system != "i686-cygwin" && !linkStatic;
in stdenv.mkDerivation {
name = "bzip2-${version}";
builder = ./builder.sh;
src = fetchurl {
url = "http://www.bzip.org/${version}/bzip2-${version}.tar.gz";
sha256 = "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152";
};
crossAttrs = {
patchPhase = ''
buildInputs = [ libtool autoconf automake gnum4 ];
patches = [
# original upstream for the autoconf patch is here:
# http://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/bzip2-1.0.6-autoconfiscated.patch
# but we get the mingw-builds version of the patch, which fixes
# a few more issues
(fetchurl {
url = "https://raw.githubusercontent.com/niXman/mingw-builds/17ae841dcf6e72badad7941a06d631edaf687436/patches/bzip2/bzip2-1.0.6-autoconfiscated.patch";
sha256 = "1flbd3i8vg9kzq0a712qcg9j2c4ymnqvgd0ldyafpzvbqj1iicnp";
})
];
patchFlags = "-p0";
postPatch = ''
sed -i -e '/<sys\\stat\.h>/s|\\|/|' bzip2.c
sed -i -e 's/CC=gcc/CC=${stdenv.cross.config}-gcc/' \
-e 's/AR=ar/AR=${stdenv.cross.config}-ar/' \
-e 's/RANLIB=ranlib/RANLIB=${stdenv.cross.config}-ranlib/' \
-e 's/bzip2recover test/bzip2recover/' \
Makefile*
'';
preConfigure = "sh ./autogen.sh";
# clear native hooks that are not needed with autoconf
preBuild = "";
preInstall = "";
postInstall = "";
};
sharedLibrary =
!stdenv.isDarwin && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
preBuild = stdenv.lib.optionalString sharedLibrary ''
make -f Makefile-libbz2_so
'';
patchPhase = stdenv.lib.optionalString stdenv.isDarwin "substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'";
preInstall = stdenv.lib.optionalString sharedLibrary ''
mkdir -p $out/lib
mv libbz2.so* $out/lib
( cd $out/lib &&
ln -s libbz2.so.1.0.? libbz2.so &&
ln -s libbz2.so.1.0.? libbz2.so.1
)
'';
preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";
installFlags = [ "PREFIX=$(out)" ];
makeFlags = if linkStatic then "LDFLAGS=-static" else "";
postInstall = ''
rm $out/bin/bunzip2* $out/bin/bzcat*
ln -s bzip2 $out/bin/bunzip2
ln -s bzip2 $out/bin/bzcat
'';
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'
'';
preConfigure = ''
substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'
'';
makeFlags = stdenv.lib.optional linkStatic "LDFLAGS=-static";
inherit linkStatic;

View File

@@ -37,6 +37,8 @@ let
touch -r src/stat.c src/tail.c
'';
configureFlags = optionalString stdenv.isSunOS "ac_cv_func_inotify_init=no";
nativeBuildInputs = [ perl ];
buildInputs = [ gmp ]
++ optional aclSupport acl
@@ -81,6 +83,7 @@ let
enableParallelBuilding = false;
NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0";
@@ -115,6 +118,3 @@ let
};
in
self
// stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux" || stdenv.isSunOS) {
FORCE_UNSAFE_CONFIGURE = 1;
}

View File

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.greenwoodsoftware.com/less/;
description = "A more advanced file pager than more";
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}

View File

@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
'';
configureFlags = [
"--disable-manual"
( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" )
( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" )
( if ldapSupport then "--enable-ldap" else "--disable-ldap" )

View File

@@ -1,4 +1,4 @@
{ stdenv, pkgs, fetchurl, openssl }:
{ stdenv, pkgs, fetchurl, openssl, zlib }:
stdenv.mkDerivation rec {
majorVersion = "1.5";
@@ -10,11 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "16cg1jmy2d8mq2ypwifsvhbyp4pyrj0zm0r818sx0r4hchwdsrcm";
};
buildInputs = [ openssl ];
buildInputs = [ openssl zlib ];
# TODO: make it work on darwin/bsd as well
preConfigure = ''
export makeFlags="TARGET=linux2628 PREFIX=$out USE_OPENSSL=yes"
export makeFlags="TARGET=${if stdenv.isSunOS then "solaris" else "linux2628"} PREFIX=$out USE_OPENSSL=yes USE_ZLIB=yes"
'';
meta = {

View File

@@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
doCheck = !(
stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1
|| stdenv.isDarwin # XXX: `locale' segfaults
|| stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff?
);
buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv

View File

@@ -15,7 +15,7 @@ stdenv.mkDerivation {
buildInputs = [ pcre libiconv ];
# cygwin: FAIL: multibyte-white-space
doCheck = !stdenv.isDarwin && !stdenv.isCygwin;
doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin;
# On Mac OS X, force use of mkdir -p, since Grep's fallback
# (./install-sh) is broken.