libjxl: build plugins/loaders unconditionally (#345306)

This commit is contained in:
Aleksana 2024-10-27 11:52:15 +08:00 committed by GitHub
commit 0b7a52a645
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,7 @@
, doxygen
, python3
, lcms2
, enablePlugins ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
, enablePlugins ? true
}:
let
@ -127,6 +127,9 @@ stdenv.mkDerivation rec {
GDK_PIXBUF_MODULEDIR="$out/${gdk-pixbuf.moduleDir}" \
GDK_PIXBUF_MODULE_FILE="$out/${loadersPath}" \
gdk-pixbuf-query-loaders --update-cache
''
# Cross-compiled gdk-pixbuf doesn't support thumbnailers
+ lib.optionalString (enablePlugins && stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p "$out/bin"
makeWrapper ${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer "$out/libexec/gdk-pixbuf-thumbnailer-jxl" \
--set GDK_PIXBUF_MODULE_FILE "$out/${loadersPath}"