Merge remote-tracking branch 'upstream/master' into hardened-stdenv

This commit is contained in:
Robin Gloster
2016-04-18 13:49:22 +00:00
1369 changed files with 35810 additions and 10571 deletions
+21 -9
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, openssl, perl, zlib
{ stdenv, fetchurl, pkgconfig, openssl, perl, zlib
, sslSupport, proxySupport ? true
, apr, aprutil, pcre
, ldapSupport ? true, openldap
@@ -20,17 +20,24 @@ stdenv.mkDerivation rec {
sha256 = "1b165zi7jrrlz5wmyy3b34lcs3dl4g0dymfb0qxwdnimylcrsbzk";
};
buildInputs = [perl apr aprutil pcre] ++
stdenv.lib.optional sslSupport openssl;
# FIXME: -dev depends on -doc
outputs = [ "dev" "out" "doc" ];
setOutputFlags = false; # it would move $out/modules, etc.
# An apr-util header file includes an apr header file
# through #include "" (quotes)
# passing simply CFLAGS did not help, then I go by NIX_CFLAGS_COMPILE
NIX_CFLAGS_COMPILE = "-iquote ${apr}/include/apr-1";
propagatedBuildInputs = [ apr ]; # otherwise mod_* fail to find includes often
buildInputs = [ pkgconfig perl aprutil pcre zlib ] ++
stdenv.lib.optional sslSupport openssl;
# Required for pthread_cancel.
NIX_LDFLAGS = (if stdenv.isDarwin then "" else "-lgcc_s");
patchPhase = ''
sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
'';
preConfigure = ''
configureFlags="$configureFlags --includedir=$dev/include"
'';
configureFlags = ''
--with-z=${zlib}
--with-pcre=${pcre}
@@ -44,13 +51,18 @@ stdenv.mkDerivation rec {
--enable-disk-cache
--enable-file-cache
--enable-mem-cache
--docdir=$(doc)/share/doc
'';
enableParallelBuilding = true;
stripDebugList = "lib modules bin";
postInstall = ''
echo "removing manual"
rm -rf $out/manual
mkdir -p $doc/share/doc/httpd
mv $out/manual $doc/share/doc/httpd
mkdir -p $dev/bin
mv $out/bin/apxs $dev/bin/apxs
'';
passthru = {
+22 -7
View File
@@ -24,15 +24,27 @@ stdenv.mkDerivation rec {
sha256 = "0k7xm6ldzvakzq39nw6b39190ihlkc28all2gkvckxa1vr8b0i06";
};
# FIXME: -dev depends on -doc
outputs = [ "dev" "out" "doc" ];
setOutputFlags = false; # it would move $out/modules, etc.
buildInputs = [perl] ++
optional sslSupport openssl ++
optional ldapSupport openldap ++ # there is no --with-ldap flag
optional libxml2Support libxml2 ++
optional http2Support libnghttp2 ++
optional stdenv.isDarwin libiconv;
patchPhase = ''
sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
'';
# Required for pthread_cancel.
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
preConfigure = ''
configureFlags="$configureFlags --includedir=$dev/include"
'';
configureFlags = ''
--with-apr=${apr}
--with-apr-util=${aprutil}
@@ -46,19 +58,22 @@ stdenv.mkDerivation rec {
--enable-imagemap
--enable-cgi
${optionalString proxySupport "--enable-proxy"}
${optionalString sslSupport "--enable-ssl --with-ssl=${openssl}"}
${optionalString sslSupport "--enable-ssl"}
${optionalString http2Support "--enable-http2 --with-nghttp2=${libnghttp2}"}
${optionalString luaSupport "--enable-lua --with-lua=${lua5}"}
${optionalString libxml2Support "--with-libxml2=${libxml2}/include/libxml2"}
'';
postInstall = ''
echo "removing manual"
rm -rf $out/manual
${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"}
--docdir=$(doc)/share/doc
'';
enableParallelBuilding = true;
postInstall = ''
mkdir -p $doc/share/doc/httpd
mv $out/manual $doc/share/doc/httpd
mkdir -p $dev/bin
mv $out/bin/apxs $dev/bin/apxs
'';
passthru = {
inherit apr aprutil sslSupport proxySupport ldapSupport;
};
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
preBuild = ''
cp Makefile.AP2 Makefile
makeFlags="top_dir=${apacheHttpd} prefix=$out"
makeFlags="top_dir=${apacheHttpd}/share prefix=$out"
'';
meta = {
+1 -1
View File
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
[ "--with-file-aio" "--with-aio_module" ]
++ map (mod: "--add-module=${mod.src}") modules;
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
+3 -3
View File
@@ -8,10 +8,10 @@
with stdenv.lib;
let
version = "1.9.11";
version = "1.9.14";
mainSrc = fetchurl {
url = "http://nginx.org/download/nginx-${version}.tar.gz";
sha256 = "07x5d2ryf547xrj4wp8w90kz2d93sxjhkfjb0vdscmxgmzs74p3a";
sha256 = "1ljpyigqb6sbm4f8mi4fyvwfcvfapzg4z35s9cwb9ri8dl3r6j1b";
};
in
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio"
++ map (mod: "--add-module=${mod.src}") modules;
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
@@ -15,11 +15,11 @@ stdenv.mkDerivation rec {
--replace @coreutils@ "${coreutils}/bin" \
--replace @findutils@ "${findutils}/bin" \
--replace @nix@ "${nix}/bin" \
--replace @xz@ "${xz}/bin" \
--replace @bzip2@ "${bzip2}/bin" \
--replace @xz@ "${xz.bin}/bin" \
--replace @bzip2@ "${bzip2.bin}/bin" \
--replace @gnused@ "${gnused}/bin" \
--replace @gnugrep@ "${gnugrep}/bin" \
--replace @openssl@ "${openssl}/bin" \
--replace @openssl@ "${openssl.bin}/bin" \
--replace @lighttpd@ "${lighttpd}/sbin" \
--replace @iproute@ "${iproute}/sbin" \
--replace "xXxXx" "xXxXx"
@@ -32,11 +32,11 @@ stdenv.mkDerivation rec {
--replace @coreutils@ "${coreutils}/bin" \
--replace @findutils@ "${findutils}/bin" \
--replace @nix@ "${nix}/bin" \
--replace @xz@ "${xz}/bin" \
--replace @bzip2@ "${bzip2}/bin" \
--replace @xz@ "${xz.bin}/bin" \
--replace @bzip2@ "${bzip2.bin}/bin" \
--replace @gnused@ "${gnused}/bin" \
--replace @gnugrep@ "${gnugrep}/bin" \
--replace @openssl@ "${openssl}/bin" \
--replace @openssl@ "${openssl.bin}/bin" \
--replace @lighttpd@ "${lighttpd}/sbin" \
--replace @iproute@ "${iproute}/sbin" \
--replace "xXxXx" "xXxXx"
+2 -2
View File
@@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
'';
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags"
export PATH="$PATH:${stdenv.cc.libc}/sbin"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags"
export PATH="$PATH:${stdenv.cc.libc.bin}/bin"
patchShebangs .
'';
+2 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "thttpd-${version}";
version = "2.26";
version = "2.27";
src = fetchurl {
url = "http://acme.com/software/thttpd/${name}.tar.gz";
sha256 = "1idlpnwrd5fpmnfh477h1lzanavx8jxir2d8adax46zy472dg4s6";
sha256 = "0ykda5k1zzzag59zbd4bkzj1psavq0xnpy7vpk19rhx7mlvvri5i";
};
prePatch = ''