summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-07-29 15:19:44 -0400
committerGitHub <noreply@github.com>2018-07-29 15:19:44 -0400
commitc5f1717a19df96585f0d513fb9907ec01ab23d6b (patch)
tree17dbdd47260a9e7b5720e78d1c87c6f06b7be7f1 /pkgs/development
parent465166fb1a8a720a50597f0a9d46691477528628 (diff)
parent456d3e3192e0b87fdf4337628715f1f7f4e70f82 (diff)
downloadnixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar.gz
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar.bz2
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar.lz
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar.xz
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.tar.zst
nixpkgs-c5f1717a19df96585f0d513fb9907ec01ab23d6b.zip
Merge pull request #43702 from oxij/pkg/checked-glib
glib: use tested version when `doCheckByDefault` is set
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/glib/default.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 8a07a9f9f22..428b9ee482e 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -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;