libavif: disable gdk-pixbuf thumbnailer when cross-compiling

gdk-pixbuf doesn't support thumbnailers when cross-compiling, causing
libavif to fail to cross-compile because it tries to wrap
${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer, which doesn't exist.
This commit is contained in:
Ben Wolsieffer 2023-08-22 14:39:47 -04:00
parent 483daed240
commit 3c85be5738

View File

@ -68,6 +68,9 @@ stdenv.mkDerivation rec {
GDK_PIXBUF_MODULE_FILE=${gdkPixbufModuleFile} \ GDK_PIXBUF_MODULE_FILE=${gdkPixbufModuleFile} \
gdk-pixbuf-query-loaders --update-cache gdk-pixbuf-query-loaders --update-cache
''
# Cross-compiled gdk-pixbuf doesn't support thumbnailers
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p "$out/bin" mkdir -p "$out/bin"
makeWrapper ${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer "$out/libexec/gdk-pixbuf-thumbnailer-avif" \ makeWrapper ${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer "$out/libexec/gdk-pixbuf-thumbnailer-avif" \
--set GDK_PIXBUF_MODULE_FILE ${gdkPixbufModuleFile} --set GDK_PIXBUF_MODULE_FILE ${gdkPixbufModuleFile}