nginx: Fix cross-OS build

nginx uses uname to find the target platform by default.
This works fine when building locally or when building on the same OS
for most architectures, but breaks when building e.g. Linux to BSD.

Explicitly tell the target to the configure script instead.
This commit is contained in:
Artemis Tosini
2025-01-08 00:23:11 +00:00
parent c8693b4397
commit 65580eea00
+3
View File
@@ -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;