From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cspSt-00071M-UV for guix-patches@gnu.org; Tue, 28 Mar 2017 07:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cspSn-0005bo-Uu for guix-patches@gnu.org; Tue, 28 Mar 2017 07:39:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50385) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cspSn-0005bb-Rr for guix-patches@gnu.org; Tue, 28 Mar 2017 07:39:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cspSn-00045V-Mw for guix-patches@gnu.org; Tue, 28 Mar 2017 07:39:01 -0400 Subject: bug#26267: [PATCH] gnu: hyperrogue: Update to 9.4c. Resent-Message-ID: From: Kei Kebreau References: <20170326200643.5256-1-kei@openmailbox.org> <20170327204017.3529-1-kei@openmailbox.org> <87y3vqv26x.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Date: Tue, 28 Mar 2017 07:37:53 -0400 In-Reply-To: <87y3vqv26x.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (Marius Bakke's message of "Mon, 27 Mar 2017 23:29:10 +0200") Message-ID: <87fuhxpr72.fsf@openmailbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; 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: Marius Bakke Cc: 26267@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Marius Bakke writes: > Kei Kebreau writes: > >> * gnu/packages/games.scm (hyperrogue): Update to 9.4c. >> [source]: Remove snippet. >> [arguments]: Remove #:make-flags; adjust configure and install phases; a= dd >> 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 "/sound= s"))) >> + (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 generat= ed 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 The new patch that I sent attempts to take care of these issues, but the unzip pattern matching in the install-data phase is not working for some reason. Any ideas? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY2ksSAAoJEOal7jwZRnoNxLwP/jT+L7wX2U5cp/IydHpCZarm 9ROq+FuFwtkGSRtI7mfgxDwPmWPCAbYVGT+0HjoZjUkcepdJzJpPA2+CmNbJF8AB b3IuyhgPO9fcMOj+POUC+11rASzZeF6UvnZeI6TXPhXqtW/lxOswbT9OVPulQEKn jA+wsuX/NI0LQ3cTPQ6mgvseSXE1Qugfm5CoGKngyourcfYjLeGRtBioYCox7caH 5EQ5jZV07ZWaGoOmauyD7jUOytJ0tWdEurC8P7xzxWNOwF51/t+p8LV6vR/jbKvi UmAY4uo4c3FI5L88k0Cpq8ofgDv1kTmPNPEnhMAR1OhkhHX9PYGujWrtzcdEe4EZ R+TIsCkfPgiRC5aoft/5+ZSpEEsOfegNAwzMs1Zjg12phFGWavWS+L2XaTw3U+7f SQn5tS+Q9tWcWkB6ttTO9m92+sSXSTIbd9hf7JCM+CYC2yh9d7JV5Xen20v7EcO/ c6PZNwkOCsnco4Wr0NC+XV+zPWxEKfbkeUE9KzViP/H7tnuN+koq3DB3fOgAFvaa FWBibhxnkG8v5WyTfCD0k2xdLrEpVSdSPozbDyJnIgYlRdjErYGjqH+ujRWexxia n9O5zcnbnI6e0sU72VCGR8U93jPBbId5x0kb+CSzOvKWYeS0c5WQ/E3YBJy7xZjR MsD/ssIolgrGWBZCjKo6 =0/Fw -----END PGP SIGNATURE----- --=-=-=--