From 834ad07c6cfec943dd80c10fe8fee9f85168b70e Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 14 Oct 2025 11:16:35 +0200 Subject: [PATCH] pnmixer: fix build with CMake 4 And fix compatibility with https://cmake.org/cmake/help/v4.1/policy/CMP0065.html --- .../pn/pnmixer/fix-cmake-version.patch | 33 +++++++++++++++++++ pkgs/by-name/pn/pnmixer/package.nix | 5 +++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/by-name/pn/pnmixer/fix-cmake-version.patch diff --git a/pkgs/by-name/pn/pnmixer/fix-cmake-version.patch b/pkgs/by-name/pn/pnmixer/fix-cmake-version.patch new file mode 100644 index 000000000000..6b3b16291624 --- /dev/null +++ b/pkgs/by-name/pn/pnmixer/fix-cmake-version.patch @@ -0,0 +1,33 @@ +From 3a4a988f6c69abece44fe2c77eab5f0a9ae7bbd2 Mon Sep 17 00:00:00 2001 +From: Stefan Frijters +Date: Mon, 13 Oct 2025 10:53:14 +0200 +Subject: [PATCH] Update minimum CMake version + +And fix compatibility with https://cmake.org/cmake/help/v4.1/policy/CMP0065.html +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10192bf..1bb3e0c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.10) + project(PNMixer) + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index eb04c2b..8630a21 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -56,6 +56,7 @@ target_link_libraries(pnmixer "${PNMixer_DEPS_LDFLAGS}") + target_link_libraries(pnmixer m) + target_compile_options(pnmixer PUBLIC "${PNMixer_DEPS_CFLAGS}") + target_compile_definitions(pnmixer PUBLIC -DHAVE_CONFIG_H) ++set_property(TARGET pnmixer PROPERTY ENABLE_EXPORTS 1) + + install(TARGETS pnmixer DESTINATION "${CMAKE_INSTALL_BINDIR}") + diff --git a/pkgs/by-name/pn/pnmixer/package.nix b/pkgs/by-name/pn/pnmixer/package.nix index 06204e425d25..fe9a05624a17 100644 --- a/pkgs/by-name/pn/pnmixer/package.nix +++ b/pkgs/by-name/pn/pnmixer/package.nix @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { sha256 = "0416pa933ddf4b7ph9zxhk5jppkk7ppcq1aqph6xsrfnka4yb148"; }; + patches = [ + # https://github.com/nicklan/pnmixer/pull/197 + ./fix-cmake-version.patch + ]; + nativeBuildInputs = [ cmake pkg-config