Skip to content

Commit e5cb53f

Browse files
committed
clementine: fix build failure with cmake 4
- CMake 4 is no longer retro compatible with versions < 3.5 - Policy CMP0053 may not be set to OLD behavior because this version of CMake no longer supports it. The policy was introduced in CMake version 3.1.0, and use of NEW behavior is now required.
1 parent 07f6c62 commit e5cb53f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkgs/applications/audio/clementine/default.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ stdenv.mkDerivation (finalAttrs: {
112112
-e 's,-Wno-unused-private-field,,g'
113113
sed -i CMakeLists.txt \
114114
-e 's,libprotobuf.a,protobuf,g'
115+
116+
# CMake 3.0.0 is deprecated and no longer supported by CMake > 4
117+
# https://github.com/NixOS/nixpkgs/issues/445447
118+
substituteInPlace 3rdparty/{qsqlite,qtsingleapplication,qtiocompressor,qxt}/CMakeLists.txt \
119+
cmake/{ParseArguments.cmake,Translations.cmake} \
120+
tests/CMakeLists.txt gst/moodbar/CMakeLists.txt \
121+
--replace-fail \
122+
"cmake_minimum_required(VERSION 3.0.0)" \
123+
"cmake_minimum_required(VERSION 3.10)"
124+
substituteInPlace 3rdparty/libmygpo-qt5/CMakeLists.txt --replace-fail \
125+
"cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )" \
126+
"cmake_minimum_required(VERSION 3.10)"
127+
substituteInPlace CMakeLists.txt --replace-fail \
128+
"cmake_policy(SET CMP0053 OLD)" \
129+
""
115130
'';
116131

117132
preConfigure = ''

0 commit comments

Comments
 (0)