harfbuzz: fix checkPhase on sandboxed Darwin

The native_coretext_variations test in harfbuzz's test suite depends on
the system-provided fonts and will fail if they cannot be read [1]. Add
/System/Library/Fonts to __impureHostDeps (which updates the sandbox
profile) to resolve the test failure on Darwin.

[1]: https://gist.github.com/al3xtjames/c6f5f2e1217c9e8607ac9d70ce333e0c#file-harfbuzz-11-2-1-drv-log-L789-L812
This commit is contained in:
Alex James
2025-07-23 15:32:32 -07:00
parent 4e99205fd5
commit e4e5628b7f
+5
View File
@@ -103,6 +103,11 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
# test_native_coretext_variations depends on the system fonts.
__impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [
"/System/Library/Fonts"
];
# Slightly hacky; some pkgs expect them in a single directory.
postFixup = lib.optionalString withIcu ''
rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc"