diff --git a/pkgs/by-name/op/opencollada-blender/cmake4-compat.patch b/pkgs/by-name/op/opencollada-blender/cmake4-compat.patch new file mode 100644 index 000000000000..c586a589534a --- /dev/null +++ b/pkgs/by-name/op/opencollada-blender/cmake4-compat.patch @@ -0,0 +1,26 @@ +From f036950f1ccc3ebdfe2fdc0a52d35a4620252901 Mon Sep 17 00:00:00 2001 +From: Grimmauld +Date: Sat, 27 Sep 2025 11:43:21 +0200 +Subject: [PATCH] Build: update cmake minimum version to 3.10 + +cmake ABI compatibility with cmake <3.5 has been removed in cmake 4. +Compatibility with cmake <3.10 is deprecated and soon to be removed. +Thus set 3.10 minimum version. This is available in the vast majority +of current linux distributions, as well as other platforms. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 95abbe213..2d14b2552 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + endif() + endif() + +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.10) + + + #----------------------------------------------------------------------------- diff --git a/pkgs/by-name/op/opencollada-blender/package.nix b/pkgs/by-name/op/opencollada-blender/package.nix index f2dadea7c70c..01042195cd9a 100644 --- a/pkgs/by-name/op/opencollada-blender/package.nix +++ b/pkgs/by-name/op/opencollada-blender/package.nix @@ -1,5 +1,6 @@ { cmake, + dos2unix, fetchFromGitHub, lib, libxml2, @@ -19,9 +20,20 @@ stdenv.mkDerivation { sha256 = "sha256-ctr+GjDzxOJxBfaMwjwayPkAOcF+FMsP1X72QCOwvTY="; }; + # Fix freaky dos-style CLRF things + prePatch = '' + dos2unix CMakeLists.txt + ''; + + patches = [ + # https://github.com/aras-p/OpenCOLLADA/pull/1 + ./cmake4-compat.patch + ]; + nativeBuildInputs = [ cmake pkg-config + dos2unix ]; propagatedBuildInputs = [