From f18d37c3f2072c5f23d868a621e2b92d604761fe Mon Sep 17 00:00:00 2001
From: Jesse Gibbons <jgibbons2357+guix@gmail.com>
Date: Wed, 5 Jun 2019 14:03:19 -0600
Subject: [PATCH] add gnurobots
---
gnu/packages/games.scm | 49 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 47 insertions(+), 2 deletions(-)
@@ -40,8 +40,7 @@
;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
-;;;
-;;; This file is part of GNU Guix.
+;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
@@ -7336,3 +7335,49 @@ Unfortunately, Hacker is not aware of Drascula's real ambitions: DOMINATING
the World and demonstrating that he is even more evil than his brother Vlad.")
;; Drascula uses a BSD-like license.
(license (license:non-copyleft "file:///readme.txt"))))
+
+(define-public gnurobots
+ (package
+ (name "gnurobots")
+ (version "1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnu/gnurobots/gnurobots-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "07gi3lsmbzzsjambgixj6xy79lh22km84z7bnzgwzxdy806lyvwb"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("glib" ,glib)
+ ("gtk+" ,gtk+-2)
+ ("vte" ,vte/gtk+-2)
+ ("readline" ,readline)
+ ("guile" ,guile-1.8)
+ ("pkg-config" ,pkg-config)))
+ (arguments
+ ;;-Werror=deprecated-declarations kills the build.
+ '(#:make-flags '("CFLAGS=-Wno-error=deprecated-declarations")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-include
+ (lambda _
+ ;;TODO: Replace with code adding readline directory to C_INCLUDE_PATH.
+ (substitute* (find-files "src" "\\.c$")
+ (("<readline.h>") "<readline/readline.h>"))
+ (substitute* (find-files "src" "\\.c$")
+ (("<history.h>") "<readline/history.h>")))))))
+ (synopsis
+ "Program a little robot and watch it explore a world")
+ (description
+ "GNU Robots is a game in which you program a robot to explore a world
+full of enemies that can hurt it, obstacles and food to be eaten.
+The goal of the game is to stay alive and collect prizes. The robot
+program conveniently may be written in a plain text file in the
+Scheme programming language.")
+ (home-page
+ "https://www.gnu.org/software/gnurobots")
+ (license license:gpl3+)))
--
2.21.0