From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60930) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j13VA-0006eP-AE for guix-patches@gnu.org; Mon, 10 Feb 2020 02:29:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j13V8-0003kS-Js for guix-patches@gnu.org; Mon, 10 Feb 2020 02:29:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j13V8-0003jP-FP for guix-patches@gnu.org; Mon, 10 Feb 2020 02:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j13V8-0007hH-Bp for guix-patches@gnu.org; Mon, 10 Feb 2020 02:29:02 -0500 Subject: [bug#38805] [PATCH] Add lure. Resent-Message-ID: Date: Mon, 10 Feb 2020 09:27:34 +0200 From: Efraim Flashner Message-ID: <20200210072734.GB9296@E5400> References: <87r20mzi2b.fsf@nicolasgoaziou.fr> <87r1zb7hu3.fsf@nicolasgoaziou.fr> <20200206193956.GD7827@E5400> <871rr3z034.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xgyAXRrhYN0wYx8y" Content-Disposition: inline In-Reply-To: <871rr3z034.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: 38805@debbugs.gnu.org --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Just a couple of formatting suggestions, otherwise it looks good! On Mon, Feb 10, 2020 at 02:45:51AM +0100, Nicolas Goaziou wrote: > Hello, >=20 > Efraim Flashner writes: >=20 > > I think for people looking for the game in other languages finding it as > > game-lang would be easier than as a separate output. So my vote would be > > different packages, assumably all inheriting from the english one. >=20 > Thank you for the review! >=20 > Unfortunately, inheritance doesn't cut it, as I need to parametrize the > localized packages. >=20 > What do you think about the following update? >=20 > Regards, >=20 > --=20 > Nicolas Goaziou > From 8a22035948190f63d941cd8e51b69bf4a37bdca3 Mon Sep 17 00:00:00 2001 > From: Nicolas Goaziou > Date: Mon, 30 Dec 2019 02:43:59 +0100 > Subject: [PATCH] gnu: Add lure. >=20 > * gnu/packages/games.scm (make-lure-package): > (lure): > (lure-de): > (lure-es): > (lure-fr): > (lure-it): New variables. I would do it as (lure, lure-de, lure-es, lure-fr, lure-it): New variables. > --- > gnu/packages/games.scm | 111 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 111 insertions(+) >=20 > diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm > index 78e0042aac..e9543679cd 100644 > --- a/gnu/packages/games.scm > +++ b/gnu/packages/games.scm > @@ -7730,6 +7730,117 @@ 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")))) > =20 > +(define (make-lure-package name language hash) > + (package > + (name name) > + (version "1.1") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "mirror://sourceforge/scummvm/extras/" > + "Lure%20of%20the%20Temptress/" > + name "-" version ".zip")) > + (sha256 > + (base32 hash)))) > + (build-system trivial-build-system) > + (arguments > + `(#:modules ((guix build utils)) > + #:builder > + (begin > + (use-modules (guix build utils)) > + (let* ((out (assoc-ref %outputs "out")) > + (share (string-append out "/share/lure"))) IMO you should have share as out/share, it allows for easier reuse of the variable. > + (let ((unzip (string-append (assoc-ref %build-inputs "unzip") > + "/bin/unzip"))) > + (invoke unzip "-j" (assoc-ref %build-inputs "source"))) > + (let ((doc (string-append out "/share/doc/lure-" ,version))) > + (for-each (lambda (f) (install-file f doc)) > + (find-files "." "\\.(txt|PDF|pdf)$"))) > + (for-each (lambda (f) > + (install-file f (string-append share "/" ,languag= e))) > + (find-files "." "\\.(vga|VGA)$")) I would move the following let variables to the top let and leave the other two (unzip, doc) as you have them. > + (let* ((bin (string-append out "/bin")) > + (apps (string-append out "/share/applications")) > + (executable (string-append bin "/" ,name)) > + (bash (assoc-ref %build-inputs "bash")) > + (scummvm (assoc-ref %build-inputs "scummvm"))) > + ;; Build the executable. > + (mkdir-p bin) > + (with-output-to-file executable > + (lambda () > + (format #t "#!~a/bin/bash~%" bash) > + (format #t "exec ~a/bin/scummvm -q ~a -p ~a lure~%" > + scummvm > + ,language > + (string-append share "/" ,language)))) > + (chmod executable #o755) > + ;; Create desktop file. There is no dedicated > + ;; icon for the game, so we borrow SCUMMVM's. > + (mkdir-p apps) > + (with-output-to-file (string-append apps "/" ,name ".deskto= p") > + (lambda _ > + (format #t > + "[Desktop Entry]~@ > + Name=3DLure of the Temptress~@ > + GenericName=3DLure~@ > + Exec=3D~a~@ > + Icon=3D~a/share/icons/hicolor/scalable/apps/scummvm= =2Esvg~@ > + Categories=3DAdventureGame;Game;RolePlaying;~@ > + Keywords=3Dgame;adventure;roleplaying;2D,fantasy;~@ > + Comment=3DClassic 2D point and click adventure game= ~@ > + Comment[de]=3Dklassisches 2D-Abenteuerspiel in Zeig= en-und-Klicken-Manier~@ > + Comment[fr]=3DJeu classique d'aventure pointer-et-c= liquer en 2D~@ > + Comment[it]=3DGioco classico di avventura punta e c= licca 2D~@ > + Type=3DApplication~%" > + executable scummvm)))) > + #t)))) > + (native-inputs > + `(("bash" ,bash) > + ("unzip" ,unzip))) > + (inputs > + `(("scummvm" ,scummvm))) > + (home-page "https://www.scummvm.org") > + (synopsis "2D point and click fantasy adventure game") > + (description > + "You are Diermot, an unwilling hero who'd prefer a quiet life, and = are, > +to all intents and purposes, a good man. After decades of unrest the Ki= ng has > +united the warring factions in his kingdom and all his lands are at peac= e, > +except a remote region around a town called Turnvale. A revolt has rece= ntly > +taken place in Turnvale, a revolt orchestrated by an apprentice sorceress > +called Selena, the titular temptress. The king calls together his finest > +horsemen and heads off (with you in tow) to Turnvale just to witness how > +hellish mercenary monsters called Skorl are invading the town. > + > +The king's men are defeated, the king is killed and you fall of your hor= se and > +bang your head heavily on the ground. You have been *unconscious for a = while > +when you realize that you are in a dingy cell guarded by a not so friend= ly > +Skorl. Maybe it would be an idea to try and escape... > + > +Note that this package only contains game-data. The game engine is prov= ided > +by ScummVM.") > + (license (license:non-copyleft "file:///README")))) > + > +(define-public lure > + (make-lure-package > + "lure" "en" "0201i70qcs1m797kvxjx3ygkhg6kcl5yf49sihba2ga8l52q45zk")) > + > +(define-public lure-de > + (make-lure-package > + "lure-de" "de" "0sqq7h5llml6rv85x0bfv4bgzwhs4c82p4w4zmfcaab6cjlad0sy"= )) > + > +(define-public lure-es > + (make-lure-package > + "lure-es" "es" "1dvv5znvlsakw6w5r16calv9jkgw27aymgybsf4q22lcmpxbj1lk"= )) > + > +(define-public lure-fr > + (make-lure-package > + "lure-fr" "fr" "1y51jjb7f8023832g44vd1jsb6ni85586pi2n5hjg9qjk6gi90r9"= )) > + > +(define-public lure-it > + (make-lure-package > + "lure-it" "it" "1ks6n39r1cllisrrh6pcr39swsdv7ng3gx5c47vaw71zzfr70hjj"= )) > + > (define-public gnurobots > (package > (name "gnurobots") > --=20 > 2.25.0 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --xgyAXRrhYN0wYx8y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5BBeMACgkQQarn3Mo9 g1FW7A//biqfy2ce+1wLr6ssqtyi1aqRAuvMJndRYlKQZar8vTZ4edfI2HluELWK zsBnwYQizGDyFK9nQOir/a557VGDhSmZ4wmj/uBIucDO9IXDD0PBv9axeF4FKcBO LPlg1RLdhKRy+4iyq1n891s0Jjkz0rvhl4c7NgcPG3m0x9ZvQUVb6Pi9/mGW6T/7 s60SdjAWoadXYPhGisS86X8DdkiwVg51O5FsmuInhkvwqQGYWq18OH7Tl7wgPSgs 6ADZLU2q1lkYf7zX6yd12PgPvhcAitKGymD2hRfOEs1bY/fbp9ZYL7AdlqNP0/h2 aJ3NkAsNEdFslPik7iFakxqDJ6h+UwNSmiCrUvT9ABX7WM17yl0vYqIdHerrl4g1 JIQ6qAbU+AGCd86Tz9s3ZsX4pWUkthPLmZ2l+HsP9qm/qof445E4uTFtKADYTImt tNFTHMKcAOOhsOwZGXFwr5l+Ez0ZdHYo1n8PKOf6n1WARvDx1dgAx6MGnVRIHHIL BBMiQUCmHiUxhyU4QV5qcvj4sZFXh5xxiVcHzBLPepljcdWlorKyQEQ8Nc5+86Kf gvHaFMtPBtSVzZC2sq64E8asPl6YcOfeg/vRMMX5UeKxCcVUhE9CxJz/lWqmWOwK R7dPnihLkgKIc7UuhYhqHnDQ2J3DlPILZF53CP5Nn5Dr1SYbbOE= =mcpW -----END PGP SIGNATURE----- --xgyAXRrhYN0wYx8y--