summaryrefslogtreecommitdiff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2026-06-09 22:46:25 +1000
committerNguyễn Gia Phong <cnx@loang.net>2026-06-17 22:06:34 +0900
commitbdd0524d06ea481b401a7dcb7d2bf946df72d5fe (patch)
tree7277ffe33bf2f45b1ff855cc2de079085f30774c /gnu/packages/lua.scm
parent059d485261192ef212df3e2814b79f38238e865b (diff)
gnu: lua-lunitx: Define variants with package rewrites.
This causes some limited rebuilds, due to the file-name change in origins. * gnu/packages/lua.scm (make-lua-lunitx): Remove procedure. (make-lua-rewriter): Don't rewrite lua-lunitx sources. (lua-lunitx): Convert to direct package definition. (lua5.4-lunitx, lua5.3-lunitx, lua5.2-lunitx) (lua5.1-lunitx): Define as rewrite of lua-lunitx. 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.scm32
1 files changed, 16 insertions, 16 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 761fdb8d445..f3e27b03254 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -358,6 +358,12 @@ NEW-PREFIX."
358 (name new-name) 358 (name new-name)
359 (source 359 (source
360 (cond 360 (cond
361 ;; List of packages that shouldn't have their sources
362 ;; rewritten. Eventually we would like to remove this
363 ;; source rewriting, but we'll do so progressively to avoid
364 ;; the rebuilds.
365 ((member (package-name package) '("lua-lunitx"))
366 (package-source package))
361 ;; If we're using {git,hg}-fetch, then rewrite the file-name 367 ;; If we're using {git,hg}-fetch, then rewrite the file-name
362 ;; of the resulting package. This avoids causing rebuilds 368 ;; of the resulting package. This avoids causing rebuilds
363 ;; when migrating from the older method of defining Lua 369 ;; when migrating from the older method of defining Lua
@@ -2152,9 +2158,9 @@ way, following established lisp conventions.")
2152 (home-page "https://git.sr.ht/~xerool/fennel-ls") 2158 (home-page "https://git.sr.ht/~xerool/fennel-ls")
2153 (license license:expat))) 2159 (license license:expat)))
2154 2160
2155(define (make-lua-lunitx name lua) 2161(define-public lua-lunitx
2156 (package 2162 (package
2157 (name name) 2163 (name "lua-lunitx")
2158 (version "0.8.2") 2164 (version "0.8.2")
2159 (source (origin 2165 (source (origin
2160 (method git-fetch) 2166 (method git-fetch)
@@ -2163,7 +2169,7 @@ way, following established lisp conventions.")
2163 ;; both lunit and lunitx modules. 2169 ;; both lunit and lunitx modules.
2164 (url "https://github.com/dcurrie/lunit") 2170 (url "https://github.com/dcurrie/lunit")
2165 (commit version))) 2171 (commit version)))
2166 (file-name (git-file-name "lua-lunitx" version)) 2172 (file-name (git-file-name name version))
2167 (sha256 2173 (sha256
2168 (base32 2174 (base32
2169 "0y9szbd2g8xk63s8781bjmw8sv3s5m6rnv47kh1sk21ml3mxi69y")))) 2175 "0y9szbd2g8xk63s8781bjmw8sv3s5m6rnv47kh1sk21ml3mxi69y"))))
@@ -2174,8 +2180,8 @@ way, following established lisp conventions.")
2174 #:builder 2180 #:builder
2175 #~(begin 2181 #~(begin
2176 (use-modules (guix build utils)) 2182 (use-modules (guix build utils))
2177 (let* ((lua (string-append #$lua "/bin/lua")) 2183 (let* ((lua (string-append #$(this-package-native-input "lua") "/bin/lua"))
2178 (lua-version #$(version-major+minor (package-version lua))) 2184 (lua-version #$(this-lua-version))
2179 (lua-dir (string-append #$output "/share/lua/" lua-version))) 2185 (lua-dir (string-append #$output "/share/lua/" lua-version)))
2180 (when #$(not (%current-target-system)) 2186 (when #$(not (%current-target-system))
2181 (with-directory-excursion (string-append #$source "/lua") 2187 (with-directory-excursion (string-append #$source "/lua")
@@ -2190,17 +2196,11 @@ lunitx extensions adding Lua 5.2 compatibility via @code{lunit.module} and
2190the @code{lunitx} module for running tests automatically at program exit.") 2196the @code{lunitx} module for running tests automatically at program exit.")
2191 (license license:expat))) 2197 (license license:expat)))
2192 2198
2193(define-public lua-lunitx 2199(define-public-lua-variants lua-lunitx
2194 (make-lua-lunitx "lua-lunitx" lua)) 2200 (lua-5.4 lua5.4-lunitx)
2195 2201 (lua-5.3 lua5.3-lunitx)
2196(define-public lua5.1-lunitx 2202 (lua-5.2 lua5.2-lunitx)
2197 (make-lua-lunitx "lua5.1-lunitx" lua-5.1)) 2203 (lua-5.1 lua5.1-lunitx))
2198
2199(define-public lua5.2-lunitx
2200 (make-lua-lunitx "lua5.2-lunitx" lua-5.2))
2201
2202(define-public lua5.4-lunitx
2203 (make-lua-lunitx "lua5.4-lunitx" lua-5.4))
2204 2204
2205(define (make-lua-lsqlite3 name lua lua-lunitx) 2205(define (make-lua-lsqlite3 name lua lua-lunitx)
2206 (package 2206 (package