diff --git a/pkgs/development/tools/parsing/antlr/4.nix b/pkgs/development/tools/parsing/antlr/4.nix index 53de05307568..13c2358a2a83 100644 --- a/pkgs/development/tools/parsing/antlr/4.nix +++ b/pkgs/development/tools/parsing/antlr/4.nix @@ -119,6 +119,9 @@ in { # not available in a sandboxed build. "-DANTLR_BUILD_CPP_TESTS=OFF" ]; + extraPatches = [ + ./include-dir-issue-379757.patch + ]; }).antlr; antlr4_12 = (mkAntlr { diff --git a/pkgs/development/tools/parsing/antlr/include-dir-issue-379757.patch b/pkgs/development/tools/parsing/antlr/include-dir-issue-379757.patch new file mode 100644 index 000000000000..9873a15c26ea --- /dev/null +++ b/pkgs/development/tools/parsing/antlr/include-dir-issue-379757.patch @@ -0,0 +1,13 @@ +diff --git a/runtime/Cpp/runtime/CMakeLists.txt b/runtime/Cpp/runtime/CMakeLists.txt +index be0d8bf03..09f825642 100644 +--- a/runtime/Cpp/runtime/CMakeLists.txt ++++ b/runtime/Cpp/runtime/CMakeLists.txt +@@ -7,7 +7,7 @@ if (NOT ANTLR_BUILD_SHARED AND NOT ANTLR_BUILD_STATIC) + message(FATAL_ERROR "Options ANTLR_BUILD_SHARED and ANTLR_BUILD_STATIC can't both be OFF") + endif() + +-set(libantlrcpp_INCLUDE_INSTALL_DIR "include/antlr4-runtime") ++set(libantlrcpp_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/antlr4-runtime") + + set(libantlrcpp_INCLUDE_DIRS + ${PROJECT_SOURCE_DIR}/runtime/src