me
/
guix
Archived
1
0
Fork 0

gnu: seahorse-adventures: Use G-expressions.

* gnu/packages/games.scm (seahorse-adventures)[origin]<snippet>:
[arguments]<#:phases>: Use G-expressions.
master
Nicolas Goaziou 2022-02-08 00:06:23 +01:00
parent d1c0081166
commit 64c599c9a3
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 71 additions and 70 deletions

View File

@ -2376,19 +2376,19 @@ can be explored and changed freely.")
(srfi srfi-1))) (srfi srfi-1)))
;; Remove non-free (non-commercial) font. ;; Remove non-free (non-commercial) font.
(snippet (snippet
`(begin #~(begin
(for-each delete-file (find-files "data/fonts" ".")))))) (for-each delete-file (find-files "data/fonts" "."))))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:tests? #f ;no test (list
#:tests? #f ;no test
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'build) ;pure Python (delete 'build) ;pure Python
(replace 'install ;no install script (replace 'install ;no install script
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((bin (string-append #$output "/bin"))
(bin (string-append out "/bin")) (share (string-append #$output "/share"))
(share (string-append out "/share"))
(applications (string-append share "/applications")) (applications (string-append share "/applications"))
(data (string-append share "/seahorse-adventures"))) (data (string-append share "/seahorse-adventures")))
;; Install data. ;; Install data.
@ -2410,8 +2410,10 @@ can be explored and changed freely.")
"#!~a~@ "#!~a~@
export GUIX_PYTHONPATH=~a:~a~@ export GUIX_PYTHONPATH=~a:~a~@
exec -a \"~a\" ~a \"$@\"~%" exec -a \"~a\" ~a \"$@\"~%"
(which "bash") data (getenv "GUIX_PYTHONPATH") (search-input-file inputs "/bin/bash")
(which "python3") data
(getenv "GUIX_PYTHONPATH")
(search-input-file inputs "/bin/python3")
(string-append data "/run_game.py")))) (string-append data "/run_game.py"))))
(chmod executable #o555)) (chmod executable #o555))
;; Add desktop file. ;; Add desktop file.
@ -2421,8 +2423,8 @@ can be explored and changed freely.")
#:name "Seahorse Adventures" #:name "Seahorse Adventures"
#:comment #:comment
'((#f "Help Barbie the seahorse float on bubbles to the moon")) '((#f "Help Barbie the seahorse float on bubbles to the moon"))
#:exec ,name #:exec #$name
#:icon ,name #:icon #$name
#:categories '("Game" "ActionGame") #:categories '("Game" "ActionGame")
#:keywords '("game" "retro" "platform")) #:keywords '("game" "retro" "platform"))
;; Add icons. ;; Add icons.
@ -2437,9 +2439,8 @@ can be explored and changed freely.")
'("32" "64" "128"))))) '("32" "64" "128")))))
(add-after 'install 'unbundle-fonts (add-after 'install 'unbundle-fonts
;; Unbundle Bitstream Vera font and replace deleted one. ;; Unbundle Bitstream Vera font and replace deleted one.
(lambda* (#:key outputs inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let ((data (string-append #$output "/share/seahorse-adventures"))
(data (string-append out "/share/seahorse-adventures"))
(vera (search-input-file (vera (search-input-file
inputs "/share/fonts/truetype/Vera.ttf"))) inputs "/share/fonts/truetype/Vera.ttf")))
(let ((themes-dir (string-append data "/data/themes/"))) (let ((themes-dir (string-append data "/data/themes/")))