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.
This commit is contained in:
Efraim Flashner 2021-01-25 10:51:05 +02:00
parent 18a512528d
commit 209d94fa64
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -1087,10 +1087,18 @@ (define-public fennel
#: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