Merge branch 'staging' into #38486

This commit is contained in:
Vladimír Čunát
2018-08-30 18:30:32 +02:00
8766 changed files with 296755 additions and 178833 deletions
+19 -18
View File
@@ -1,15 +1,16 @@
{ stdenv, hostPlatform, fetchurl, pkgconfig, gettext, perl, python
, libiconv, libintlOrEmpty, zlib, libffi, pcre, libelf, gnome3
{ stdenv, fetchurl, gettext, pkgconfig, perl, python
, libiconv, zlib, libffi, pcre, libelf, gnome3
# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib)
, utillinuxMinimal ? null
# this is just for tests (not in closure of any regular package)
, coreutils, dbus_daemon, libxml2, tzdata, desktop-file-utils, shared-mime-info, doCheck ? false
# this is just for tests (not in the closure of any regular package)
, doCheck ? stdenv.config.doCheckByDefault or false
, coreutils, dbus, libxml2, tzdata
, desktop-file-utils, shared-mime-info
}:
with stdenv.lib;
assert stdenv.isFreeBSD || stdenv.isDarwin || stdenv.cc.isGNU || hostPlatform.isCygwin;
assert stdenv.isLinux -> utillinuxMinimal != null;
# TODO:
@@ -55,7 +56,10 @@ stdenv.mkDerivation rec {
patches = optional stdenv.isDarwin ./darwin-compilation.patch
++ optional doCheck ./skip-timer-test.patch
++ [ ./schema-override-variable.patch ];
++ optionals stdenv.hostPlatform.isMusl [
./quark_init_on_demand.patch
./gobject_init_on_demand.patch
] ++ [ ./schema-override-variable.patch ];
outputs = [ "bin" "out" "dev" "devdoc" ];
outputBin = "dev";
@@ -63,20 +67,15 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;
buildInputs = [ libelf setupHook pcre ]
++ optionals stdenv.isLinux [ utillinuxMinimal ] # for libmount
++ optionals doCheck [ tzdata libxml2 desktop-file-utils shared-mime-info ];
++ optionals stdenv.isLinux [ utillinuxMinimal ]; # for libmount
nativeBuildInputs = [ pkgconfig gettext perl python ];
nativeBuildInputs = [ pkgconfig perl python gettext ];
propagatedBuildInputs = [ zlib libffi libiconv ]
++ libintlOrEmpty;
propagatedBuildInputs = [ zlib libffi gettext libiconv ];
# internal pcre would only add <200kB, but it's relatively common
configureFlags = [ "--with-pcre=system" ]
++ optional stdenv.isDarwin "--disable-compile-warnings"
# glibc inclues GNU libiconv, but Darwin's iconv function is good enonugh.
++ optional (stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isDarwin)
"--with-libiconv=gnu"
++ optional stdenv.isSunOS "--disable-dtrace"
# Can't run this test when cross-compiling
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)
@@ -84,8 +83,7 @@ stdenv.mkDerivation rec {
# GElf only supports elf64 hosts
++ optional (!stdenv.hostPlatform.is64bit) "--disable-libelf";
NIX_CFLAGS_COMPILE = optional stdenv.isDarwin "-lintl"
++ optional stdenv.isSunOS "-DBSD_COMP";
NIX_CFLAGS_COMPILE = optional stdenv.isSunOS "-DBSD_COMP";
preConfigure = optionalString stdenv.isSunOS ''
sed -i -e 's|inotify.h|foobar-inotify.h|g' configure
@@ -120,7 +118,8 @@ stdenv.mkDerivation rec {
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
'';
inherit doCheck;
checkInputs = [ tzdata libxml2 desktop-file-utils shared-mime-info ];
preCheck = optionalString doCheck ''
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
export TZDIR="${tzdata}/share/zoneinfo"
@@ -128,7 +127,7 @@ stdenv.mkDerivation rec {
export XDG_RUNTIME_HOME="$TMP"
export HOME="$TMP"
export XDG_DATA_DIRS="${desktop-file-utils}/share:${shared-mime-info}/share"
export G_TEST_DBUS_DAEMON="${dbus_daemon.out}/bin/dbus-daemon"
export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon"
export PATH="$PATH:$(pwd)/gobject"
echo "PATH=$PATH"
@@ -145,6 +144,8 @@ stdenv.mkDerivation rec {
sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
'';
inherit doCheck;
passthru = {
gioModuleDir = "lib/gio/modules";
inherit flattenInclude;