about summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-12-25 01:30:47 +0100
committerJan Tojnar <jtojnar@gmail.com>2022-12-25 01:30:47 +0100
commit72c37eddec230b691dee4a6c7aed17028a617ad8 (patch)
treecaf36a6707f07dff9fce175e4fc0f6dd8260a24c /pkgs/servers/http
parent4b4777638c424fa29224330d078b065503806aad (diff)
parent3fc0495cdc63449e1699db7b377962fb4ae55190 (diff)
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/envoy/default.nix10
-rw-r--r--pkgs/servers/http/nginx/generic.nix16
-rw-r--r--pkgs/servers/http/openresty/default.nix21
3 files changed, 27 insertions, 20 deletions
diff --git a/pkgs/servers/http/envoy/default.nix b/pkgs/servers/http/envoy/default.nix
index ca2c38c0a1a71..298e05fedb5b3 100644
--- a/pkgs/servers/http/envoy/default.nix
+++ b/pkgs/servers/http/envoy/default.nix
@@ -24,8 +24,8 @@ let
     # However, the version string is more useful for end-users.
     # These are contained in a attrset of their own to make it obvious that
     # people should update both.
-    version = "1.23.1";
-    rev = "edd69583372955fdfa0b8ca3820dd7312c094e46";
+    version = "1.23.3";
+    rev = "4801f5881893857fbc53a4061f0b20ef4ca91a5b";
   };
 in
 buildBazelPackage rec {
@@ -36,7 +36,7 @@ buildBazelPackage rec {
     owner = "envoyproxy";
     repo = "envoy";
     inherit (srcVer) rev;
-    sha256 = "sha256:157dbmp479xv5507n48yibvlgi2ac0l3sl9rzm28cm9lhzwva3k0";
+    sha256 = "sha256-akAuFk+jESWWvLRCDQ0XDT1Eplutfj5uacAFQp714vM=";
 
     postFetch = ''
       chmod -R +w $out
@@ -83,8 +83,8 @@ buildBazelPackage rec {
 
   fetchAttrs = {
     sha256 = {
-      x86_64-linux = "10f1lcn8pynqcj2hlz100zbpmawvn0f2hwpcw3m9v6v3fcs2l6pr";
-      aarch64-linux = "1na7gna9563mm1y7sy34fh64f1kxz151xn26zigbi9amwcpjbav6";
+      x86_64-linux = "sha256-zEebnLFGLUy6UR5Uf2f6s23s6tXYccp5SHzTcldDKwQ=";
+      aarch64-linux = "sha256-UfowJD9uUBimRbIaSq2US6BpEVDDqSLchSDJ1k0Cfwk=";
     }.${stdenv.system} or (throw "unsupported system ${stdenv.system}");
     dontUseCmakeConfigure = true;
     dontUseGnConfigure = true;
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix
index 7d301695cac06..06fa12725674e 100644
--- a/pkgs/servers/http/nginx/generic.nix
+++ b/pkgs/servers/http/nginx/generic.nix
@@ -8,6 +8,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
 , withStream ? true
 , withMail ? false
 , withPerl ? true
+, withSlice ? false
 , modules ? []
 , ...
 }:
@@ -18,9 +19,11 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
 , src ? null # defaults to upstream nginx ${version}
 , sha256 ? null # when not specifying src
 , configureFlags ? []
+, nativeBuildInputs ? []
 , buildInputs ? []
 , extraPatches ? []
 , fixPatch ? p: p
+, postPatch ? ""
 , preConfigure ? ""
 , postInstall ? ""
 , meta ? null
@@ -48,9 +51,7 @@ assert assertMsg (unique moduleNames == moduleNames)
   "nginx: duplicate modules: ${concatStringsSep ", " moduleNames}. A common cause for this is that services.nginx.additionalModules adds a module which the nixos module itself already adds.";
 
 stdenv.mkDerivation {
-  inherit pname;
-  inherit version;
-  inherit nginxVersion;
+  inherit pname version nginxVersion;
 
   outputs = ["out" "doc"];
 
@@ -59,6 +60,9 @@ stdenv.mkDerivation {
     inherit sha256;
   };
 
+  nativeBuildInputs = [ removeReferencesTo ]
+    ++ nativeBuildInputs;
+
   buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ]
     ++ buildInputs
     ++ mapModules "inputs";
@@ -106,7 +110,7 @@ stdenv.mkDerivation {
     "--with-http_perl_module"
     "--with-perl=${perl}/bin/perl"
     "--with-perl_modules_path=lib/perl5"
-  ]
+  ] ++ optional withSlice "--with-http_slice_module"
     ++ optional (gd != null) "--with-http_image_filter_module"
     ++ optional (geoip != null) "--with-http_geoip_module"
     ++ optional (withStream && geoip != null) "--with-stream_geoip_module"
@@ -155,6 +159,8 @@ stdenv.mkDerivation {
   ] ++ mapModules "patches")
     ++ extraPatches;
 
+  inherit postPatch;
+
   hardeningEnable = optional (!stdenv.isDarwin) "pie";
 
   enableParallelBuilding = true;
@@ -164,8 +170,6 @@ stdenv.mkDerivation {
     cp -r ${nginx-doc}/* $doc
   '';
 
-  nativeBuildInputs = [ removeReferencesTo ];
-
   disallowedReferences = map (m: m.src) modules;
 
   postInstall =
diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix
index 5c852de5b64aa..433d8fd3969b8 100644
--- a/pkgs/servers/http/openresty/default.nix
+++ b/pkgs/servers/http/openresty/default.nix
@@ -2,6 +2,7 @@
 , runCommand
 , lib
 , fetchurl
+, perl
 , postgresql
 , nixosTests
 , ...
@@ -9,17 +10,17 @@
 
 callPackage ../nginx/generic.nix args rec {
   pname = "openresty";
-  nginxVersion = "1.19.9";
+  nginxVersion = "1.21.4";
   version = "${nginxVersion}.1";
 
   src = fetchurl {
     url = "https://openresty.org/download/openresty-${version}.tar.gz";
-    sha256 = "1xn1d0x2y63z0mi0qq3js6lz6ziba92r7vyyfkj1qc738vjz8vsp";
+    sha256 = "sha256-DFCTtk94IehQZcmeXU5swxggz9fze5oN7IQgnYeir5k=";
   };
 
-  # generic.nix applies fixPatch on top of every patch defined there.  This
-  # allows updating the patch destination, as openresty has nginx source code
-  # in a different folder.
+  # generic.nix applies fixPatch on top of every patch defined there.
+  # This allows updating the patch destination, as openresty has
+  # nginx source code in a different folder.
   fixPatch = patch:
     let name = patch.name or (builtins.baseNameOf patch); in
     runCommand "openresty-${name}" { src = patch; } ''
@@ -28,14 +29,16 @@ callPackage ../nginx/generic.nix args rec {
         --replace "b/" "b/bundle/nginx-${nginxVersion}/"
     '';
 
-  buildInputs = [ postgresql ];
+  nativeBuildInputs = [ perl ];
 
-  configureFlags = [ "--with-http_postgres_module" ];
+  buildInputs = [ postgresql ];
 
-  preConfigure = ''
-    patchShebangs .
+  postPatch = ''
+    patchShebangs configure bundle/
   '';
 
+  configureFlags = [ "--with-http_postgres_module" ];
+
   postInstall = ''
     ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
     ln -s $out/nginx/sbin/nginx $out/bin/nginx