Merge remote-tracking branch 'upstream/staging' into master

This commit is contained in:
Tuomas Tynkkynen 2017-12-03 01:49:14 +02:00
commit 58307d15a7
17 changed files with 104 additions and 106 deletions

View file

@ -97,10 +97,12 @@ ccWrapper_addCVars () {
# setup-hook, which `role` tracks.
if [ -n "${crossConfig:-}" ]; then
export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
role="BUILD_"
role_pre='BUILD_'
role_post='_FOR_BUILD'
else
export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
role=""
role_pre=''
role_post=''
fi
# Eventually the exact sort of env-hook we create will depend on the role. This
@ -133,20 +135,24 @@ fi
# Export tool environment variables so various build systems use the right ones.
export NIX_${role}CC=@out@
export NIX_${role_pre}CC=@out@
export ${role}CC=@named_cc@
export ${role}CXX=@named_cxx@
export ${role_pre}CC=@named_cc@
export ${role_pre}CXX=@named_cxx@
export CC${role_post}=@named_cc@
export CXX${role_post}=@named_cxx@
for CMD in \
ar as nm objcopy ranlib strip strings size ld windres
for cmd in \
ar as ld nm objcopy objdump readelf ranlib strip strings size windres
do
if
PATH=$_PATH type -p "@targetPrefix@$CMD" > /dev/null
PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
then
export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@targetPrefix@${CMD}";
upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
export "${role_pre}${upper_case}=@targetPrefix@${cmd}";
export "${upper_case}${role_post}=@targetPrefix@${cmd}";
fi
done
# No local scope in sourced file
unset role
unset -v role_pre role_post cmd upper_case

View file

@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
cp tzfile.h "$dev/include/tzfile.h"
'';
setupHook = ./tzdata-setup-hook.sh;
meta = {
homepage = http://www.iana.org/time-zones;
description = "Database of current and historical time zones";

View file

@ -0,0 +1,6 @@
tzdataHook() {
export TZDIR=@out@/share/zoneinfo
}
envHooks+=(tzdataHook)
crossEnvHooks+=(tzdataHook)

View file

@ -115,7 +115,7 @@ let version = "4.8.5";
gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null;
in
in
optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -186,7 +186,7 @@ let version = "4.8.5";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips;
bootstrap = targetPlatform == hostPlatform;
in
@ -343,14 +343,6 @@ stdenv.mkDerivation ({
}"
] ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
(if enableMultilib
then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"]) ++
@ -359,6 +351,14 @@ stdenv.mkDerivation ({
then ["--enable-plugin"]
else ["--disable-plugin"]) ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
optionals (cloog != null) [
"--with-cloog=${cloog}"
"--disable-cloog-version-check"
"--enable-cloog-backend=isl"
] ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
@ -422,7 +422,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =
@ -431,7 +431,7 @@ stdenv.mkDerivation ({
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++
optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++
[
"--with-gmp=${gmp.crossDrv}"
"--with-mpfr=${mpfr.crossDrv}"
@ -502,7 +502,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS =
if targetPlatform != hostPlatform && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
"-idirafter ${getDev libcCross}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"

View file

@ -106,7 +106,7 @@ let version = "4.9.4";
gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null;
in
in
optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -421,7 +421,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =
@ -430,7 +430,7 @@ stdenv.mkDerivation ({
optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++
optionals (cloog != null) ["--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl"] ++
[
"--with-gmp=${gmp.crossDrv}"
"--with-mpfr=${mpfr.crossDrv}"
@ -501,7 +501,7 @@ stdenv.mkDerivation ({
EXTRA_TARGET_CFLAGS =
if targetPlatform != hostPlatform && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
"-idirafter ${getDev libcCross}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"

View file

@ -110,7 +110,7 @@ let version = "5.5.0";
gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null;
in
in
optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -201,8 +201,6 @@ stdenv.mkDerivation ({
inherit sha256;
};
hardeningDisable = [ "format" ];
inherit patches;
outputs = [ "out" "lib" "man" "info" ];
@ -211,6 +209,8 @@ stdenv.mkDerivation ({
libc_dev = stdenv.cc.libc_dev;
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
@ -356,9 +356,6 @@ stdenv.mkDerivation ({
}"
] ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
(if enableMultilib
then ["--enable-multilib" "--disable-libquadmath"]
else ["--disable-multilib"]) ++
@ -367,6 +364,9 @@ stdenv.mkDerivation ({
then ["--enable-plugin"]
else ["--disable-plugin"]) ++
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
@ -431,7 +431,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =
@ -490,7 +490,7 @@ stdenv.mkDerivation ({
CPATH = makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib
++ optionals langJava [ boehmgc ]
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread

View file

@ -181,7 +181,7 @@ let version = "6.4.0";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
bootstrap = targetPlatform == hostPlatform;
bootstrap = targetPlatform == hostPlatform;
in
@ -383,7 +383,7 @@ stdenv.mkDerivation ({
# Ada
optional langAda "--enable-libada" ++
# Cross compilation
# Cross-compilation
optional (targetPlatform == hostPlatform) (
let incDir = if hostPlatform.isDarwin
then "${darwin.usr-include}"
@ -391,12 +391,13 @@ stdenv.mkDerivation ({
in "--with-native-system-header-dir=${incDir}"
) ++
optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
optional (!bootstrap) "--disable-bootstrap" ++
# Platform-specific flags
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
optionals (hostPlatform.isSunOS) [
optionals hostPlatform.isSunOS [
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
@ -430,7 +431,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =

View file

@ -105,7 +105,7 @@ let version = "7.2.0";
gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null;
in
in
optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -426,7 +426,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =
optional (!enableMultilib) "--disable-multilib" ++

View file

@ -105,7 +105,7 @@ let version = "7-20170409";
gccFpu = platform.gcc.fpu or null;
gccFloat = platform.gcc.float or null;
gccMode = platform.gcc.mode or null;
in
in
optional (gccArch != null) "--with-arch=${gccArch}" ++
optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
optional (gccAbi != null) "--with-abi=${gccAbi}" ++
@ -412,7 +412,7 @@ stdenv.mkDerivation ({
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
NM_FOR_TARGET = "${targetPlatform.config}-nm";
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
# If we are making a cross compiler, cross != null
# If we are making a cross compiler, targetPlatform != hostPlatform
NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
dontStrip = true;
configureFlags =

View file

@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc
'';
doCheck = true;
# https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15
doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling
meta = with stdenv.lib; {
description = "The Oil Runtime Compiler";

View file

@ -1,11 +1,12 @@
{ stdenv, fetchurl, libgcrypt, curl, gnutls, pkgconfig, libiconv, libintlOrEmpty }:
stdenv.mkDerivation rec {
name = "libmicrohttpd-0.9.55";
name = "libmicrohttpd-${version}";
version = "0.9.57";
src = fetchurl {
url = "mirror://gnu/libmicrohttpd/${name}.tar.gz";
sha256 = "1y6h1slav5l6k8zyb01dpw65dscdgxxgfa3a0z9qnn7jr66sn70c";
sha256 = "0kmgkk9sjg1n3q7rbzw5y4qmgh51zn5qi2j69gbqmr6phxjaghfy";
};
outputs = [ "out" "dev" "devdoc" "info" ];

View file

@ -1,18 +1,18 @@
{ stdenv, fetchurl, glib, libxml2, pkgconfig
{ stdenv, fetchurl, fetchpatch, glib, libxml2, pkgconfig
, gnomeSupport ? true, libgnome_keyring3, sqlite, glib_networking, gobjectIntrospection
, valaSupport ? true, vala_0_38
, libintlOrEmpty
, intltool, python }:
let
majorVersion = "2.60";
version = "${majorVersion}.0";
version = "${majorVersion}.2";
in
stdenv.mkDerivation {
name = "libsoup-${version}";
src = fetchurl {
url = "mirror://gnome/sources/libsoup/${majorVersion}/libsoup-${version}.tar.xz";
sha256 = "b324edbecda0884143c0853b4a2bd5bd37fb3761f12f293c621ff34b9acdc84c";
sha256 = "7263cfe18872e2e652c196f5667e514616d9c97c861dfca82a65a55f45f0da01";
};
prePatch = ''
@ -22,6 +22,15 @@ stdenv.mkDerivation {
substituteInPlace libsoup/Makefile.in --replace "\$(DESTDIR)\$(vapidir)" "\$(DESTDIR)\$(girdir)/../vala/vapi"
'';
patches = [
# remove for >= 2.60.3
(fetchpatch {
name = "buffer-overflow.patch"; # https://bugzilla.gnome.org/show_bug.cgi?id=788037
url = "https://git.gnome.org/browse/libsoup/patch/?id=b79689833ba";
sha256 = "1azbk540mbm4c6ip54ixbg9d6w7nkls9y81fzm3csq9a5786r3d3";
})
];
outputs = [ "out" "dev" ];
buildInputs = libintlOrEmpty ++ [ intltool python sqlite ]

View file

@ -1,50 +1,28 @@
{ lib, fetchurl, fetchpatch, python, buildPythonPackage, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35, isPy36, isPy3k }:
{ lib, fetchFromGitHub, python, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPyPy }:
if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else let
patch_waf = fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_python_3_4-1.patch;
sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4";
};
patch_waf-py3_5 = ./waf-py3_5.patch;
in buildPythonPackage rec {
buildPythonPackage rec {
pname = "pycairo";
version = "1.10.0";
version = "1.15.4";
name = "${pname}-${version}";
format = "other";
src = if isPy3k
then fetchurl {
url = "http://cairographics.org/releases/pycairo-${version}.tar.bz2";
sha256 = "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s";
}
else fetchurl {
url = "http://cairographics.org/releases/py2cairo-${version}.tar.bz2";
sha256 = "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k";
};
disabled = isPyPy;
patches = [
(fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_unpack-1.patch;
sha256 = "1bmrhq2nmhx4l5glvyi59r0hc7w5m56kz41frx7v3dcp8f91p7xd";
})
];
src = fetchFromGitHub {
owner = "pygobject";
repo = "pycairo";
rev = "v${version}";
sha256 = "02vzmfxx8nl6dbwzc911wcj7hqspgqz6v9xmq6579vwfla0vaglv";
};
postPatch = ''
# we are unable to pass --prefix to bdist_wheel
# see https://github.com/NixOS/nixpkgs/pull/32034#discussion_r153285955
substituteInPlace setup.py --replace '"prefix": self.install_base' "'prefix': '$out'"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python cairo xlibsWrapper ];
configurePhase = ''
(
cd $(${python.executable} waf unpack)
patch -p1 < ${patch_waf}
${lib.optionalString (isPy35 || isPy36) "patch -p1 < ${patch_waf-py3_5}"}
)
${python.executable} waf configure --prefix=$out
'';
buildPhase = "${python.executable} waf";
installPhase = "${python.executable} waf install";
checkInputs = [ pytest ];
meta.platforms = lib.platforms.linux ++ lib.platforms.darwin;
}

View file

@ -1,10 +0,0 @@
--- a/waflib/Build.py
+++ b/waflib/Build.py
@@ -151,6 +151,7 @@ class BuildContext(Context.Context):
f.close()
self.init_dirs()
def store(self):
+ return
data={}
for x in SAVED_ATTRS:
data[x]=getattr(self,x)

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, buildPythonPackage, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo, which, ncurses}:
buildPythonPackage rec {
major = "3.24";
major = "3.26";
minor = "1";
version = "${major}.${minor}";
format = "other";
@ -10,7 +10,7 @@ buildPythonPackage rec {
src = fetchurl {
url = "mirror://gnome/sources/pygobject/${major}/${name}.tar.xz";
sha256 = "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56";
sha256 = "1afi0jdjd9sanrzjwhv7z1k7qxlb91fqa6yqc2dbpjkhkjdpnmzm";
};
outputs = [ "out" "dev" ];
@ -21,7 +21,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ pycairo cairo ];
meta = {
homepage = http://live.gnome.org/PyGObject;
homepage = https://pygobject.readthedocs.io/;
description = "Python bindings for Glib";
platforms = stdenv.lib.platforms.unix;
};

View file

@ -8,6 +8,7 @@
, scpSupport ? false, libssh2 ? null
, gssSupport ? false, gss ? null
, c-aresSupport ? false, c-ares ? null
, brotliSupport ? false, brotli ? null
}:
assert http2Support -> nghttp2 != null;
@ -19,13 +20,14 @@ assert !(gnutlsSupport && sslSupport);
assert gnutlsSupport -> gnutls != null;
assert scpSupport -> libssh2 != null;
assert c-aresSupport -> c-ares != null;
assert brotliSupport -> brotli != null;
stdenv.mkDerivation rec {
name = "curl-7.56.1";
name = "curl-7.57.0";
src = fetchurl {
url = "http://curl.haxx.se/download/${name}.tar.bz2";
sha256 = "142zidvlmrz31yx480nrhh47hl01d7jbaagin23pspl7cw1ng515";
sha256 = "09j88lzqmi79rvvg2l7bjcs56330bq388f5p468hgblf6hdf6by9";
};
outputs = [ "bin" "dev" "out" "man" "devdoc" ];
@ -47,7 +49,8 @@ stdenv.mkDerivation rec {
optional c-aresSupport c-ares ++
optional sslSupport openssl ++
optional gnutlsSupport gnutls ++
optional scpSupport libssh2;
optional scpSupport libssh2 ++
optional brotliSupport brotli;
# for the second line see https://curl.haxx.se/mail/tracker-2014-03/0087.html
preConfigure = ''
@ -64,6 +67,7 @@ stdenv.mkDerivation rec {
( if ldapSupport then "--enable-ldap" else "--disable-ldap" )
( if ldapSupport then "--enable-ldaps" else "--disable-ldaps" )
( if idnSupport then "--with-libidn=${libidn.dev}" else "--without-libidn" )
( if brotliSupport then "--with-brotli" else "--without-brotli" )
]
++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}";

View file

@ -1639,6 +1639,7 @@ with pkgs;
idnSupport = true;
ldapSupport = true;
gssSupport = true;
brotliSupport = true;
};
curl = callPackage ../tools/networking/curl rec {
@ -9929,8 +9930,7 @@ with pkgs;
# through /run/opengl-driver*, which is overriden according to config.grsecurity
# grsecEnabled = true; # no more support in nixpkgs ATM
# llvm-4.0.0 and 5.0.0 won't pass tests on aarch64
llvmPackages = if system == "aarch64-linux" then llvmPackages_39 else llvmPackages_5;
llvmPackages = llvmPackages_5;
});
mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { });