diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-12-19 08:46:26 +0100 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-12-19 08:46:48 +0100 |
commit | 0e25cc73c831e8af11b72aa6a84f99ef21dd4de7 (patch) | |
tree | 56e39bd3a8ac0fe95f9f096e7ff4c672a5e4431d /pkgs/servers/http | |
parent | c2b2f29d2b96b9d9bde49f522c4cb9b9a06f4adb (diff) |
nginxModules.lua: 0.10.15 -> 0.10.22
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r-- | pkgs/servers/http/nginx/modules.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix index ea293e3c0b707..6b4268d548017 100644 --- a/pkgs/servers/http/nginx/modules.nix +++ b/pkgs/servers/http/nginx/modules.nix @@ -257,19 +257,33 @@ let self = { }; }; - lua = { + lua = rec { name = "lua"; src = fetchFromGitHub { name = "lua"; owner = "openresty"; repo = "lua-nginx-module"; - rev = "v0.10.15"; - sha256 = "1j216isp0546hycklbr5wi8mlga5hq170hk7f2sm16sfavlkh5gz"; + rev = "v0.10.22"; + sha256 = "sha256-TyeTL7/0dI2wS2eACS4sI+9tu7UpDq09aemMaklkUss="; }; inputs = [ luajit ]; - preConfigure = '' + preConfigure = let + # fix compilation against nginx 1.23.0 + nginx-1-23-patch = fetchpatch { + url = "https://github.com/openresty/lua-nginx-module/commit/b6d167cf1a93c0c885c28db5a439f2404874cb26.patch"; + sha256 = "sha256-l7GHFNZXg+RG2SIBjYJO1JHdGUtthWnzLIqEORJUNr4="; + }; + in '' export LUAJIT_LIB="${luajit}/lib" - export LUAJIT_INC="${luajit}/include/luajit-2.0" + export LUAJIT_INC="$(realpath ${luajit}/include/luajit-*)" + + # make source directory writable to allow generating src/ngx_http_lua_autoconf.h + lua_src=$TMPDIR/lua-src + cp -r "${src}/" "$lua_src" + chmod -R +w "$lua_src" + patch -p1 -d $lua_src -i ${nginx-1-23-patch} + export configureFlags="''${configureFlags/"${src}"/"$lua_src"}" + unset lua_src ''; allowMemoryWriteExecute = true; }; |