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)
|
# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib)
|
||||||
, utillinuxMinimal ? null
|
, utillinuxMinimal ? null
|
||||||
|
|
||||||
# this is just for tests (not in closure of any regular package)
|
# this is just for tests (not in the closure of any regular package)
|
||||||
, coreutils, dbus, libxml2, tzdata, desktop-file-utils
|
, doCheck ? stdenv.config.doCheckByDefault or false
|
||||||
, shared-mime-info, doCheck ? false
|
, coreutils, dbus, libxml2, tzdata
|
||||||
|
, desktop-file-utils, shared-mime-info
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -66,8 +67,7 @@ stdenv.mkDerivation rec {
|
|||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
buildInputs = [ libelf setupHook pcre ]
|
buildInputs = [ libelf setupHook pcre ]
|
||||||
++ optionals stdenv.isLinux [ utillinuxMinimal ] # for libmount
|
++ optionals stdenv.isLinux [ utillinuxMinimal ]; # for libmount
|
||||||
++ optionals doCheck [ tzdata libxml2 desktop-file-utils shared-mime-info ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig perl python gettext ];
|
nativeBuildInputs = [ pkgconfig perl python gettext ];
|
||||||
|
|
||||||
@ -114,7 +114,8 @@ stdenv.mkDerivation rec {
|
|||||||
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
|
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inherit doCheck;
|
checkInputs = [ tzdata libxml2 desktop-file-utils shared-mime-info ];
|
||||||
|
|
||||||
preCheck = optionalString doCheck ''
|
preCheck = optionalString doCheck ''
|
||||||
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
|
||||||
export TZDIR="${tzdata}/share/zoneinfo"
|
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
|
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 = {
|
passthru = {
|
||||||
gioModuleDir = "lib/gio/modules";
|
gioModuleDir = "lib/gio/modules";
|
||||||
inherit flattenInclude;
|
inherit flattenInclude;
|
||||||
|
@ -9521,12 +9521,16 @@ with pkgs;
|
|||||||
|
|
||||||
gtkmathview = callPackage ../development/libraries/gtkmathview { };
|
gtkmathview = callPackage ../development/libraries/gtkmathview { };
|
||||||
|
|
||||||
glib = callPackage ../development/libraries/glib {
|
glib = callPackage ../development/libraries/glib (let
|
||||||
};
|
glib-untested = glib.override { doCheck = false; };
|
||||||
glib-tested = glib.override { # checked version separate to break cycles
|
in {
|
||||||
doCheck = true;
|
# break dependency cycles
|
||||||
libffi = libffi.override { doCheck = true; };
|
# 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 { };
|
glibmm = callPackage ../development/libraries/glibmm { };
|
||||||
|
|
||||||
glib-networking = callPackage ../development/libraries/glib-networking {};
|
glib-networking = callPackage ../development/libraries/glib-networking {};
|
||||||
|
Loading…
Reference in New Issue
Block a user