From ddb53e51bbc8592e32b81cfcc4773de1a6ba2b6c Mon Sep 17 00:00:00 2001 From: nee Date: Thu, 13 Apr 2017 22:45:18 +0200 Subject: [PATCH] gnu: Add crawl. * gnu/packages/games.scm (crawl): New variable. --- gnu/packages/games.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 710b2746c..c145ba830 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -115,6 +115,8 @@ #:use-module (gnu packages messaging) #:use-module (gnu packages upnp) #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex) #:use-module (guix build-system gnu) #:use-module (guix build-system haskell) #:use-module (guix build-system python) @@ -3649,3 +3651,71 @@ small robot living in the nano world, repair its maker.") ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright> ;; for a statement from the author. (license license:public-domain))) + +(define-public crawl + (package + (name "crawl") + (version "0.19.5") + (source (origin + (method url-fetch) + (uri (list + ;; Older releases get moved into a versioned directory + (string-append "http://crawl.develz.org/release/" + (version-major+minor version) "/stone_soup-" + version "-nodeps.tar.xz") + ;; Only the latest release is in this directory + (string-append "http://crawl.develz.org/release/stone_soup-" + version "-nodeps.tar.xz"))) + (sha256 + (base32 + "00yl2lb2shglxlxzpyk99zvglfx4amjybqwnzdcasvbiggb4cj18")))) + (arguments + '(#:make-flags + (let* ((sqlite (assoc-ref %build-inputs "sqlite")) + (out (assoc-ref %outputs "out"))) + (list (string-append "SQLITE_INCLUDE_DIR=" sqlite "/include") + (string-append "prefix=" out) + "SAVEDIR=~/.crawl" + "TILES=" + "BUILD_LUA=" + "BUILD_SQLITE=" + "BUILD_ZLIB=" + "-Csource")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace + 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (and + (mkdir-p "~/.crawl/saves") + (zero? (system* + "make" "test" + (string-append "prefix=" out) + "TILES=" + "BUILD_LUA=" + "BUILD_SQLITE=" + "BUILD_ZLIB=" + "-Csource"))))))))) + (build-system gnu-build-system) + (inputs `(("ncurses" ,ncurses) + ("sqlite" ,sqlite) + ("bison" ,bison) + ("flex" ,flex) + ("zlib" ,zlib) + ("lua51" ,lua-5.1))) + (native-inputs `(("pkg-config" ,pkg-config) + ("perl" ,perl))) + (synopsis "Roguelike dungeon crawler game") + (description "Dungeon Crawl Stone Soup is a roguelike adventure through +dungeons filled with dangerous monsters in a quest to find the mystifyingly +fabulous Orb of Zot.") + (home-page "https://crawl.develz.org") + (license (list license:gpl2+ + license:bsd-2 + license:bsd-3 + license:cc0 + license:x11 + license:zlib + license:asl2.0)))) -- 2.12.2