diff --git a/pkgs/development/libraries/boost/cmake-paths-188.patch b/pkgs/development/libraries/boost/cmake-paths-188.patch new file mode 100644 index 000000000000..0abb97111dcf --- /dev/null +++ b/pkgs/development/libraries/boost/cmake-paths-188.patch @@ -0,0 +1,21 @@ +diff --color -ur boost_1_88_0-unpatched/tools/boost_install/boost-install.jam boost_1_88_0/tools/boost_install/boost-install.jam +--- boost_1_88_0-unpatched/tools/boost_install/boost-install.jam 2025-07-29 21:46:33.010181683 +0800 ++++ boost_1_88_0/tools/boost_install/boost-install.jam 2025-07-29 21:47:34.346642613 +0800 +@@ -794,7 +794,7 @@ + "" + "# Compute the include and library directories relative to this file." + "" +- "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)" ++ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)" + : true ; + + if [ path.is-rooted $(cmakedir) ] +@@ -813,6 +813,8 @@ + " unset(_BOOST_CMAKEDIR_ORIGINAL)" + "endif()" + "" ++ "# Assume that the installer actually did know where the libs were to be installed" ++ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)" + : true ; + } + diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index aa6f1059799c..9d09f79243fa 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -170,6 +170,7 @@ stdenv.mkDerivation { lib.versionOlder version "1.88" && stdenv.hostPlatform.isDarwin ) ./darwin-no-system-python.patch ++ lib.optional (lib.versionOlder version "1.88") ./cmake-paths-173.patch + ++ lib.optional (lib.versionAtLeast version "1.88") ./cmake-paths-188.patch ++ lib.optional (version == "1.77.0") (fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; relative = "include";