1diff --git a/src/ctypesgen/__main__.py b/src/ctypesgen/__main__.py
2index 23ee014..2d0cfc1 100644
3--- a/src/ctypesgen/__main__.py
4+++ b/src/ctypesgen/__main__.py
5@@ -89,17 +89,9 @@ def main_impl(args, cmd_str):
6 assert _is_relative_to(args.output, args.linkage_anchor)
7
8 if args.cpp:
9- assert shutil.which(args.cpp[0]), f"Given pre-processor {args.cpp[0]!r} is not available."
10- else:
11- if shutil.which("gcc"):
12- args.cpp = ["gcc", "-E"]
13- elif shutil.which("cpp"):
14- args.cpp = ["cpp"]
15- elif shutil.which("clang"):
16- args.cpp = ["clang", "-E"]
17- else:
18- raise RuntimeError("C pre-processor auto-detection failed: neither gcc nor clang available.")
19-
20+ print("cpp argument ignored for nix build")
21+ args.cpp = ["@cc@", "-E"]
22+
23 # Important: must not use +=, this would mutate the original object, which is problematic when default=[] is used and ctypesgen called repeatedly from within python
24 args.compile_libdirs = args.compile_libdirs + args.universal_libdirs
25 args.runtime_libdirs = args.runtime_libdirs + args.universal_libdirs