diff options
| author | Oleg Pykhalov <go.wigust@gmail.com> | 2020-10-11 17:24:52 +0300 |
|---|---|---|
| committer | Oleg Pykhalov <go.wigust@gmail.com> | 2020-10-14 23:41:25 +0300 |
| commit | cb53c59dd19be8de2525d28bab59d91585dfe296 (patch) | |
| tree | 818bc0a3fec35469dc8467ca7be3dc02674ddb04 /gnu | |
| parent | dd642517aee1e67045a5317c1eab247c88701f59 (diff) | |
gnu: Add lua-resty-core.
* gnu/packages/lua.scm (lua-resty-core): New variable.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/lua.scm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 5479b891bd4..774df85170c 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -880,3 +880,40 @@ on numbers.") | |||
| 880 | "Selene is a simple C++11 header-only library enabling seamless | 880 | "Selene is a simple C++11 header-only library enabling seamless |
| 881 | interoperability between C++ and Lua programming language.") | 881 | interoperability between C++ and Lua programming language.") |
| 882 | (license license:zlib))) | 882 | (license license:zlib))) |
| 883 | |||
| 884 | (define-public lua-resty-core | ||
| 885 | (package | ||
| 886 | (name "lua-resty-core") | ||
| 887 | (version "0.1.17") | ||
| 888 | (source (origin | ||
| 889 | (method git-fetch) | ||
| 890 | (uri (git-reference | ||
| 891 | (url "https://github.com/openresty/lua-resty-core") | ||
| 892 | (commit (string-append "v" version)))) | ||
| 893 | (file-name (git-file-name name version)) | ||
| 894 | (sha256 | ||
| 895 | (base32 | ||
| 896 | "11fyli6yrg7b91nv9v2sbrc6y7z3h9lgf4lrrhcjk2bb906576a0")))) | ||
| 897 | (build-system trivial-build-system) | ||
| 898 | (arguments | ||
| 899 | `(#:modules ((guix build utils)) | ||
| 900 | #:builder | ||
| 901 | (begin | ||
| 902 | (use-modules (guix build utils)) | ||
| 903 | (let* ((luajit-major+minor ,(version-major+minor (package-version lua))) | ||
| 904 | (package-lua-resty (lambda (input output) | ||
| 905 | (mkdir-p (string-append output "/lib/lua")) | ||
| 906 | (copy-recursively (string-append input "/lib/resty") | ||
| 907 | (string-append output "/lib/lua/resty")) | ||
| 908 | (copy-recursively (string-append input "/lib/ngx") | ||
| 909 | (string-append output "/lib/ngx")) | ||
| 910 | (symlink (string-append output "/lib/lua/resty") | ||
| 911 | (string-append output "/lib/resty"))))) | ||
| 912 | (package-lua-resty (assoc-ref %build-inputs "source") | ||
| 913 | (assoc-ref %outputs "out"))) | ||
| 914 | #t))) | ||
| 915 | (home-page "https://github.com/openresty/lua-resty-core") | ||
| 916 | (synopsis "Lua API for NGINX") | ||
| 917 | (description "This package provides a FFI-based Lua API for | ||
| 918 | @code{ngx_http_lua_module} or @code{ngx_stream_lua_module}.") | ||
| 919 | (license license:bsd-2))) | ||
