diff options
| author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2026-06-09 22:35:44 +1000 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-06-17 22:06:19 +0900 |
| commit | 059d485261192ef212df3e2814b79f38238e865b (patch) | |
| tree | a2674c2f3058ed006d85070245d3a51d99a7b4b3 /gnu/packages/lua.scm | |
| parent | e02607f8ac4395773dcc0fff9f0def19424df4f6 (diff) | |
gnu: lua-luarocks: Define variants with package rewrites.
* gnu/packages/lua.scm (make-lua-luarocks): Remove procedure.
(lua-luarocks): Convert to direct package definition.
(luarocks-5.2-rewriter): New procedure.
(lua5.2-luarocks): Define as rewrite of lua-luarocks.
Merges: https://codeberg.org/guix/guix/pulls/9183
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'gnu/packages/lua.scm')
| -rw-r--r-- | gnu/packages/lua.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index ab1dc045400..761fdb8d445 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -1824,9 +1824,9 @@ signals to Linux processes.") | |||
| 1824 | shell command executions.") | 1824 | shell command executions.") |
| 1825 | (license license:bsd-3))) | 1825 | (license license:bsd-3))) |
| 1826 | 1826 | ||
| 1827 | (define-public (make-luarocks name lua) | 1827 | (define-public luarocks |
| 1828 | (package | 1828 | (package |
| 1829 | (name name) | 1829 | (name "luarocks") |
| 1830 | (version "3.9.2") | 1830 | (version "3.9.2") |
| 1831 | (home-page "https://luarocks.org/") | 1831 | (home-page "https://luarocks.org/") |
| 1832 | (source (origin | 1832 | (source (origin |
| @@ -1857,7 +1857,7 @@ shell command executions.") | |||
| 1857 | (substitute* | 1857 | (substitute* |
| 1858 | (string-append | 1858 | (string-append |
| 1859 | (assoc-ref outputs "out") "/etc/luarocks/config-" | 1859 | (assoc-ref outputs "out") "/etc/luarocks/config-" |
| 1860 | ,(substring (package-version lua) 0 3) ".lua") ;e.g. "5.2" | 1860 | ,(this-lua-version) ".lua") ;e.g. "5.2" |
| 1861 | (("variables = \\{") | 1861 | (("variables = \\{") |
| 1862 | (string-append | 1862 | (string-append |
| 1863 | "variables = {\n" | 1863 | "variables = {\n" |
| @@ -1929,11 +1929,13 @@ is loaded. LuaRocks supports both local and | |||
| 1929 | multiple local rocks trees.") | 1929 | multiple local rocks trees.") |
| 1930 | (license license:expat))) | 1930 | (license license:expat))) |
| 1931 | 1931 | ||
| 1932 | (define-public lua5.2-luarocks | 1932 | ;; Luarocks doesn't use the usual "lua-" prefix, so it doesn't play nicely with |
| 1933 | (make-luarocks "lua5.2-luarocks" lua-5.2)) | 1933 | ;; our standard rewriter. Make a custom one just for this case for now. |
| 1934 | (define luarocks-5.2-rewriter | ||
| 1935 | (make-lua-rewriter lua-5.2 "luarocks" "lua5.2-luarocks")) | ||
| 1934 | 1936 | ||
| 1935 | (define-public luarocks | 1937 | (define-public lua5.2-luarocks |
| 1936 | (make-luarocks "luarocks" lua)) | 1938 | (luarocks-5.2-rewriter luarocks)) |
| 1937 | 1939 | ||
| 1938 | (define-public dkjson | 1940 | (define-public dkjson |
| 1939 | (package | 1941 | (package |
