From 352e6934cc949f6e98c5c79cf6091d5d1516ef52 Mon Sep 17 00:00:00 2001 From: Yureka Date: Mon, 29 Sep 2025 10:29:07 +0200 Subject: [PATCH] lensfun: fix build with cmake 4 --- pkgs/by-name/le/lensfun/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/le/lensfun/package.nix b/pkgs/by-name/le/lensfun/package.nix index c6d058c55b67..d59644ce0c73 100644 --- a/pkgs/by-name/le/lensfun/package.nix +++ b/pkgs/by-name/le/lensfun/package.nix @@ -45,6 +45,16 @@ stdenv.mkDerivation { mkdir -p data/db tar xvf $TMPDIR/db/version_1.tar -C data/db date +%s > data/db/timestamp.txt + '' + # Backport CMake 4 support + # This is already on master, but not yet in a stable release: + # https://github.com/lensfun/lensfun/issues/2520 + # https://github.com/lensfun/lensfun/commit/011de2e85813ff496a85404b30891352555de077 + + '' + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR )' \ + 'CMAKE_MINIMUM_REQUIRED(VERSION 3.12 FATAL_ERROR)' ''; nativeBuildInputs = [