Skip to content

Commit d475cf4

Browse files
committed
Fix ngtcp2 Windows cross-build: use ENABLE_LIB_ONLY cmake flag
ngtcp2 CMakeLists.txt doesn't have an ENABLE_EXAMPLES option. The correct flag to disable building examples is ENABLE_LIB_ONLY, which is what nixpkgs itself uses for static/FreeBSD builds.
1 parent e40108a commit d475cf4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

flake.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,11 @@
109109
# ngtcp2 examples include POSIX-only headers (sys/socket.h,
110110
# sys/un.h) that don't exist on Windows. The library itself
111111
# builds fine; only the example client/server programs fail.
112+
# The correct CMake option is ENABLE_LIB_ONLY (not ENABLE_EXAMPLES
113+
# which doesn't exist). nixpkgs already sets this for static/FreeBSD.
112114
ngtcp2 = prev.ngtcp2.overrideAttrs (old: {
113115
cmakeFlags = (old.cmakeFlags or []) ++ [
114-
(prev.lib.cmakeBool "ENABLE_EXAMPLES" false)
116+
(prev.lib.cmakeBool "ENABLE_LIB_ONLY" true)
115117
];
116118
});
117119
});

0 commit comments

Comments
 (0)