nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

libtins: fix build with cmake 4 (#450277)

authored by

Leona Maroni and committed by
GitHub
fd665e4a 229462aa

+50
+47
pkgs/by-name/li/libtins/cmake-3.10.patch
··· 1 + From c49fc6ddb1a305a1ff7390b26de83eb35a5b8b12 Mon Sep 17 00:00:00 2001 2 + From: Dave Walker <dave@daviey.com> 3 + Date: Thu, 9 Oct 2025 11:28:45 +0100 4 + Subject: [PATCH] Update CMake minimum required version to 3.10 5 + 6 + CMake 4 removed compatibility with CMake versions < 3.5, and versions 7 + between 3.5-3.10 are deprecated. 8 + 9 + This change updates the minimum required version to 3.10 to ensure 10 + compatibility with modern CMake versions including CMake 4.x. 11 + 12 + This issue is affecting NixOS users (see 13 + https://github.com/NixOS/nixpkgs/issues/450198) and will likely impact 14 + other distributions as they upgrade to CMake 4.x. 15 + 16 + Upstream PR: https://github.com/mfontanini/libtins/pull/553 17 + --- 18 + CMakeLists.txt | 2 +- 19 + cmake/Modules/CheckCXXFeatures.cmake | 2 +- 20 + 2 files changed, 2 insertions(+), 2 deletions(-) 21 + 22 + diff --git a/CMakeLists.txt b/CMakeLists.txt 23 + index 3eb435f..a011a19 100644 24 + --- a/CMakeLists.txt 25 + +++ b/CMakeLists.txt 26 + @@ -1,4 +1,4 @@ 27 + -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.1) 28 + +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) 29 + PROJECT(libtins) 30 + 31 + OPTION(LIBTINS_BUILD_EXAMPLES "Build examples" ON) 32 + diff --git a/cmake/Modules/CheckCXXFeatures.cmake b/cmake/Modules/CheckCXXFeatures.cmake 33 + index b7b7f14..d924ddc 100644 34 + --- a/cmake/Modules/CheckCXXFeatures.cmake 35 + +++ b/cmake/Modules/CheckCXXFeatures.cmake 36 + @@ -50,7 +50,7 @@ if (NOT CMAKE_CXX_COMPILER_LOADED) 37 + message(FATAL_ERROR "CheckCXX11Features modules only works if language CXX is enabled") 38 + endif () 39 + 40 + -cmake_minimum_required(VERSION 2.8.3) 41 + +cmake_minimum_required(VERSION 3.10) 42 + 43 + # 44 + ### Check for needed compiler flags 45 + -- 46 + 2.51.0 47 +
+3
pkgs/by-name/li/libtins/package.nix
··· 26 26 # See also an upstream report for gtest 1.13+ and C++14: 27 27 # https://github.com/mfontanini/libtins/issues/ 28 28 ./0001-force-cpp-17.patch 29 + # Update CMake minimum required version for CMake 4 compatibility 30 + # https://github.com/mfontanini/libtins/pull/553 31 + ./cmake-3.10.patch 29 32 ]; 30 33 31 34 postPatch = ''