From d38bf033dc578bcc3757ecb3fdda7755f65421bc Mon Sep 17 00:00:00 2001 From: Danil Suetin Date: Wed, 22 Oct 2025 23:35:53 +0200 Subject: [PATCH] ubertooth: fix build with cmake4 --- .../ub/ubertooth/fix-cmake4-build.patch | 37 +++++++++++++++++++ pkgs/by-name/ub/ubertooth/package.nix | 5 +++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/by-name/ub/ubertooth/fix-cmake4-build.patch diff --git a/pkgs/by-name/ub/ubertooth/fix-cmake4-build.patch b/pkgs/by-name/ub/ubertooth/fix-cmake4-build.patch new file mode 100644 index 000000000000..a27afae6f686 --- /dev/null +++ b/pkgs/by-name/ub/ubertooth/fix-cmake4-build.patch @@ -0,0 +1,37 @@ +commit 111bb8d98b4ff1897c36ff23806c492e9a313457 +Author: Will Dillon +Date: Mon Aug 11 13:58:40 2025 -0700 + + Update CMAKE version + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea0dfa6..9f1bcb3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ + # + #top level cmake project for ubertooth lib + tools + +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.10) + project(ubertooth_all) + set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules + CACHE STRING "CMake module path") +diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt +index f728056..4336fb0 100644 +--- a/misc/CMakeLists.txt ++++ b/misc/CMakeLists.txt +@@ -1,2 +1,2 @@ +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.10) + add_subdirectory(udev) +diff --git a/misc/udev/CMakeLists.txt b/misc/udev/CMakeLists.txt +index a7d4ed0..f7dcaf8 100644 +--- a/misc/udev/CMakeLists.txt ++++ b/misc/udev/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.10) + + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + SET(SYSTEM_IS_LINUX TRUE) diff --git a/pkgs/by-name/ub/ubertooth/package.nix b/pkgs/by-name/ub/ubertooth/package.nix index 9663fa2812f9..294d772515b4 100644 --- a/pkgs/by-name/ub/ubertooth/package.nix +++ b/pkgs/by-name/ub/ubertooth/package.nix @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/host"; + patches = [ + # https://github.com/greatscottgadgets/ubertooth/pull/546 + ./fix-cmake4-build.patch + ]; + nativeBuildInputs = [ cmake pkg-config