11 callPackage ../nginx/generic.nix args rec {
13 nginxVersion = "1.21.4";
14 version = "${nginxVersion}.3";
17 url = "https://openresty.org/download/openresty-${version}.tar.gz";
18 sha256 = "sha256-M6hMY8/Z5GsOXGLrLdx7gGi9ouFoYxQ0O4n8P/0kzdM=";
21 # generic.nix applies fixPatch on top of every patch defined there.
22 # This allows updating the patch destination, as openresty has
23 # nginx source code in a different folder.
25 let name = patch.name or (builtins.baseNameOf patch); in
26 runCommand "openresty-${name}" { src = patch; } ''
27 substitute $src $out \
28 --replace "a/" "a/bundle/nginx-${nginxVersion}/" \
29 --replace "b/" "b/bundle/nginx-${nginxVersion}/"
32 nativeBuildInputs = [ perl ];
34 buildInputs = [ postgresql ];
37 patchShebangs configure bundle/
40 configureFlags = [ "--with-http_postgres_module" ];
43 ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
44 ln -s $out/nginx/bin/nginx $out/bin/nginx
45 ln -s $out/nginx/conf $out/conf
46 ln -s $out/nginx/html $out/html
50 inherit (nixosTests) openresty-lua;
54 description = "A fast web application server built on Nginx";
55 homepage = "https://openresty.org";
56 license = lib.licenses.bsd2;
57 platforms = lib.platforms.all;
58 maintainers = with lib.maintainers; [ thoughtpolice lblasc emily ];