summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-01-25 10:51:05 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-01-25 11:55:40 +0200
commit209d94fa646729877b7b03d71d9e162f94e5fab0 (patch)
treef20b2e1b75f187870e952a0e3f0454b0ccd646c2
parent18a512528de2aa5de85eb32f0305692cbf85231f (diff)
gnu: fennel: Cross-build.
* gnu/packages/lua.scm (fennel)[arguments]: Add phase to patch additional calls to lua binary. Adjust 'patch-fennel phase to specify specific lua location.
-rw-r--r--gnu/packages/lua.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 0100ed2dd3..80a59c2d6e 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1087,10 +1087,18 @@ shell command executions.")
#:phases
(modify-phases %standard-phases
(delete 'configure)
+ (add-before 'build 'patch-lua-calls
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((lua (string-append (assoc-ref inputs "lua") "/bin/lua")))
+ (setenv "LUA" lua)
+ (substitute* "old/launcher.lua"
+ (("/usr/bin/env lua") lua))
+ #t)))
(add-after 'build 'patch-fennel
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "fennel"
- (("/usr/bin/env lua") (which "lua")))
+ (("/usr/bin/env .*lua")
+ (string-append (assoc-ref inputs "lua") "/bin/lua")))
#t))
(delete 'check)
(add-after 'install 'check