diff --git a/pkgs/by-name/os/osmid/package.nix b/pkgs/by-name/os/osmid/package.nix index 57257882b810..8cd51e0149fe 100644 --- a/pkgs/by-name/os/osmid/package.nix +++ b/pkgs/by-name/os/osmid/package.nix @@ -18,6 +18,16 @@ stdenv.mkDerivation rec { sha256 = "1s1wsrp6g6wb0y61xzxvaj59mwycrgy52r4h456086zkz10ls6hw"; }; + postPatch = '' + # replace deprecated cmake version that are no longer supported by CMake > 4 + # https://github.com/NixOS/nixpkgs/issues/445447 + + substituteInPlace CMakeLists.txt \ + --replace-fail "cmake_minimum_required (VERSION 3.0)" "cmake_minimum_required (VERSION 3.10)" + substituteInPlace external_libs/oscpack_1_1_0/CMakeLists.txt \ + --replace-fail "cmake_minimum_required(VERSION 2.6)" "cmake_minimum_required (VERSION 3.10)" + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [