Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkgs/applications/audio/clementine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,21 @@ stdenv.mkDerivation (finalAttrs: {
-e 's,-Wno-unused-private-field,,g'
sed -i CMakeLists.txt \
-e 's,libprotobuf.a,protobuf,g'
# CMake 3.0.0 is deprecated and no longer supported by CMake > 4
Copy link
Contributor

Choose a reason for hiding this comment

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

Upstream did some cmake cleanup in clementine-player/Clementine@fe3599c, but did not actually bump the cmake_minimum_required, so an update won't fix and there is no commits to fetch.

clementine-player/Clementine#7402 does technically exist, but the upstream CI failing across the board is concerning. It may still make sense to link it, but substituteInPlace really does seem like it is the best way.

# https://github.com/NixOS/nixpkgs/issues/445447
substituteInPlace 3rdparty/{qsqlite,qtsingleapplication,qtiocompressor,qxt}/CMakeLists.txt \
cmake/{ParseArguments.cmake,Translations.cmake} \
tests/CMakeLists.txt gst/moodbar/CMakeLists.txt \
--replace-fail \
"cmake_minimum_required(VERSION 3.0.0)" \
"cmake_minimum_required(VERSION 3.10)"
substituteInPlace 3rdparty/libmygpo-qt5/CMakeLists.txt --replace-fail \
"cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )" \
"cmake_minimum_required(VERSION 3.10)"
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_policy(SET CMP0053 OLD)" \
""
Comment on lines +116 to +129
Copy link
Contributor

Choose a reason for hiding this comment

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

Damn! This is a lot... Kudos for going to these lengths. With multiple 3rd-party deps i did accept the cmake flag as a shortcut in the past, but this is certainly a way XD

'';

preConfigure = ''
Expand Down
14 changes: 11 additions & 3 deletions pkgs/development/libraries/liblastfm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ stdenv.mkDerivation {
})
];

# CMake 2.8.6 is deprecated and no longer supported by CMake > 4
Copy link
Contributor

Choose a reason for hiding this comment

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

liblastfm is dead upstream, so makes sense to just substitute and be done with it.

# https://github.com/NixOS/nixpkgs/issues/445447
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 2.8.6)" \
"cmake_minimum_required(VERSION 3.10)"
'';

nativeBuildInputs = [
pkg-config
which
Expand All @@ -41,9 +49,9 @@ stdenv.mkDerivation {
qtbase
];

env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11"
) "-std=c++11";
env.NIX_CFLAGS_COMPILE =
(lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-std=c++11")
+ (lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-dynamic-exception-spec");

dontWrapQtApps = true;

Expand Down
13 changes: 13 additions & 0 deletions pkgs/development/libraries/qjson/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ stdenv.mkDerivation rec {
sha256 = "1f4wnxzx0qdmxzc7hqk28m0sva7z9p9xmxm6aifvjlp0ha6pmfxs";
};

# CMake 2.8.8 is deprecated and no longer supported by CMake > 4
Copy link
Contributor

Choose a reason for hiding this comment

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

I am surprised this even still builds... Upstream claims build failures e.g. in flavio/qjson@1105e53...

That said, upstream does not have a fix for cmake 4 yet, so a substitute seems to make sense.

# https://github.com/NixOS/nixpkgs/issues/445447
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)" \
"CMAKE_MINIMUM_REQUIRED(VERSION 3.10)"
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_policy(SET CMP0020 OLD)" \
""
'';

env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-register";

nativeBuildInputs = [ cmake ];
buildInputs = [ qtbase ];
dontWrapQtApps = true;
Expand Down
Loading