Skip to content

cmtk: fix build with cmake 4#488619

Open
colonelpanic8 wants to merge 1 commit intoNixOS:masterfrom
colonelpanic8:cmtk-cmake4
Open

cmtk: fix build with cmake 4#488619
colonelpanic8 wants to merge 1 commit intoNixOS:masterfrom
colonelpanic8:cmtk-cmake4

Conversation

@colonelpanic8
Copy link
Contributor

Summary

  • Fix cmtk build failure with cmake 4 (Tracking: Build Failures with CMake 4 #445447)
  • Remove EXPORT_LIBRARY_DEPENDENCIES call (removed in cmake 4, CMP0033) and its related install command. cmtk is a standalone tool, not consumed as a cmake dependency by other packages.
  • Add CMAKE_POLICY_VERSION_MINIMUM=3.5 to handle cmake_minimum_required(VERSION 2.8.12) in upstream CMakeLists.txt

This is a simpler alternative to draft PR #455098 which used a 267-line patch to modernize the export system. Since cmtk upstream is abandoned (last release 2016), removing the unused export is more appropriate than modernizing it.

Fixes #445447 (last remaining unchecked item)

Test plan

  • nix-build -A cmtk succeeds
  • cmtk registration --help works
  • All binaries present in output
  • nixfmt passes

🤖 Generated with Claude Code

@colonelpanic8 colonelpanic8 reopened this Feb 9, 2026
@nixpkgs-ci nixpkgs-ci bot requested a review from tbenst February 9, 2026 08:49
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Feb 9, 2026
# removed in cmake 4 (EXPORT_LIBRARY_DEPENDENCIES, cmake_minimum_required < 3.5).
# Use CMAKE_POLICY_VERSION_MINIMUM to maintain compatibility.
# https://github.com/NixOS/nixpkgs/issues/445447
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated from the tracking issues, we should set 3.10 to have more room for the future

EXPORT_LIBRARY_DEPENDENCIES was removed in cmake 4 (CMP0033).
Remove the call and related install command since cmtk is a standalone
tool that is not consumed as a cmake dependency.

Also set CMAKE_POLICY_VERSION_MINIMUM=3.5 to handle
cmake_minimum_required(VERSION 2.8.12) in upstream CMakeLists.txt.

Fixes: NixOS#445447

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking: Build Failures with CMake 4

2 participants