From: Marius Bakke <mbakke@fastmail.com>
To: Kei Kebreau <kei@openmailbox.org>, 26267@debbugs.gnu.org
Subject: bug#26267: [PATCH] gnu: hyperrogue: Update to 9.4c.
Date: Mon, 27 Mar 2017 23:29:10 +0200 [thread overview]
Message-ID: <87y3vqv26x.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20170327204017.3529-1-kei@openmailbox.org>
[-- Attachment #1: Type: text/plain, Size: 3398 bytes --]
Kei Kebreau <kei@openmailbox.org> writes:
> * gnu/packages/games.scm (hyperrogue): Update to 9.4c.
> [source]: Remove snippet.
> [arguments]: Remove #:make-flags; adjust configure and install phases; add
> install-data phase.
> [inputs]: Add hyperrogue-data.
Thanks!
[...]
> + (add-after 'install 'install-data
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((data (assoc-ref inputs "hyperrogue-data"))
> + (out (assoc-ref outputs "out"))
> + (share-dir (string-append out "/share/hyperrogue")))
> + (system* "tar" "xvf" data "-C" ".")
> + (with-directory-excursion "hyperrogue94c-win"
You can access the "version" variable here by "unquoting" it (with
comma). Another approach is skipping the "top folder" of the tarball
with "--strip-components=1". Maybe the "sounds" subdirectory can be
extracted directly to "out/share/sounds"? See e.g.
"font-adobe-source-code-pro" for some tar trickery.
> + (for-each
> + (lambda (file)
> + (install-file file (string-append share-dir "/sounds")))
> + (append (find-files "." "\\.ogg$")
> + (find-files "sounds" ".*$")))
> + (for-each
> + (lambda (file)
> + (install-file file share-dir))
> + '("papermodeldata.txt" "papermodeldata-help.txt"))))
> #t)))))
> (inputs
> `(("font-dejavu" ,font-dejavu)
> @@ -3227,7 +3238,23 @@ throwing people around in pseudo-randomly generated buildings.")
> ("sdl-union" ,(sdl-union (list sdl
> sdl-gfx
> sdl-mixer
> - sdl-ttf)))))
> + sdl-ttf)))
> + ("hyperrogue-data"
> + ,(origin
> + (method url-fetch)
> + (uri
> + (string-append
> + "http://www.roguetemple.com/z/hyper/" name
> + (string-join (string-split version #\.) "")
> + "-win.zip"))
> + (sha256
> + (base32
> + "1cyyrsnrixygg3zyz97hpsm6jzwbhydiwk3kl0lm7qjnw2nzkhhh"))
It would be good to have a comment near the source stating "remember to
update hyperrogue-data as well". Otherwise, if the enterprising Guix
contributor already have the old tarball in their store, they may not
notice the impending version/hash mismatch.
Also, this can be a "native-input" since it's downloaded, extracted and
thrown away, and only carry platform-independent data (for us, anyway).
> + (modules '((guix build utils)))
> + (snippet
> + '(begin
> + ;; Remove .exe and .dll files.
> + (for-each delete-file (find-files "." "\\.(exe|dll)$"))))))))
...for the same reason, I don't think this is necessary, especially if
we can avoid extracting these files to begin with. It will just use up
*more* space in the store, since it creates a derivation in addition to
the tarball. :-)
The rest LGTM, thanks!
> (home-page "http://www.roguetemple.com/z/hyper/")
> (synopsis "Non-euclidean graphical rogue-like game")
> (description
> --
> 2.12.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2017-03-27 21:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170326200643.5256-1-kei@openmailbox.org>
2017-03-27 19:11 ` bug#26267: [PATCH] gnu: hyperrogue: Update to 9.4c Leo Famulari
2017-03-27 20:42 ` Kei Kebreau
2017-03-27 20:40 ` Kei Kebreau
2017-03-27 21:29 ` Marius Bakke [this message]
2017-03-28 11:37 ` Kei Kebreau
2017-03-28 13:35 ` Marius Bakke
2017-03-28 15:35 ` Kei Kebreau
2017-03-29 1:16 ` Marius Bakke
2017-03-28 11:36 ` Kei Kebreau
2017-03-28 15:31 ` Kei Kebreau
2017-03-29 3:40 ` Kei Kebreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3vqv26x.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me \
--to=mbakke@fastmail.com \
--cc=26267@debbugs.gnu.org \
--cc=kei@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.