diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-09-01 12:07:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-09-04 21:18:49 +0000 |
commit | d65d8002c7fbca2144fce2480a65bec36768da9a (patch) | |
tree | 283246b7c404bd0114b9769c7256c565109c3002 /pkgs/development/libraries/glib/default.nix | |
parent | 2be1bcb3d2291d406a280d38860e42706e5bcf76 (diff) |
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.
Diffstat (limited to 'pkgs/development/libraries/glib/default.nix')
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 7 |
1 files changed, 3 insertions, 4 deletions
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"; |