diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 3c0e87ab6c76..6563f5c1e159 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -170,6 +170,9 @@ stdenv.mkDerivation { [ "--with-http_geoip_module" ] ++ lib.optional withStream "--with-stream_geoip_module" ) ++ lib.optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" + ++ lib.optional ( + stdenv.buildPlatform != stdenv.hostPlatform + ) "--crossbuild=${stdenv.hostPlatform.uname.system}::${stdenv.hostPlatform.uname.processor}" ++ configureFlags ++ map (mod: "--add-module=${mod.src}") modules;