From 8871ffccffe2e626c0bf326e8253aa1c692be6f5 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 11 Dec 2018 01:01:30 +0000 Subject: nginx: fix cross-build --- pkgs/servers/http/nginx/generic.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'pkgs/servers/http') diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 25ff20635aff..9ea49267cf8c 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, zlib, pcre, libxml2, libxslt +{ stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt , gd, geoip , withDebug ? false , withStream ? true @@ -60,8 +60,25 @@ stdenv.mkDerivation { NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; + configurePlatforms = []; + preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); + patches = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/102-sizeof_test_fix.patch"; + sha256 = "0i2k30ac8d7inj9l6bl0684kjglam2f68z8lf3xggcc2i5wzhh8a"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/101-feature_test_fix.patch"; + sha256 = "0v6890a85aqmw60pgj3mm7g8nkaphgq65dj4v9c6h58wdsrc6f0y"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/103-sys_nerr.patch"; + sha256 = "0s497x6mkz947aw29wdy073k8dyjq8j99lax1a1mzpikzr4rxlmd"; + }) + ]; + hardeningEnable = optional (!stdenv.isDarwin) "pie"; enableParallelBuilding = true; -- cgit 1.4.1