diff --git a/sycl-jit/jit-compiler/utils/generate.py b/sycl-jit/jit-compiler/utils/generate.py
index 449723b8fa26..ecba44efe071 100644
--- a/sycl-jit/jit-compiler/utils/generate.py
+++ b/sycl-jit/jit-compiler/utils/generate.py
@@ -49,6 +49,12 @@ const resource_file ToolchainFiles[] = {"""
         def process_dir(dir):
             for root, _, files in os.walk(dir):
                 for file in files:
+                    # Skip CMake files, because they contain absolute install paths, causing cyclic dependencies.
+                    # They aren't ever used as it seems, so excluding them won't break anything.
+                    if file in ['CMakeLists.txt', 'cmake_install.cmake'] or file.endswith('.cmake'):
+                        print(f"[nix-compat patch] Skipping embedding of sycl-jit CMake file: {os.path.join(root, file)}")
+                        continue
+
                     file_path = os.path.join(root, file)
                     process_file(file_path)
 
