guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 09cb4a57fa8979fb55559b0cb05747569a96e6ae
Author: Herman Rimm <[email protected]>
AuthorDate: Mon Mar 17 14:57:17 2025 +0100
gnu: lua-lpeg: Enable cross compilation.
* gnu/packages/lua.scm (lua-lpeg)[arguments]: Use G-expressions.
<make-flags>: Set CC.
Merges: https://codeberg.org/guix/guix/pulls/10665
Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
gnu/packages/lua.scm | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index a7e567d3eba..b0fdd06f7ae 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1301,20 +1301,24 @@ Notable examples are GTK+, GStreamer and Webkit.")
"0aimsjpcpkh3kk65f0pg1z2bp6d83rn4dg6pgbx1yv14s9kms5ab"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- ;; `make install` isn't available, so we have to do it manually
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (lua-version ,(this-lua-version)))
- (install-file "lpeg.so"
- (string-append out "/lib/lua/" lua-version))
- (install-file "re.lua"
- (string-append out "/share/lua/" lua-version))
- #t))))
- #:test-target "test"))
+ (list
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ ;; `make install` isn't available, so we have to do it manually
+ (replace 'install
+ (lambda _
+ (let ((lua-version #$(this-lua-version)))
+ (install-file
+ "lpeg.so"
+ (string-append #$output "/lib/lua/" lua-version))
+ (install-file
+ "re.lua"
+ (string-append #$output "/share/lua/" lua-version))))))
+ #:test-target
+ "test"))
(inputs (list lua))
(synopsis "Pattern-matching library for Lua")
(description