guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#64787] [PATCH 2/2] gnu: Add openquest.


From: Adam Faiz
Subject: [bug#64787] [PATCH 2/2] gnu: Add openquest.
Date: Sat, 22 Jul 2023 16:27:49 +0800

>From 856d172ba50107ee74fe5c2aca5114923c89fbb1 Mon Sep 17 00:00:00 2001
Message-ID: 
<856d172ba50107ee74fe5c2aca5114923c89fbb1.1690012542.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1690012542.git.adam.faiz@disroot.org>
References: <cover.1690012542.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sat, 22 Jul 2023 15:38:48 +0800
Subject: [PATCH 2/2] gnu: Add openquest.

* gnu/packages/games.scm (openquest): New variable.
---
 gnu/packages/games.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c388314771..7355b295b7 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5094,6 +5094,55 @@ (define openrct2-objects
     "openrct2-objects is a set of objects for OpenRCT2.")
    (license license:gpl3+)))
 
+(define-public openquest
+  (package
+    (inherit scummc)
+    (name "openquest")
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 match))
+         (let* ((out (assoc-ref %outputs "out"))
+                (scummc (assoc-ref %build-inputs "scummc"))
+                (share (string-append scummc "/examples/openquest"))
+                (scummvm (assoc-ref %build-inputs "scummvm")))
+           ;; Create standalone executable.
+           (let* ((bin (string-append out "/bin"))
+                  (executable (string-append bin "/openquest"))
+                  (bash (search-input-file %build-inputs "/bin/bash")))
+             (mkdir-p bin)
+             (with-output-to-file executable
+               (lambda ()
+                 (format #t "#!~a~%" bash)
+                 (format #t
+                         "exec ~a/bin/scummvm --path=~a tentacle~%"
+                         scummvm share)))
+             (chmod executable #o755))
+           ;; Create desktop file.  There is no official icon,
+           ;; but the main character of the game is a good choice.
+           (let ((apps (string-append out "/share/applications")))
+             (mkdir-p apps)
+             (make-desktop-entry-file
+              (string-append apps "/openquest.desktop")
+              #:name "OpenQuest"
+              #:generic-name "OpenQuest"
+              #:exec (string-append out "/bin/openquest")
+              #:icon (string-append scummc 
"/examples/openquest/graphics/zob/frames/stand_S.bmp")
+              #:categories '("AdventureGame" "Game" "RolePlaying")
+              #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi")
+              #:comment '((#f "Simple 2D point and click adventure 
game"))))))))
+    (native-inputs
+     (list bash unzip))
+    (inputs
+     (list scummc scummvm))
+    (home-page "https://www.scummvm.org";)
+    (synopsis "Simple 2D point and click adventure game")
+    (description "OpenQuest is a two room adventure game
+that follows two aliens who come to Earth in search of a stolen artifact.")))
+
 (define-public openrct2
   (package
     (name "openrct2")
-- 
2.41.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]