diff options
| author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2026-06-09 22:12:32 +1000 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-06-17 22:04:01 +0900 |
| commit | a99daadaa722c6945be3bab8c38ceaa3f9a3eff0 (patch) | |
| tree | 3b618e85477a14e262bf18039d42da532252d28a /gnu/packages/lua.scm | |
| parent | f0719434f2b5da8a42847f99528a8dbec50d3ac1 (diff) | |
gnu: lua-lpeg: Define variants with package rewrites.
* gnu/packages/lua.scm (make-lua-lpeg): Remove procedure.
(lua-lpeg): Convert to direct package definition.
(lua5.4-lpeg, lua5.3-lpeg, lua5.2-lpeg, lua5.1-lpeg):
Define as rewrite of lua-lpeg.
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 | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 1345617d5f3..f0a05019aa9 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -1191,9 +1191,9 @@ Notable examples are GTK+, GStreamer and Webkit.") | |||
| 1191 | (lua-5.2 lua5.2-lgi) | 1191 | (lua-5.2 lua5.2-lgi) |
| 1192 | (lua-5.1 lua5.1-lgi)) | 1192 | (lua-5.1 lua5.1-lgi)) |
| 1193 | 1193 | ||
| 1194 | (define (make-lua-lpeg name lua) | 1194 | (define-public lua-lpeg |
| 1195 | (package | 1195 | (package |
| 1196 | (name name) | 1196 | (name "lua-lpeg") |
| 1197 | (version "1.1.0") | 1197 | (version "1.1.0") |
| 1198 | (source (origin | 1198 | (source (origin |
| 1199 | (method url-fetch) | 1199 | (method url-fetch) |
| @@ -1211,7 +1211,7 @@ Notable examples are GTK+, GStreamer and Webkit.") | |||
| 1211 | (replace 'install | 1211 | (replace 'install |
| 1212 | (lambda* (#:key outputs #:allow-other-keys) | 1212 | (lambda* (#:key outputs #:allow-other-keys) |
| 1213 | (let ((out (assoc-ref outputs "out")) | 1213 | (let ((out (assoc-ref outputs "out")) |
| 1214 | (lua-version ,(version-major+minor (package-version lua)))) | 1214 | (lua-version ,(this-lua-version))) |
| 1215 | (install-file "lpeg.so" | 1215 | (install-file "lpeg.so" |
| 1216 | (string-append out "/lib/lua/" lua-version)) | 1216 | (string-append out "/lib/lua/" lua-version)) |
| 1217 | (install-file "re.lua" | 1217 | (install-file "re.lua" |
| @@ -1226,17 +1226,11 @@ Grammars (PEGs).") | |||
| 1226 | (home-page "https://www.inf.puc-rio.br/~roberto/lpeg") | 1226 | (home-page "https://www.inf.puc-rio.br/~roberto/lpeg") |
| 1227 | (license license:expat))) | 1227 | (license license:expat))) |
| 1228 | 1228 | ||
| 1229 | (define-public lua-lpeg | 1229 | (define-public-lua-variants lua-lpeg |
| 1230 | (make-lua-lpeg "lua-lpeg" lua)) | 1230 | (lua-5.4 lua5.4-lpeg) |
| 1231 | 1231 | (lua-5.3 lua5.3-lpeg) | |
| 1232 | (define-public lua5.1-lpeg | 1232 | (lua-5.2 lua5.2-lpeg) |
| 1233 | (make-lua-lpeg "lua5.1-lpeg" lua-5.1)) | 1233 | (lua-5.1 lua5.1-lpeg)) |
| 1234 | |||
| 1235 | (define-public lua5.2-lpeg | ||
| 1236 | (make-lua-lpeg "lua5.2-lpeg" lua-5.2)) | ||
| 1237 | |||
| 1238 | (define-public lua5.4-lpeg | ||
| 1239 | (make-lua-lpeg "lua5.4-lpeg" lua-5.4)) | ||
| 1240 | 1234 | ||
| 1241 | (define (make-lua-luv name lua) | 1235 | (define (make-lua-luv name lua) |
| 1242 | (package | 1236 | (package |
