glib: use tested version when doCheckByDefault
is set
This changes the way how the `glib` dependecy cycles are broken to make the tested `glib` the default. `glib-tested` is no longer needed as packages now use the checked version when `doCheckByDefault` is set, since it was not used anywhere, I removed it.
This commit is contained in:
parent
611eefb067
commit
456d3e3192
@ -3,9 +3,10 @@
|
||||
# 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, 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;
|
||||
@ -66,8 +67,7 @@ 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 perl python gettext ];
|
||||
|
||||
@ -114,7 +114,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"
|
||||
@ -139,6 +140,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;
|
||||
|
@ -9521,12 +9521,16 @@ with pkgs;
|
||||
|
||||
gtkmathview = callPackage ../development/libraries/gtkmathview { };
|
||||
|
||||
glib = callPackage ../development/libraries/glib {
|
||||
};
|
||||
glib-tested = glib.override { # checked version separate to break cycles
|
||||
doCheck = true;
|
||||
libffi = libffi.override { doCheck = true; };
|
||||
};
|
||||
glib = callPackage ../development/libraries/glib (let
|
||||
glib-untested = glib.override { doCheck = false; };
|
||||
in {
|
||||
# break dependency cycles
|
||||
# these things are only used for tests, they don't get into the closure
|
||||
shared-mime-info = shared-mime-info.override { glib = glib-untested; };
|
||||
desktop-file-utils = desktop-file-utils.override { glib = glib-untested; };
|
||||
dbus = dbus.override { systemd = null; };
|
||||
});
|
||||
|
||||
glibmm = callPackage ../development/libraries/glibmm { };
|
||||
|
||||
glib-networking = callPackage ../development/libraries/glib-networking {};
|
||||
|
Loading…
Reference in New Issue
Block a user