libgudev: don't add umockdev dep if doCheck=false

This avoids an unnecessary input if checks are disabled.  The
expression already contains a check to support this override.
This commit is contained in:
Alyssa Ross 2024-02-18 20:50:20 +01:00
parent ee1069d07d
commit 157c731372

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
./tests-skip-double-test-on-stub-locale-impls.patch
];
postPatch = ''
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
# The relative location of LD_PRELOAD works for Glibc but not for other loaders (e.g. pkgsMusl)
substituteInPlace tests/meson.build \
--replace "LD_PRELOAD=libumockdev-preload.so.0" "LD_PRELOAD=${lib.getLib umockdev}/lib/libumockdev-preload.so.0"