From d65d8002c7fbca2144fce2480a65bec36768da9a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 1 Sep 2022 12:07:16 +0000 Subject: glib.tests.withChecks: init This will allow OfBorg to run the GLib tests, which it didn't do before. To do this correctly for the glib we're building, we need to override it rather than taking glib as an input. finalAttrs.finalPackage is not overrideable, so instead we need to use overrideAttrs. Since we can now consult finalAttrs.doCheck, there's no longer any need for a separate doCheck option, so I've removed it in favour of overrideAttrs. --- pkgs/development/libraries/glib/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries/glib/default.nix') diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index f625ea4e67cb2..942231ebb3ea9 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -5,7 +5,6 @@ , buildPackages # this is just for tests (not in the closure of any regular package) -, doCheck ? config.doCheckByDefault or false , coreutils, dbus, libxml2, tzdata , desktop-file-utils, shared-mime-info , darwin, fetchpatch @@ -213,7 +212,7 @@ stdenv.mkDerivation (finalAttrs: { checkInputs = [ tzdata desktop-file-utils shared-mime-info ]; - preCheck = optionalString doCheck '' + preCheck = optionalString finalAttrs.doCheck or config.doCheckByDefault or false '' export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export TZDIR="${tzdata}/share/zoneinfo" export XDG_CACHE_HOME="$TMP" @@ -225,8 +224,6 @@ stdenv.mkDerivation (finalAttrs: { echo "PATH=$PATH" ''; - inherit doCheck; - separateDebugInfo = stdenv.isLinux; passthru = rec { @@ -237,6 +234,8 @@ stdenv.mkDerivation (finalAttrs: { getSchemaPath = pkg: makeSchemaPath pkg pkg.name; getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name; + tests.withChecks = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); + inherit flattenInclude; updateScript = gnome.updateScript { packageName = "glib"; -- cgit 1.4.1