From 157c7313726ffe0469b4e9512e010bbc1038ecbe Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 18 Feb 2024 20:50:20 +0100 Subject: [PATCH] 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. --- pkgs/development/libraries/libgudev/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgudev/default.nix b/pkgs/development/libraries/libgudev/default.nix index fd21c9e7f85e..68e3e42476e7 100644 --- a/pkgs/development/libraries/libgudev/default.nix +++ b/pkgs/development/libraries/libgudev/default.nix @@ -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"