11 callPackage ../nginx/generic.nix args rec {
13 nginxVersion = "1.25.3";
14 version = "${nginxVersion}.1";
17 url = "https://openresty.org/download/openresty-${version}.tar.gz";
18 sha256 = "sha256-MuwaJTpaEyUDVaB1/mW31j7EXFYLviEzUPCZKlfNed8=";
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.ROLLING $out/bin/luajit-openresty
44 ln -sf $out/nginx/bin/nginx $out/bin/openresty
45 ln -s $out/nginx/bin/nginx $out/bin/nginx
46 ln -s $out/nginx/conf $out/conf
47 ln -s $out/nginx/html $out/html
51 inherit (nixosTests) openresty-lua;
55 description = "Fast web application server built on Nginx";
56 homepage = "https://openresty.org";
57 license = lib.licenses.bsd2;
58 platforms = lib.platforms.all;
59 maintainers = with lib.maintainers; [ thoughtpolice lblasc ];