From 98a73f380288893341099991a4c4885e2b5caddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Thu, 16 Oct 2025 18:32:18 -0700 Subject: [PATCH 1/2] capstone_4: fix build failure with cmake 4 - CMake 4 is no longer retro compatible with versions < 3.5 --- pkgs/development/libraries/capstone/4.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/capstone/4.nix b/pkgs/development/libraries/capstone/4.nix index a6e0b2a6a738..adb245c9b40e 100644 --- a/pkgs/development/libraries/capstone/4.nix +++ b/pkgs/development/libraries/capstone/4.nix @@ -26,6 +26,17 @@ stdenv.mkDerivation rec { doCheck = true; + # CMake 2.6 is deprecated and is no longer supported by CMake > 4 + # https://github.com/NixOS/nixpkgs/issues/445447 + postPatch = '' + substituteInPlace CMakeLists.txt --replace-fail \ + "cmake_minimum_required(VERSION 2.6)" \ + "cmake_minimum_required(VERSION 3.10)" \ + --replace-fail \ + "cmake_policy (SET CMP0048 OLD)" \ + "cmake_policy (SET CMP0048 NEW)" + ''; + meta = { description = "Advanced disassembly library"; homepage = "http://www.capstone-engine.org"; From 4d8e8a4c91ef3791d18163bc65290d2e6f0d7170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sat, 18 Oct 2025 12:36:38 -0700 Subject: [PATCH 2/2] edb: fix build failure with cmake 4 - CMake 4 is no longer retro compatible with versions < 3.5 --- pkgs/development/tools/misc/edb/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/tools/misc/edb/default.nix b/pkgs/development/tools/misc/edb/default.nix index 786209cb74f4..f41b4324d6e9 100644 --- a/pkgs/development/tools/misc/edb/default.nix +++ b/pkgs/development/tools/misc/edb/default.nix @@ -53,6 +53,18 @@ stdenv.mkDerivation (finalAttrs: { # submodules were fetched and will throw an error if it's not there. # Avoid using leaveDotGit in the fetchFromGitHub options as it is non-deterministic. mkdir -p src/qhexview/.git lib/gdtoa-desktop/.git + + # CMake 3.1 is deprecated and is no longer supported by CMake > 4 + # https://github.com/NixOS/nixpkgs/issues/445447 + substituteInPlace CMakeLists.txt src/CMakeLists.txt src/test/CMakeLists.txt plugins/CMakeLists.txt plugins/*/CMakeLists.txt --replace-fail \ + "cmake_minimum_required (VERSION 3.1)" \ + "cmake_minimum_required(VERSION 3.10)" + substituteInPlace lib/CMakeLists.txt lib/libELF/CMakeLists.txt lib/libPE/CMakeLists.txt --replace-fail \ + "cmake_minimum_required(VERSION 3.1)" \ + "cmake_minimum_required(VERSION 3.10)" + substituteInPlace lib/gdtoa-desktop/CMakeLists.txt --replace-fail \ + "cmake_minimum_required (VERSION 3.0)" \ + "cmake_minimum_required (VERSION 3.10)" ''; passthru = {