diff --git a/pkgs/by-name/cj/cjson/package.nix b/pkgs/by-name/cj/cjson/package.nix index b04408ec499b..c1fa9f4c55cd 100644 --- a/pkgs/by-name/cj/cjson/package.nix +++ b/pkgs/by-name/cj/cjson/package.nix @@ -22,11 +22,24 @@ stdenv.mkDerivation rec { lib.cmakeBool "ENABLE_CUSTOM_COMPILER_FLAGS" false ); - # cJSON actually uses C99 standard, not C89 - # https://github.com/DaveGamble/cJSON/issues/275 - postPatch = '' - substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99 - ''; + postPatch = + # cJSON actually uses C99 standard, not C89 + # https://github.com/DaveGamble/cJSON/issues/275 + '' + substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99 + '' + # Fix the build with CMake 4. + # + # See: + # * + # * + # * + + '' + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'cmake_minimum_required(VERSION 3.0)' \ + 'cmake_minimum_required(VERSION 3.10)' + ''; meta = with lib; { homepage = "https://github.com/DaveGamble/cJSON";