From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cscDG-0006fY-98 for guix-patches@gnu.org; Mon, 27 Mar 2017 17:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cscDC-0005YN-WD for guix-patches@gnu.org; Mon, 27 Mar 2017 17:30:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cscDC-0005YH-Ia for guix-patches@gnu.org; Mon, 27 Mar 2017 17:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cscDC-0003pW-7E for guix-patches@gnu.org; Mon, 27 Mar 2017 17:30:02 -0400 Subject: bug#26267: [PATCH] gnu: hyperrogue: Update to 9.4c. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20170327204017.3529-1-kei@openmailbox.org> References: <20170326200643.5256-1-kei@openmailbox.org> <20170327204017.3529-1-kei@openmailbox.org> Date: Mon, 27 Mar 2017 23:29:10 +0200 Message-ID: <87y3vqv26x.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Kei Kebreau , 26267@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Kei Kebreau 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=3D1". 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 generate= d 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 > --=20 > 2.12.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljZhCYACgkQoqBt8qM6 VPoqKwgA0NPaTiREYR9crMVlD7AkHxKuF0QegkQrW15rRiM2WnBo+RbkwPDpyOVc IwmTh7FWA1MHKIj6naHXKyWhTsa83Ee82AAuBaPJep2rR1hBI3Kie2Fog9jvx88G MyC6gHyUwRz1TjS+//D+O2NKNPl0uokDKpMkMdeNjx9uWNCvnKStGt9Oq5wv9uNN 6S7yt0fzdndgMEahJP5alYAD4l+iaexFKo9t9OrDN4kWJzRZwS3zZQVNSdHMTRI2 q5MWLXx3i0YTgAyTcK762ZrKWkGdQdJHwpA82v6mR9oQCTPa3nEtUn+qmaqweKxZ ody0repq76ymM76rn3m+gRTesWVdbA== =RAHh -----END PGP SIGNATURE----- --=-=-=--