umockdev: fix musl build (#528848)

This commit is contained in:
Florian Klink
2026-06-06 20:44:28 +00:00
committed by GitHub
+6 -1
View File
@@ -84,12 +84,17 @@ stdenv.mkDerivation (finalAttrs: {
"-Dgtk_doc=true"
];
doCheck = true;
# glibc valgrind can't measure musl binaries (and vice versa)
doCheck = stdenv.hostPlatform.libc == stdenv.buildPlatform.libc;
postPatch = ''
# Substitute the path to this derivation in the patch we apply.
substituteInPlace src/umockdev-wrapper \
--subst-var-by 'LIBDIR' "''${!outputLib}/lib"
''
+ lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace src/libumockdev-preload.c \
--replace-fail libc.so.6 libc.so
'';
preCheck = ''