gnu: prosody: Invoke prosody wrapper script directly.

* gnu/packages/messaging.scm (prosody)[arguments]: Add invoke-prosody-wrapper
phase.
This commit is contained in:
Arun Isaac 2022-11-15 00:19:16 +05:30
parent 0581f11181
commit d0118c9930
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3

View file

@ -1538,6 +1538,15 @@ (define-public prosody
(("^INSTALLEDCONFIG =.*") "INSTALLEDCONFIG = /etc/prosody\n")
;; prosodyctl needs a place to put auto-generated certificates.
(("^INSTALLEDDATA =.*") "INSTALLEDDATA = /var/lib/prosody\n"))))
(add-after 'unpack 'invoke-prosody-wrapper
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Invoke the prosody wrapper script instead of invoking lua on
;; the actual executable.
(substitute* "util/prosodyctl.lua"
(("os.execute\\(lua[^;]*")
(string-append "os.execute(\""
(assoc-ref outputs "out")
"/bin/prosody -D\")")))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure all executables in "bin" find the required Lua