From fc95bb3c638781aa062490b837f4cd14892892bf Mon Sep 17 00:00:00 2001 From: Andrew Zah Date: Sun, 19 Oct 2025 17:59:58 +0900 Subject: [PATCH] foxotron: fix build issue due to cmake 4 * As noted in https://github.com/NixOS/nixpkgs/issues/445447. --- pkgs/by-name/fo/foxotron/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/fo/foxotron/package.nix b/pkgs/by-name/fo/foxotron/package.nix index 3f297e76c125..1236aef59a3f 100644 --- a/pkgs/by-name/fo/foxotron/package.nix +++ b/pkgs/by-name/fo/foxotron/package.nix @@ -18,7 +18,6 @@ alsa-lib, fontconfig, }: - stdenv.mkDerivation rec { pname = "foxotron"; version = "2024-09-23"; @@ -43,12 +42,17 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace CMakeLists.txt \ - --replace "set(CMAKE_OSX_ARCHITECTURES x86_64)" "" + --replace-fail "set(CMAKE_OSX_ARCHITECTURES x86_64)" "" \ + --replace-fail "cmake_minimum_required(VERSION 3.0)" "cmake_minimum_required(VERSION 3.10)" + + substituteInPlace externals/glm/CMakeLists.txt \ + --replace-fail "cmake_minimum_required(VERSION 3.2 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" \ + --replace-fail "cmake_policy(VERSION 3.2)" "cmake_policy(VERSION 3.10)" # Outdated vendored assimp, many warnings with newer compilers, too old for CMake option to control this # Note that this -Werror caused issues on darwin, so make sure to re-check builds there before removing this substituteInPlace externals/assimp/code/CMakeLists.txt \ - --replace 'TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)' "" + --replace-fail 'TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)' "" ''; nativeBuildInputs = [