summaryrefslogtreecommitdiff
path: root/tw/packages/games.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-04-30 21:05:16 +0200
committerTimo Wilken2023-04-30 21:05:16 +0200
commit986d6090b20bc6f0127dc09d8f4e660e8032a859 (patch)
tree0dca7ac3d10dceed8a149c6a5ff317b22da355d2 /tw/packages/games.scm
parent0f4859d87ad14c2af7f944cada9a5e19e8a6c6ef (diff)
Update Powder Toy recipe
- update to only available Meson package - use git sources instead of autogenerated tarball (guix lint) - install manpage first - fix synopsis (guix lint)
Diffstat (limited to 'tw/packages/games.scm')
-rw-r--r--tw/packages/games.scm38
1 files changed, 21 insertions, 17 deletions
diff --git a/tw/packages/games.scm b/tw/packages/games.scm
index 46b88006..9d779edf 100644
--- a/tw/packages/games.scm
+++ b/tw/packages/games.scm
@@ -33,6 +33,7 @@
#:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix modules)
@@ -345,20 +346,30 @@ its @samp{settings.cfg}). This means that the game will not run properly from
(package
(name "powder-toy")
(version "97.0.352")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/The-Powder-Toy/The-Powder-Toy/archive/refs/tags/v"
- version ".tar.gz"))
- (sha256 (base32 "0yi8ip6632yh9y9c80ghvnhir65yslm26q9f6jkivnw4k8dpxcis"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/The-Powder-Toy/The-Powder-Toy")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "1kzf8m47f3rqp770rkjbmrcarm6rb46d0n4y456wlw0qiwfmsqiw"))))
(build-system meson-build-system)
- (arguments `(#:meson ,meson-0.63 ; Powder Toy explicitly requires meson>=0.61.0
- #:configure-flags
+ (arguments `(#:configure-flags
,#~(list "-Dstatic=none"
(string-append "-Dworkaround_elusive_bzip2_include_dir="
#$(file-append bzip2 "/include")))
#:phases
(modify-phases %standard-phases
+ ;; Ninja doesn't install the manpage.
+ (add-after 'unpack 'install-manpage
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (destination (string-append out "/share/man/man6/powder.6")))
+ (rename-file "resources/powder.man" "resources/powder.6")
+ (install-file "resources/powder.6" (dirname destination))
+ ;; Compress manpage to match others on the system.
+ (invoke (search-input-file inputs "bin/gzip") destination))))
;; For some reason, ninja doesn't install the final binary properly.
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -366,19 +377,12 @@ its @samp{settings.cfg}). This means that the game will not run properly from
(install-file "powder" (string-append out "/bin"))
(rename-file "resources/appdata.xml" "resources/powder.appdata.xml")
(install-file "resources/powder.appdata.xml" (string-append out "/share/metainfo"))
- (install-file "resources/powder.desktop" (string-append out "/share/applications"))
- (copy-file (string-append "../The-Powder-Toy-" ,version "/resources/powder.man")
- "resources/powder.6")
- (install-file "resources/powder.6" (string-append out "/share/man/man6")))))
- (add-after 'install 'compress-documentation
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (invoke (string-append (assoc-ref inputs "gzip") "/bin/gzip")
- (string-append (assoc-ref outputs "out") "/share/man/man6/powder.6")))))))
+ (install-file "resources/powder.desktop" (string-append out "/share/applications"))))))))
;; Guix' luajit works with lua-5.1.
(inputs (list bzip2 fftwf jsoncpp curl libpng lua-5.1 luajit sdl2 zlib))
(native-inputs (list pkg-config gzip))
(home-page "https://powdertoy.co.uk/")
- (synopsis "A desktop version of the classic 'falling sand' physics sandbox")
+ (synopsis "Desktop version of the classic 'falling sand' physics sandbox")
(description "Have you ever wanted to blow something up? Or maybe you
always dreamt of operating an atomic power plant? Do you have a will to
develop your own CPU? The Powder Toy lets you to do all of these, and even