diff --git a/pkgs/by-name/li/libjxl/package.nix b/pkgs/by-name/li/libjxl/package.nix index b1154d5bc69b..af5041e2ca5b 100644 --- a/pkgs/by-name/li/libjxl/package.nix +++ b/pkgs/by-name/li/libjxl/package.nix @@ -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: + # + # * + # * + 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 \