libjxl: backport patch for CMake 4

Co-authored-by: K900 <me@0upti.me>
This commit is contained in:
Emily
2025-09-19 16:29:10 +01:00
co-authored by K900
parent f5f1d0dc69
commit 166e159ad7
+12
View File
@@ -2,6 +2,7 @@
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
brotli,
cmake,
giflib,
@@ -139,6 +140,17 @@ stdenv.mkDerivation rec {
rm -rf third_party/!(sjpeg)/
shopt -u extglob
# Fix the build with CMake 4.
#
# See:
#
# * <https://github.com/webmproject/sjpeg/commit/9990bdceb22612a62f1492462ef7423f48154072>
# * <https://github.com/webmproject/sjpeg/commit/94e0df6d0f8b44228de5be0ff35efb9f946a13c9>
substituteInPlace third_party/sjpeg/CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 2.8.7)' \
'cmake_minimum_required(VERSION 3.5...3.10)'
substituteInPlace plugins/gdk-pixbuf/jxl.thumbnailer \
--replace '/usr/bin/gdk-pixbuf-thumbnailer' "$out/libexec/gdk-pixbuf-thumbnailer-jxl"
substituteInPlace CMakeLists.txt \