guix: Modernize renpy-build-system.
* guix/build-system/renpy.scm (build): Drop trailing #t. (install, install-desktop-file): Likewise. Also add inputs and use search-input-file for /bin/sh and /bin/renpy.
This commit is contained in:
parent
f7d66e41f8
commit
956f0b4465
1 changed files with 8 additions and 11 deletions
|
@ -37,10 +37,9 @@ (define* (build #:key game #:allow-other-keys)
|
|||
game
|
||||
;; should be "compile", but renpy wants to compile itself really
|
||||
;; badly if we do
|
||||
"quit")
|
||||
#t)
|
||||
"quit"))
|
||||
|
||||
(define* (install #:key outputs game (output "out") #:allow-other-keys)
|
||||
(define* (install #:key inputs outputs game (output "out") #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs output))
|
||||
(json-dump (call-with-input-file (string-append game
|
||||
"/renpy-build.json")
|
||||
|
@ -58,13 +57,12 @@ (define* (install #:key outputs game (output "out") #:allow-other-keys)
|
|||
(call-with-output-file launcher
|
||||
(lambda (port)
|
||||
(format port "#!~a~%~a ~s \"$@\""
|
||||
(which "bash")
|
||||
(which "renpy")
|
||||
(search-input-file inputs "/bin/sh")
|
||||
(search-input-file inputs "/bin/renpy")
|
||||
data)))
|
||||
(chmod launcher #o755)))
|
||||
#t)
|
||||
(chmod launcher #o755))))
|
||||
|
||||
(define* (install-desktop-file #:key outputs game (output "out")
|
||||
(define* (install-desktop-file #:key inputs outputs game (output "out")
|
||||
#:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs output))
|
||||
(json-dump (call-with-input-file (string-append game
|
||||
|
@ -78,10 +76,9 @@ (define* (install-desktop-file #:key outputs game (output "out")
|
|||
#:name (assoc-ref json-dump "name")
|
||||
#:generic-name (assoc-ref build "display_name")
|
||||
#:exec (format #f "~a ~s"
|
||||
(which "renpy")
|
||||
(search-input-file inputs "/bin/renpy")
|
||||
(string-append out "/share/renpy/" directory-name))
|
||||
#:categories '("Game" "Visual Novel")))
|
||||
#t)
|
||||
#:categories '("Game" "Visual Novel"))))
|
||||
|
||||
(define %standard-phases
|
||||
(modify-phases gnu:%standard-phases
|
||||
|
|
Loading…
Reference in a new issue