games.scm 464 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 John Darrington <jmd@gnu.org>
  3. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  4. ;;; Copyright © 2014, 2015 David Thompson <dthompson2@worcester.edu>
  5. ;;; Copyright © 2014-2023 Eric Bavier <bavier@posteo.net>
  6. ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
  7. ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
  8. ;;; Copyright © 2014, 2015, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  9. ;;; Copyright © 2014, 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
  10. ;;; Copyright © 2014, 2015, 2019 Mark H Weaver <mhw@netris.org>
  11. ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
  12. ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
  13. ;;; Copyright © 2015, 2017, 2018, 2021 Christine Lemmer-Webber <cwebber@dustycloud.org>
  14. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
  15. ;;; Copyright © 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
  16. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  17. ;;; Copyright © 2016, 2017 Rodger Fox <thylakoid@openmailbox.org>
  18. ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
  19. ;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
  20. ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Kei Kebreau <kkebreau@posteo.net>
  21. ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
  22. ;;; Copyright © 2016-2021, 2023 Efraim Flashner <efraim@flashner.co.il>
  23. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  24. ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
  25. ;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
  26. ;;; Copyright © 2017, 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
  27. ;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <me@tobias.gr>
  28. ;;; Copyright © 2017, 2019 nee <nee-git@hidamari.blue>
  29. ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
  30. ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  31. ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
  32. ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
  33. ;;; Copyright © 2017-2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  34. ;;; Copyright © 2018 okapi <okapi@firemail.cc>
  35. ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
  36. ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
  37. ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
  38. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  39. ;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
  40. ;;; Copyright © 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com>
  41. ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
  42. ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
  43. ;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
  44. ;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
  45. ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
  46. ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
  47. ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
  48. ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
  49. ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
  50. ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
  51. ;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
  52. ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
  53. ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
  54. ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  55. ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
  56. ;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
  57. ;;; Copyright © 2020, 2021 Liliana Marie Prikler <liliana.prikler@gmail.com>
  58. ;;; Copyright © 2020 Lu hux <luhux@outlook.com>
  59. ;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
  60. ;;; Copyright © 2021 Olivier Rojon <o.rojon@posteo.net>
  61. ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
  62. ;;; Copyright © 2021, 2022 Greg Hogan <code@greghogan.com>
  63. ;;; Copyright © 2021 David Pflug <david@pflug.io>
  64. ;;; Copyright © 2021, 2022 Felix Gruber <felgru@posteo.net>
  65. ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
  66. ;;; Copyright © 2021, 2022 Noisytoot <ron@noisytoot.org>
  67. ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
  68. ;;; Copyright © 2021, 2022 Brendan Tildesley <mail@brendan.scot>
  69. ;;; Copyright © 2021 Christopher Baines <mail@cbaines.net>
  70. ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
  71. ;;; Copyright © 2022, 2023 Yovan Naumovski <yovan@gorski.stream>
  72. ;;; Copyright © 2022 Roman Riabenko <roman@riabenko.com>
  73. ;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
  74. ;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
  75. ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  76. ;;; Copyright © 2022 Hendursaga <hendursaga@aol.com>
  77. ;;; Copyright © 2022 Parnikkapore <poomklao@yahoo.com>
  78. ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
  79. ;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
  80. ;;; Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
  81. ;;;
  82. ;;; This file is part of GNU Guix.
  83. ;;;
  84. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  85. ;;; under the terms of the GNU General Public License as published by
  86. ;;; the Free Software Foundation; either version 3 of the License, or (at
  87. ;;; your option) any later version.
  88. ;;;
  89. ;;; GNU Guix is distributed in the hope that it will be useful, but
  90. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  91. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  92. ;;; GNU General Public License for more details.
  93. ;;;
  94. ;;; You should have received a copy of the GNU General Public License
  95. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  96. (define-module (gnu packages games)
  97. #:use-module (ice-9 match)
  98. #:use-module ((guix licenses) #:prefix license:)
  99. #:use-module (guix utils)
  100. #:use-module (guix packages)
  101. #:use-module (guix download)
  102. #:use-module (guix git-download)
  103. #:use-module (guix svn-download)
  104. #:use-module (guix gexp)
  105. #:use-module (gnu packages)
  106. #:use-module (gnu packages adns)
  107. #:use-module (gnu packages algebra)
  108. #:use-module (gnu packages autotools)
  109. #:use-module (gnu packages backup)
  110. #:use-module (gnu packages base)
  111. #:use-module (gnu packages build-tools)
  112. #:use-module (gnu packages admin)
  113. #:use-module (gnu packages audio)
  114. #:use-module (gnu packages avahi)
  115. #:use-module (gnu packages assembly)
  116. #:use-module (gnu packages bash)
  117. #:use-module (gnu packages bison)
  118. #:use-module (gnu packages boost)
  119. #:use-module (gnu packages check)
  120. #:use-module (gnu packages cmake)
  121. #:use-module (gnu packages compression)
  122. #:use-module (gnu packages code)
  123. #:use-module (gnu packages cpp)
  124. #:use-module (gnu packages curl)
  125. #:use-module (gnu packages crypto)
  126. #:use-module (gnu packages cyrus-sasl)
  127. #:use-module (gnu packages documentation)
  128. #:use-module (gnu packages docbook)
  129. #:use-module (gnu packages emulators)
  130. #:use-module (gnu packages flex)
  131. #:use-module (gnu packages fltk)
  132. #:use-module (gnu packages fonts)
  133. #:use-module (gnu packages fontutils)
  134. #:use-module (gnu packages freedesktop)
  135. #:use-module (gnu packages fribidi)
  136. #:use-module (gnu packages game-development)
  137. #:use-module (gnu packages gcc)
  138. #:use-module (gnu packages gettext)
  139. #:use-module (gnu packages ghostscript)
  140. #:use-module (gnu packages gimp)
  141. #:use-module (gnu packages gl)
  142. #:use-module (gnu packages glib)
  143. #:use-module (gnu packages gnome)
  144. #:use-module (gnu packages gnu-doc)
  145. #:use-module (gnu packages gnupg)
  146. #:use-module (gnu packages gnuzilla)
  147. #:use-module (gnu packages golang)
  148. #:use-module (gnu packages gperf)
  149. #:use-module (gnu packages graphics)
  150. #:use-module (gnu packages graphviz)
  151. #:use-module (gnu packages gsasl)
  152. #:use-module (gnu packages gstreamer)
  153. #:use-module (gnu packages gtk)
  154. #:use-module (gnu packages guile)
  155. #:use-module (gnu packages haskell)
  156. #:use-module (gnu packages haskell-crypto)
  157. #:use-module (gnu packages haskell-xyz)
  158. #:use-module (gnu packages icu4c)
  159. #:use-module (gnu packages image)
  160. #:use-module (gnu packages imagemagick)
  161. #:use-module (gnu packages javascript)
  162. #:use-module (gnu packages less)
  163. #:use-module (gnu packages lesstif)
  164. #:use-module (gnu packages libcanberra)
  165. #:use-module (gnu packages libedit)
  166. #:use-module (gnu packages libidn)
  167. #:use-module (gnu packages libunwind)
  168. #:use-module (gnu packages linux)
  169. #:use-module (gnu packages llvm)
  170. #:use-module (gnu packages lua)
  171. #:use-module (gnu packages man)
  172. #:use-module (gnu packages maths)
  173. #:use-module (gnu packages messaging)
  174. #:use-module (gnu packages mp3)
  175. #:use-module (gnu packages music)
  176. #:use-module (gnu packages multiprecision)
  177. #:use-module (gnu packages ncurses)
  178. #:use-module (gnu packages netpbm)
  179. #:use-module (gnu packages networking)
  180. #:use-module (gnu packages ocaml)
  181. #:use-module (gnu packages opencl)
  182. #:use-module (gnu packages pcre)
  183. #:autoload (gnu packages pascal) (fpc)
  184. #:use-module (gnu packages perl)
  185. #:use-module (gnu packages perl-check)
  186. #:use-module (gnu packages perl-compression)
  187. #:use-module (gnu packages pkg-config)
  188. #:use-module (gnu packages pretty-print)
  189. #:use-module (gnu packages protobuf)
  190. #:use-module (gnu packages pulseaudio)
  191. #:use-module (gnu packages python)
  192. #:use-module (gnu packages python-web)
  193. #:use-module (gnu packages python-xyz)
  194. #:use-module (gnu packages qt)
  195. #:use-module (gnu packages readline)
  196. #:use-module (gnu packages ruby)
  197. #:use-module (gnu packages shells)
  198. #:use-module (gnu packages sdl)
  199. #:use-module (gnu packages serialization)
  200. #:use-module (gnu packages sqlite)
  201. #:use-module (gnu packages squirrel)
  202. #:use-module (gnu packages swig)
  203. #:use-module (gnu packages tcl)
  204. #:use-module (gnu packages terminals)
  205. #:use-module (gnu packages texinfo)
  206. #:use-module (gnu packages textutils)
  207. #:use-module (gnu packages tls)
  208. #:use-module (gnu packages unicode)
  209. #:use-module (gnu packages upnp)
  210. #:use-module (gnu packages video)
  211. #:use-module (gnu packages vulkan)
  212. #:use-module (gnu packages web)
  213. #:use-module (gnu packages wget)
  214. #:use-module (gnu packages wxwidgets)
  215. #:use-module (gnu packages xdisorg)
  216. #:use-module (gnu packages xorg)
  217. #:use-module (gnu packages xiph)
  218. #:use-module (gnu packages xml)
  219. #:use-module (guix build-system copy)
  220. #:use-module (guix build-system cmake)
  221. #:use-module (guix build-system glib-or-gtk)
  222. #:use-module (guix build-system gnu)
  223. #:use-module (guix build-system go)
  224. #:use-module (guix build-system meson)
  225. #:use-module (guix build-system perl)
  226. #:use-module (guix build-system python)
  227. #:use-module (guix build-system qt)
  228. #:use-module (guix build-system scons)
  229. #:use-module (guix build-system trivial)
  230. #:use-module ((srfi srfi-1) #:hide (zip))
  231. #:use-module (srfi srfi-26))
  232. (define-public abe
  233. (package
  234. (name "abe")
  235. (version "1.1")
  236. (source
  237. (origin
  238. (method url-fetch)
  239. (uri (string-append "mirror://sourceforge/abe/abe/abe-" version
  240. "/abe-" version ".tar.gz"))
  241. (sha256
  242. (base32 "1xvpnq1y6y48fn3pvn2lk0h1ilmalv7nb7awpid1g4jcq1sfmi6z"))))
  243. (build-system gnu-build-system)
  244. (arguments
  245. `(#:configure-flags
  246. (list (string-append "--with-data-dir="
  247. (assoc-ref %outputs "out")
  248. "/share/abe"))
  249. #:phases
  250. (modify-phases %standard-phases
  251. (replace 'bootstrap
  252. (lambda _ (invoke "sh" "autogen.sh")))
  253. (add-before 'build 'set-SDL
  254. ;; Set correct environment for SDL.
  255. (lambda* (#:key inputs #:allow-other-keys)
  256. (setenv "CPATH"
  257. (string-append
  258. (assoc-ref inputs "sdl") "/include/SDL:"
  259. (or (getenv "CPATH") "")))
  260. #t))
  261. (add-after 'install 'finalize-install
  262. (lambda* (#:key outputs #:allow-other-keys)
  263. (let ((share (string-append (assoc-ref outputs "out") "/share")))
  264. ;; Installation script does not copy game data files.
  265. (let ((data (string-append share "/abe")))
  266. (for-each (lambda (dir)
  267. (let ((target (string-append data "/" dir)))
  268. (mkdir-p target)
  269. (copy-recursively dir target)))
  270. '("images" "maps" "sounds")))
  271. ;; Create desktop file.
  272. (let ((apps (string-append share "/applications")))
  273. (mkdir-p apps)
  274. (make-desktop-entry-file
  275. (string-append apps "/abe.desktop")
  276. #:name "Abe's Amazing Adventure"
  277. #:exec ,name
  278. #:categories '("AdventureGame" "Game")
  279. #:keywords
  280. '("side-scrolling" "adventure" "pyramid" "singleplayer")
  281. #:comment
  282. '(("de" "Ein sich seitwärts bewegendes Abenteuerspiel")
  283. (#f "Side-scrolling game")))))
  284. #t)))))
  285. (native-inputs
  286. (list autoconf automake))
  287. (inputs
  288. `(("libxi" ,libxi)
  289. ("libxmu" ,libxmu)
  290. ("libxt" ,libxt)
  291. ("sdl" ,(sdl-union (list sdl sdl-mixer)))))
  292. (home-page "https://abe.sourceforge.net")
  293. (synopsis "Scrolling, platform-jumping, ancient pyramid exploring game")
  294. (description
  295. "Abe's Amazing Adventure is a scrolling,
  296. platform-jumping, key-collecting, ancient pyramid exploring game, vaguely in
  297. the style of similar games for the Commodore+4.")
  298. (license license:gpl2+)))
  299. ;; Data package for adanaxisgpl.
  300. (define adanaxis-mush
  301. (let ((version "1.1.0"))
  302. (origin
  303. (method url-fetch)
  304. (uri (string-append "http://www.mushware.com/files/adanaxis-mush-"
  305. version ".tar.gz"))
  306. (sha256
  307. (base32 "0mk9ibis5nkdcalcg1lkgnsdxxbw4g5w2i3icjzy667hqirsng03")))))
  308. (define-public adanaxisgpl
  309. (package
  310. (name "adanaxisgpl")
  311. (version "1.2.5")
  312. (source
  313. (origin
  314. (method url-fetch)
  315. (uri (string-append "http://www.mushware.com/files/adanaxisgpl-"
  316. version ".tar.gz"))
  317. (sha256
  318. (base32 "0jkn637jaabvlhd6hpvzb57vvjph94l6fbf7qxbjlw9zpr19dw1f"))
  319. (modules '((guix build utils)))
  320. (snippet
  321. '(begin
  322. ;; Necessary for building with gcc >=4.7.
  323. (substitute* "src/Mushcore/MushcoreSingleton.h"
  324. (("SingletonPtrSet\\(new SingletonType\\);")
  325. "MushcoreSingleton::SingletonPtrSet(new SingletonType);"))
  326. ;; Avoid an "invalid conversion from const char* to char*" error.
  327. (substitute* "src/Platform/X11/PlatformMiscUtils.cpp"
  328. (("char \\*end, \\*result;")
  329. (string-append "const char *end;"
  330. "\n"
  331. "char *result;")))
  332. #t))))
  333. (build-system gnu-build-system)
  334. (arguments
  335. `(#:tests? #f ; no check target
  336. #:phases
  337. (modify-phases %standard-phases
  338. (add-after 'install 'install-data
  339. (lambda* (#:key inputs outputs #:allow-other-keys)
  340. (let ((data (assoc-ref inputs "adanaxis-mush"))
  341. (share (string-append (assoc-ref outputs "out")
  342. "/share/" ,name "-" ,version)))
  343. (mkdir-p share)
  344. (invoke "tar" "xvf" data "-C" share)))))))
  345. (native-inputs
  346. `(("adanaxis-mush" ,adanaxis-mush))) ; game data
  347. (inputs
  348. `(("expat" ,expat)
  349. ("freeglut" ,freeglut)
  350. ("glu" ,glu)
  351. ("libjpeg" ,libjpeg-turbo)
  352. ("libogg" ,libogg)
  353. ("libtiff" ,libtiff)
  354. ("libvorbis" ,libvorbis)
  355. ("libx11" ,libx11)
  356. ("libxext" ,libxext)
  357. ("pcre" ,pcre)
  358. ("sdl" ,sdl)
  359. ("sdl-mixer" ,sdl-mixer)))
  360. (home-page "https://www.mushware.com")
  361. (synopsis "Action game in four spatial dimensions")
  362. (description
  363. "Adanaxis is a fast-moving first person shooter set in deep space, where
  364. the fundamentals of space itself are changed. By adding another dimension to
  365. space this game provides an environment with movement in four directions and
  366. six planes of rotation. Initially the game explains the 4D control system via
  367. a graphical sequence, before moving on to 30 levels of gameplay with numerous
  368. enemy, ally, weapon and mission types. Features include simulated 4D texturing,
  369. mouse and joystick control, and original music.")
  370. (license license:gpl2)))
  371. (define-public alex4
  372. (package
  373. (name "alex4")
  374. (version "1.2.1")
  375. (source
  376. (origin
  377. (method git-fetch)
  378. (uri (git-reference
  379. (url "https://github.com/carstene1ns/alex4")
  380. (commit version)))
  381. (file-name (git-file-name name version))
  382. (sha256
  383. (base32 "098wy72mh4lsvq3gm0rhamjssf9l1hp6hhkpzrv7klpb97cwwc3h"))))
  384. (build-system gnu-build-system)
  385. (arguments
  386. `(#:tests? #f ; no check target
  387. #:make-flags
  388. (list "CC=gcc"
  389. "CFLAGS=-D_FILE_OFFSET_BITS=64"
  390. (string-append "PREFIX=" (assoc-ref %outputs "out")))
  391. #:phases
  392. (modify-phases %standard-phases
  393. (delete 'configure) ; no configure script
  394. (add-after 'install 'install-data
  395. (lambda* (#:key outputs #:allow-other-keys)
  396. (let ((share (string-append (assoc-ref outputs "out")
  397. "/share/" ,name)))
  398. (install-file "alex4.ini" share)
  399. #t))))))
  400. (inputs
  401. `(("allegro" ,allegro-4)
  402. ("dumb" ,dumb-allegro4)))
  403. (home-page "https://allegator.sourceforge.net/")
  404. (synopsis "Retro platform game")
  405. (description
  406. "Guide Alex the Allegator through the jungle in order to save his
  407. girlfriend Lola from evil humans who want to make a pair of shoes out of her.
  408. Plenty of classic platforming in four nice colors guaranteed!
  409. The game includes a built-in editor so you can design and share your own maps.")
  410. (license license:gpl2+)))
  411. (define-public armagetronad
  412. (package
  413. (name "armagetronad")
  414. (version "0.2.9.1.0")
  415. (source (origin
  416. (method url-fetch)
  417. (uri (string-append "mirror://sourceforge/armagetronad/stable/"
  418. version "/armagetronad-" version ".tbz"))
  419. (sha256
  420. (base32
  421. "18gn4sg4j5sw38ngb90sl50raliplrsgjcvy8fjwry733k0cgdjr"))))
  422. (build-system gnu-build-system)
  423. (native-inputs
  424. (list pkg-config))
  425. (inputs
  426. (list libxml2
  427. sdl
  428. sdl-image
  429. freeglut
  430. libpng
  431. libjpeg-turbo))
  432. (home-page "https://www.armagetronad.org")
  433. (synopsis "Tron clone in 3D")
  434. (description "Armagetron Advanced is a multiplayer game in 3d that
  435. attempts to emulate and expand on the lightcycle sequence from the movie Tron.
  436. It's an old school arcade game slung into the 21st century. Highlights
  437. include a customizable playing arena, HUD, unique graphics, and AI bots. For
  438. the more advanced player there are new game modes and a wide variety of
  439. physics settings to tweak as well.")
  440. (license license:gpl2+)))
  441. (define-public astromenace
  442. (package
  443. (name "astromenace")
  444. (version "1.4.2")
  445. (source
  446. (origin
  447. (method git-fetch)
  448. (uri (git-reference
  449. (url "https://github.com/viewizard/astromenace")
  450. (commit (string-append "v" version))))
  451. (file-name (git-file-name name version))
  452. (sha256
  453. (base32 "0vw94issjzz6rji0ssqv5yrll513dvj7m0d33q8lbih1gdh4alal"))))
  454. (build-system cmake-build-system)
  455. (arguments
  456. (list
  457. #:tests? #f ;no tests
  458. #:configure-flags
  459. #~(list (string-append "-DDATADIR=" #$output "/share/astromenace"))
  460. #:phases
  461. #~(modify-phases %standard-phases
  462. (replace 'install
  463. ;; Upstream provides no install phase.
  464. (lambda _
  465. (let* ((bin (string-append #$output "/bin"))
  466. (share (string-append #$output "/share"))
  467. (apps (string-append share "/applications"))
  468. (data (string-append share "/astromenace"))
  469. (icons (string-append share "/icons/hicolor/64x64/apps")))
  470. (install-file "astromenace" bin)
  471. (install-file "gamedata.vfs" data)
  472. (with-directory-excursion (string-append #$source "/share")
  473. (install-file "astromenace.desktop" apps)
  474. (mkdir-p icons)
  475. (copy-file "astromenace_64.png"
  476. (string-append icons "/astromenace.png")))))))))
  477. (inputs
  478. (list freealut
  479. freetype
  480. glu
  481. libogg
  482. libvorbis
  483. openal
  484. sdl2))
  485. (home-page "https://www.viewizard.com/")
  486. (synopsis "3D space shooter with spaceship upgrade possibilities")
  487. (description
  488. "Space is a vast area, an unbounded territory where it seems there is
  489. a room for everybody, but reversal of fortune put things differently. The
  490. hordes of hostile creatures crawled out from the dark corners of the universe,
  491. craving to conquer your homeland. Their force is compelling, their legions
  492. are interminable. However, humans didn't give up without a final showdown and
  493. put their best pilot to fight back. These malicious invaders chose the wrong
  494. galaxy to conquer and you are to prove it! Go ahead and make alien aggressors
  495. regret their insolence.")
  496. ;; Game is released under GPL3+ terms. Artwork is subject to CC
  497. ;; BY-SA 4.0, and fonts to OFL1.1.
  498. (license (list license:gpl3+ license:cc-by-sa4.0 license:silofl1.1))))
  499. (define-public barony
  500. (package
  501. (name "barony")
  502. (version "3.3.7")
  503. (source
  504. (origin
  505. (method git-fetch)
  506. (uri (git-reference
  507. (url "https://github.com/TurningWheel/Barony")
  508. (commit (string-append "v" version))))
  509. (file-name (git-file-name name version))
  510. (sha256
  511. (base32 "1y72k6zrqqhib3p05zkdklays2d218v51n87k7k68m0s7nnxa4vy"))
  512. ;; Fix textures for SDL 2.0.14.
  513. ;; See <https://github.com/TurningWheel/Barony/pull/582>.
  514. (patches (search-patches "barony-fix-textures.patch"))))
  515. (build-system cmake-build-system)
  516. (arguments
  517. '(#:configure-flags
  518. (list "-DOPENAL_ENABLED=ON" ; enable sound
  519. "-DEDITOR_EXE_NAME=barony-editor") ; instead of generic "editor"
  520. #:tests? #f ; there are no tests
  521. #:phases
  522. (modify-phases %standard-phases
  523. (add-before 'configure 'fix-installation
  524. (lambda _
  525. (substitute* "CMakeLists.txt"
  526. (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/lang")
  527. "${CMAKE_SOURCE_DIR}/lang")))))))
  528. (inputs
  529. (list glu
  530. libpng
  531. libvorbis
  532. openal
  533. physfs
  534. rapidjson
  535. sdl2
  536. sdl2-image
  537. sdl2-net
  538. sdl2-ttf
  539. zlib))
  540. (native-inputs
  541. (list pkg-config))
  542. (home-page "https://baronygame.com")
  543. (synopsis "3D first-person roguelike game")
  544. (description
  545. "Barony is a first-person roguelike role-playing game with cooperative
  546. play. The player must descend a dark dungeon and destroy an undead lich while
  547. avoiding traps and fighting monsters. The game features randomly generated
  548. dungeons, 13 character classes, hundreds of items and artifacts, and
  549. cooperative multiplayer for up to four players. This package does @emph{not}
  550. provide the game assets.")
  551. (license license:bsd-2)))
  552. (define-public bastet
  553. (package
  554. (name "bastet")
  555. (version "0.43.2")
  556. (source
  557. (origin
  558. (method git-fetch)
  559. (uri (git-reference
  560. (url "https://github.com/fph/bastet")
  561. (commit version)))
  562. (file-name (git-file-name name version))
  563. (sha256
  564. (base32 "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn"))
  565. (patches
  566. (search-patches "bastet-change-source-of-unordered_set.patch"))))
  567. (build-system gnu-build-system)
  568. (arguments
  569. `(#:make-flags
  570. (list (string-append "CXXFLAGS=-I"
  571. (assoc-ref %build-inputs "boost") "/include"))
  572. #:phases
  573. (modify-phases %standard-phases
  574. (delete 'configure) ; no configure script
  575. (replace 'check
  576. ;; The 'Test' target builds the tests, but doesn't actually run them.
  577. (lambda* (#:key make-flags #:allow-other-keys)
  578. (apply invoke "make" "Test" make-flags)
  579. (setenv "HOME" ".")
  580. (invoke "./Test")))
  581. (replace 'install
  582. (lambda* (#:key outputs #:allow-other-keys)
  583. (let* ((out (assoc-ref outputs "out"))
  584. (share (string-append out "/share"))
  585. (hicolor (string-append share "/icons/hicolor")))
  586. (install-file "bastet"
  587. (string-append out "/bin"))
  588. (install-file "bastet.desktop"
  589. (string-append share "/applications"))
  590. (install-file "bastet.svg"
  591. (string-append hicolor "/scalable/apps"))
  592. (install-file "bastet.appdata.xml"
  593. (string-append share "/appdata"))
  594. (install-file "bastet.6"
  595. (string-append out "/share/man/man6"))
  596. #t))))))
  597. (native-inputs
  598. (list hicolor-icon-theme))
  599. (inputs
  600. (list boost ncurses))
  601. (home-page "https://fph.altervista.org/prog/bastet.html")
  602. (synopsis "Antagonistic Tetris-style falling brick game for text terminals")
  603. (description
  604. "Bastet (short for Bastard Tetris) is a simple ncurses-based falling brick
  605. game. Unlike normal Tetris, Bastet does not choose the next brick at random.
  606. Instead, it uses a special algorithm to choose the worst brick possible.
  607. Playing bastet can be a painful experience, especially if you usually make
  608. canyons and wait for the long I-shaped block to clear four rows at a time.")
  609. (license license:gpl3+)))
  610. (define-public tetrinet
  611. (package
  612. (name "tetrinet")
  613. (version "0.11")
  614. (source
  615. (origin
  616. (method url-fetch)
  617. (uri (string-append
  618. "http://tetrinet.or.cz/download/tetrinet-" version
  619. ".tar.bz2"))
  620. (sha256
  621. (base32
  622. "0b4pddqz6is1771qmvcj8qqlr4in2djdbkk13agvp9yhfah2v8x7"))))
  623. (build-system gnu-build-system)
  624. (inputs
  625. (list ncurses))
  626. (arguments
  627. `(#:tests? #f ;no tests
  628. #:make-flags '("CC=gcc")
  629. #:phases
  630. (modify-phases %standard-phases
  631. (delete 'configure) ;no configure script
  632. (add-after 'unpack 'fix-install-dir
  633. (lambda* (#:key outputs #:allow-other-keys)
  634. (let ((out (assoc-ref outputs "out")))
  635. (mkdir-p (string-append out "/bin"))
  636. (substitute* "Makefile"
  637. (("/usr/games") (string-append out "/bin"))))))
  638. (add-after 'install 'install-documentation
  639. (lambda* (#:key outputs #:allow-other-keys)
  640. (let* ((out (assoc-ref outputs "out"))
  641. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  642. (for-each (lambda (file)
  643. (install-file file doc))
  644. (list "README" "tetrinet.txt"))))))))
  645. (home-page "http://tetrinet.or.cz")
  646. (synopsis "Terminal-based multiplayer Tetris clone")
  647. (description "Tetrinet is a multiplayer Tetris-like game with powerups and
  648. attacks you can use on opponents.")
  649. (license license:public-domain)))
  650. (define-public vitetris
  651. (package
  652. (name "vitetris")
  653. (version "0.59.1")
  654. (source
  655. (origin
  656. (method git-fetch)
  657. (uri (git-reference
  658. (url "https://github.com/vicgeralds/vitetris")
  659. (commit (string-append "v" version))))
  660. (sha256
  661. (base32 "1ah1c5g7abksif0n8v5rb7r4pn2az20c3mkp4ak13vgs23ddmds5"))
  662. (file-name (git-file-name name version))))
  663. (build-system gnu-build-system)
  664. (arguments
  665. `(#:tests? #f ;no test
  666. #:make-flags
  667. (list ,(string-append "CC=" (cc-for-target))
  668. (string-append "DESTDIR=" (assoc-ref %outputs "out")))
  669. #:phases
  670. (modify-phases %standard-phases
  671. (replace 'configure
  672. (lambda _
  673. ;; the non standard configure script does not accept
  674. ;; standard parameters -> invoke configure by hand
  675. (invoke "./configure" "prefix=")
  676. ;; src/src-conf.mk must be writable for the build step
  677. (make-file-writable "src/src-conf.mk"))))))
  678. (home-page "http://victornils.net/tetris/")
  679. (synopsis "Terminal-based Tetris clone")
  680. (description "Vitetris is a classic multiplayer Tetris clone for the
  681. terminal.")
  682. (license license:bsd-2)))
  683. (define-public blobwars
  684. (package
  685. (name "blobwars")
  686. (version "2.00")
  687. (source
  688. (origin
  689. (method url-fetch)
  690. (uri (string-append "mirror://sourceforge/blobwars/"
  691. "blobwars-" version ".tar.gz"))
  692. (sha256
  693. (base32 "16aagvkx6azf75gm5kaa94bh5npydvhqp3fvdqyfsanzdjgjf1n4"))))
  694. (build-system gnu-build-system)
  695. (arguments
  696. `(#:tests? #f ;no test
  697. #:make-flags
  698. (let ((out (assoc-ref %outputs "out")))
  699. (list (string-append "PREFIX=" out)
  700. (string-append "BINDIR=" out "/bin/")
  701. "USEPAK=1"
  702. "RELEASE=1"))
  703. #:phases
  704. (modify-phases %standard-phases
  705. (add-after 'unpack 'werror-begone
  706. (lambda _
  707. (substitute* "Makefile" (("-Werror") ""))
  708. #t))
  709. (delete 'configure)))) ;no configure script
  710. (native-inputs
  711. `(("gettext" ,gettext-minimal)
  712. ("pkg-config" ,pkg-config)))
  713. (inputs
  714. `(("hicolor-icon-theme" ,hicolor-icon-theme)
  715. ("sdl" ,(sdl-union (list sdl2
  716. sdl2-image
  717. sdl2-mixer
  718. sdl2-ttf
  719. sdl2-net)))))
  720. (home-page "https://sourceforge.net/projects/blobwars/")
  721. (synopsis "Platform action game featuring a blob with a lot of weapons")
  722. (description "Blobwars: Metal Blob Solid is a 2D platform game, the first
  723. in the Blobwars series. You take on the role of a fearless Blob agent. Your
  724. mission is to infiltrate various enemy bases and rescue as many MIAs as
  725. possible, while battling many vicious aliens.")
  726. (license (list license:gpl2 ; For code and graphics
  727. license:cc0 ; Music and sounds have specific licenses
  728. license:cc-by3.0 ; see /doc/readme
  729. license:cc-by-sa3.0
  730. license:lgpl2.1+
  731. license:bsd-2))))
  732. (define-public bsd-games
  733. (package
  734. (name "bsd-games")
  735. (version "2.17.0")
  736. (source
  737. (origin
  738. (method url-fetch)
  739. (uri "https://ibiblio.org/pub/linux/games/bsd-games-2.17.tar.gz")
  740. (sha256
  741. (base32 "0q7zdyyfvn15y0w4g54kq3gza89h61py727m8slmw73cxx594vq6"))
  742. (patches
  743. (search-patches
  744. ;; thanks Arch, and Debian
  745. "bsd-games-2.17-64bit.patch"
  746. "bsd-games-bad-ntohl-cast.patch"
  747. "bsd-games-gamescreen.h.patch"
  748. "bsd-games-getline.patch"
  749. "bsd-games-null-check.patch"
  750. "bsd-games-number.c-and-test.patch"
  751. "bsd-games-stdio.h.patch"
  752. "bsd-games-prevent-name-collisions.patch"
  753. ;; Guix customizations
  754. "bsd-games-add-configure-config.patch"
  755. "bsd-games-dont-install-empty-files.patch"
  756. "bsd-games-add-wrapper.patch"))))
  757. (build-system gnu-build-system)
  758. (native-inputs
  759. (list flex bison))
  760. (inputs
  761. `(("curses" ,ncurses)
  762. ("pager" ,less)
  763. ("miscfiles" ,miscfiles)
  764. ("openssl" ,openssl))) ;used only by 'factor'
  765. (arguments
  766. `(#:phases
  767. (modify-phases %standard-phases
  768. (replace 'configure
  769. (lambda* (#:key outputs inputs #:allow-other-keys)
  770. (let* ((out (assoc-ref outputs "out"))
  771. (bin (string-append out "/bin"))
  772. (doc (string-append out "/share/doc/bsd-games-" ,version))
  773. (man (string-append out "/share/man"))
  774. (word-list (search-input-file inputs "/share/web2"))
  775. (static-data (string-append out "/share/games/bsd-games"))
  776. ;; Not a "./" because of substitute* in 'patch-install
  777. ;; below. The .// allow us not to mess with the games'
  778. ;; code any further: we just use a wrapper script that
  779. ;; cd's to a BSD_GAMES_DIR. :]
  780. (save-files ".//"))
  781. (substitute* "configure"
  782. (("/usr/share/man") man)
  783. (("/usr/share/doc/bsd-games") doc)
  784. (("/usr/share/[^\n/]*") static-data)
  785. (("/var/games") save-files)
  786. (("/usr/bin/less") (which "less"))
  787. (("(/usr/bin|/usr/games)") bin))
  788. (substitute* "config.params" (("WORD_LIST") word-list))
  789. (substitute* "wrapper" (("STATIC_DATA") static-data))
  790. (invoke "./configure"))
  791. #t))
  792. (add-before 'install 'patch-install
  793. ;; Some games need a writable directory containing pre-maded files.
  794. ;; The files get installed to the Store. Then the wrapper kicks in.
  795. (lambda* (#:key outputs #:allow-other-keys)
  796. (let* ((out (assoc-ref outputs "out"))
  797. (static-data (string-append out "/share/games/bsd-games"))
  798. (save-files ".//"))
  799. (substitute* "Makeconfig" ((save-files) static-data)))
  800. #t))
  801. (add-after 'install 'install-documents
  802. (lambda* (#:key outputs #:allow-other-keys)
  803. (let* ((out (assoc-ref outputs "out"))
  804. (doc (string-append out "/share/doc/bsd-games-" ,version)))
  805. (rename-file "phantasia/COPYRIGHT" "phantasia-COPYRIGHT")
  806. (for-each
  807. (lambda(file) (install-file file doc))
  808. '("AUTHORS" "BUGS" "README" "SECURITY" "THANKS"
  809. "phantasia-COPYRIGHT")))
  810. #t)))))
  811. (home-page "https://github.com/vattam/BSDGames")
  812. (synopsis "Collection of the old text-based games and amusements")
  813. (description
  814. "These are the BSD games.
  815. Action: atc (keep the airplanes safe), hack (explore the dangerous Dungeon),
  816. hunt (kill the others for the Pair of Boots, multi-player only), robots (avoid
  817. the evil robots), sail (game of naval warfare with wooden ships), snake (steal
  818. the $$ from the cave, anger the snake, and get out alive), tetris (game of
  819. lining up the falling bricks of different shapes), and worm (eat, grow big,
  820. and neither bite your tail, nor ram the wall).
  821. Amusements: banner (prints a large banner), bcd & morse & ppt (print a punch
  822. card, or paper tape, or Morse codes), caesar & rot13 (ciphers and deciphers
  823. the input), factor (factorizes a number), number (translates numbers into
  824. text), pig (translates from English to Pig Latin), pom (should print the
  825. Moon's phase), primes (generates primes), rain & worms (plays an screen-saver
  826. in terminal), random (prints randomly chosen lines from files, or returns a
  827. random exit-code), and wtf (explains what do some acronyms mean).
  828. Board: backgammon (lead the men out of board faster than the friend do),
  829. boggle (find the words in the square of letters), dab (game of dots and
  830. boxes), gomoku (game of five in a row), hangman (guess a word before man is
  831. hanged), and monop (game of monopoly, hot-seat only). Also the card-games:
  832. canfield, cribbage, fish (juniors game), and mille.
  833. Quests: adventure (search for treasures with the help of wizard),
  834. battlestar (explore the world around, starting from dying spaceship),
  835. phantasia (role-play as an rogue), trek (hunt the Klingons, and save the
  836. Federation), and wump (hunt the big smelly Wumpus in a dark cave).
  837. Quizzes: arithmetic and quiz.")
  838. ;; "Auxiliary and data files, distributed with the games in NetBSD, but
  839. ;; not bearing copyright notices, probably fall under the terms of the UCB
  840. ;; or NetBSD copyrights and licences. The file "fortune/Notes" contains a
  841. ;; warning in regard to the fortune databases."
  842. (license (list
  843. ;; Most games. Files: countmail/countmail.6, dab/dab.6,
  844. ;; lib/strlcpy.c, wargames/wargames.6
  845. license:bsd-3
  846. ;; dab and hunt. Files: adventure/extern.h,
  847. ;; backgammon/backgammon/backlocal.h, caesar/rot13.in,
  848. ;; countmail/countmail, dm/utmpentry.c, dm/utmpentry.h,
  849. ;; hack/extern.h, robots/auto.c, sail/display.h,
  850. ;; sail/restart.h, wargames/wargames
  851. license:bsd-4
  852. ;; wtf (the game)
  853. license:public-domain
  854. ;; phantasia (all but phantasia/pathnames.h.in, which is bsd-3)
  855. (license:fsf-free "file:///phantasia/COPYRIGHT")))))
  856. (define-public bzflag
  857. (package
  858. (name "bzflag")
  859. (version "2.4.26")
  860. (source
  861. (origin
  862. (method url-fetch)
  863. (uri (string-append "https://download.bzflag.org/bzflag/source/"
  864. version "/bzflag-" version ".tar.bz2"))
  865. (sha256
  866. (base32 "050h933lmcdf4bw9z3c6g3k8c9sch9f6kq57jp2ivb96zw2h90q1"))))
  867. (build-system gnu-build-system)
  868. (arguments
  869. (list
  870. #:phases
  871. #~(modify-phases %standard-phases
  872. (add-after 'install 'install-desktop-file-and-icons
  873. (lambda _
  874. (let* ((share (string-append #$output "/share"))
  875. (data (string-append share "/bzflag"))
  876. (hicolor (string-append share "/icons/hicolor"))
  877. (applications (string-append share "/applications")))
  878. ;; Move desktop file.
  879. (install-file (string-append data "/bzflag.desktop")
  880. applications)
  881. ;; Install icons.
  882. (for-each (lambda (size)
  883. (let* ((dim (string-append size "x" size))
  884. (dir (string-append hicolor "/" dim "/apps")))
  885. (mkdir-p dir)
  886. (copy-file
  887. (string-append data "/bzflag-" dim ".png")
  888. (string-append dir "/bzflag.png"))))
  889. '("48" "256"))))))))
  890. (native-inputs
  891. (list pkg-config))
  892. (inputs
  893. (list c-ares
  894. curl
  895. glew
  896. glu
  897. sdl2
  898. zlib))
  899. (home-page "https://www.bzflag.org/")
  900. (synopsis "3D first person tank battle game")
  901. (description
  902. "BZFlag is a 3D multi-player multiplatform tank battle game that
  903. allows users to play against each other in a network environment.
  904. There are five teams: red, green, blue, purple and rogue (rogue tanks
  905. are black). Destroying a player on another team scores a win, while
  906. being destroyed or destroying a teammate scores a loss. Rogues have
  907. no teammates (not even other rogues), so they cannot shoot teammates
  908. and they do not have a team score.
  909. There are two main styles of play: capture-the-flag and free-for-all.
  910. In capture-the-flag, each team (except rogues) has a team base and
  911. each team with at least one player has a team flag. The object is to
  912. capture an enemy team's flag by bringing it to your team's base. This
  913. destroys every player on the captured team, subtracts one from that
  914. team's score, and adds one to your team's score. In free-for-all,
  915. there are no team flags or team bases. The object is simply to get as
  916. high a score as possible.")
  917. ;; The game is dual-licensed.
  918. (license (list license:lgpl2.1 license:mpl2.0))))
  919. (define-public cataclysm-dda
  920. (package
  921. (name "cataclysm-dda")
  922. (version "0.G")
  923. (source
  924. (origin
  925. (method git-fetch)
  926. (uri (git-reference
  927. (url "https://github.com/CleverRaven/Cataclysm-DDA")
  928. (commit version)))
  929. (sha256
  930. (base32 "0y8513yflxfqblk42h5ad0dq5lx5s8k6hhjy65yfcda7amsv9mhx"))
  931. (file-name (git-file-name name version))))
  932. (build-system gnu-build-system)
  933. (arguments
  934. (list
  935. #:make-flags
  936. #~(list (string-append "PREFIX=" #$output)
  937. "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1"
  938. "LOCALIZE=1" "LANGUAGES=all")
  939. #:phases
  940. #~(modify-phases %standard-phases
  941. (delete 'configure)
  942. ;; Apparently we can't do make on both tiles and a console version at
  943. ;; the same time anymore, so we have to either "make clean" between
  944. ;; builds or do some other hackery. See:
  945. ;; https://github.com/CleverRaven/Cataclysm-DDA/issues/42598#issuecomment-667702746
  946. (add-after 'install 'make-clean-pre-tiles
  947. (lambda* (#:key make-flags outputs #:allow-other-keys)
  948. ;; Change prefix directory and enable tile graphics and sound.
  949. (invoke "make" "clean")))
  950. (add-after 'make-clean-pre-tiles 'build-tiles
  951. (lambda* (#:key make-flags outputs #:allow-other-keys)
  952. ;; Change prefix directory and enable tile graphics and sound.
  953. (apply invoke "make" "TILES=1" "SOUND=1"
  954. (string-append "PREFIX=" #$output:tiles)
  955. (cdr make-flags))))
  956. (add-after 'build-tiles 'install-tiles
  957. (lambda* (#:key make-flags outputs #:allow-other-keys)
  958. (apply invoke "make" "install" "TILES=1" "SOUND=1"
  959. (string-append "PREFIX=" #$output:tiles)
  960. (cdr make-flags)))))
  961. ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
  962. ;; input in order to support tests.
  963. #:tests? #f))
  964. (outputs '("out"
  965. "tiles")) ;for tile graphics and sound support
  966. (native-inputs
  967. (list astyle gettext-minimal pkg-config))
  968. (inputs
  969. (list freetype
  970. libogg
  971. libvorbis
  972. ncurses
  973. sdl2
  974. sdl2-image
  975. sdl2-ttf
  976. sdl2-mixer))
  977. (home-page "https://cataclysmdda.org/")
  978. (synopsis "Survival horror roguelike video game")
  979. (description
  980. "Cataclysm: Dark Days Ahead (or \"DDA\" for short) is a roguelike set
  981. in a post-apocalyptic world. Struggle to survive in a harsh, persistent,
  982. procedurally generated world. Scavenge the remnants of a dead civilization
  983. for food, equipment, or, if you are lucky, a vehicle with a full tank of gas
  984. to get you out of Dodge. Fight to defeat or escape from a wide variety of
  985. powerful monstrosities, from zombies to giant insects to killer robots and
  986. things far stranger and deadlier, and against the others like yourself, that
  987. want what you have.")
  988. (license license:cc-by-sa3.0)))
  989. (define-public cockatrice
  990. (let ((release-date "2021-01-26"))
  991. (package
  992. (name "cockatrice")
  993. (version "2.8.0")
  994. (source
  995. (origin
  996. (method git-fetch)
  997. (uri (git-reference
  998. (url "https://github.com/Cockatrice/Cockatrice")
  999. (commit (string-append release-date "-Release-" version))))
  1000. (file-name (git-file-name name version))
  1001. (sha256
  1002. (base32
  1003. "0q8ffcklb2b7hcqhy3d2f9kz9aw22pp04pc9y4sslyqmf17pwnz9"))
  1004. (modules '((guix build utils)))
  1005. (snippet
  1006. ;; Strip image URLs as they point towards non-free web services
  1007. '(substitute* "cockatrice/src/settings/downloadsettings.cpp"
  1008. (("downloadURLs.append\\(\".*\"\\);") "")))))
  1009. (build-system qt-build-system)
  1010. (arguments
  1011. `(#:configure-flags '("-DWITH_SERVER=1"
  1012. "-DWITH_CLIENT=1"
  1013. "-DWITH_ORACLE=1"
  1014. "-DTEST=1")))
  1015. (native-inputs
  1016. (list googletest pkg-config))
  1017. (inputs
  1018. (list protobuf
  1019. qtbase-5
  1020. qtmultimedia-5
  1021. qtsvg-5
  1022. qttools-5
  1023. qtwebsockets-5
  1024. xz
  1025. zlib))
  1026. (home-page "https://cockatrice.github.io")
  1027. (synopsis "Tabletop card game simulator")
  1028. (description "Cockatrice is a program for playing tabletop card games
  1029. over a network. Its server design prevents users from manipulating the game
  1030. for unfair advantage. The client also provides a single-player mode, which
  1031. allows users to brew while offline.")
  1032. (license license:gpl2))))
  1033. (define-public corsix-th
  1034. (package
  1035. (name "corsix-th")
  1036. (version "0.66")
  1037. (source
  1038. (origin
  1039. (method git-fetch)
  1040. (uri (git-reference
  1041. (url "https://github.com/CorsixTH/CorsixTH")
  1042. (commit (string-append "v" version))))
  1043. (file-name (git-file-name name version))
  1044. (sha256
  1045. (base32 "0sgsvhqgiq6v1v5am7ghja8blhlrj0y1arvq6xq1j5fwa7c59ihs"))))
  1046. (build-system cmake-build-system)
  1047. (arguments
  1048. `(#:phases
  1049. (modify-phases %standard-phases
  1050. (add-after 'install 'wrap-binary
  1051. (lambda _
  1052. ;; Set Lua module paths and default MIDI soundfont on startup.
  1053. (let* ((out (assoc-ref %outputs "out"))
  1054. (fluid (assoc-ref %build-inputs "fluid-3"))
  1055. (lua-version ,(version-major+minor (package-version lua)))
  1056. (lua-cpath
  1057. (map (lambda (lib)
  1058. (string-append
  1059. (assoc-ref %build-inputs (string-append "lua-" lib))
  1060. "/lib/lua/" lua-version "/?.so"))
  1061. '("filesystem" "lpeg"))))
  1062. (wrap-program (string-append out "/bin/corsix-th")
  1063. `("LUA_CPATH" ";" = ,lua-cpath)
  1064. `("SDL_SOUNDFONTS" ":" suffix
  1065. (,(string-append fluid "/share/soundfonts/FluidR3Mono_GM.sf3")))))
  1066. #t)))
  1067. #:tests? #f)) ; TODO need busted package to run tests
  1068. ;; Omit Lua-Socket dependency to disable automatic updates.
  1069. (inputs
  1070. (list ffmpeg
  1071. fluid-3
  1072. freetype
  1073. lua
  1074. lua-filesystem
  1075. lua-lpeg
  1076. sdl2
  1077. sdl2-mixer))
  1078. (home-page "https://corsixth.com")
  1079. (synopsis "Implementation of the @i{Theme Hospital} game engine")
  1080. (description
  1081. "This package provides a reimplementation of the 1997 Bullfrog business
  1082. simulation game @i{Theme Hospital}. As well as faithfully recreating the
  1083. original engine, CorsixTH adds support for high resolutions, custom levels and
  1084. more. This package does @emph{not} provide the game assets.")
  1085. (license (list
  1086. license:expat ; main license
  1087. license:bsd-3)))) ; CorsixTH/Src/random.c
  1088. (define-public cowsay
  1089. ;; This is a continuation of Tony Monroe's now-unmaintained original, that
  1090. ;; aims to become the ‘canonical modern fork’. We'll see. What it gives
  1091. ;; us today is a bunch of fixes that other distros shipped as patches.
  1092. (package
  1093. (name "cowsay")
  1094. (version "3.7.0")
  1095. (source
  1096. (origin
  1097. (method git-fetch)
  1098. (uri (git-reference
  1099. (url "https://github.com/cowsay-org/cowsay")
  1100. (commit (string-append "v" version))))
  1101. (file-name (git-file-name name version))
  1102. (sha256
  1103. (base32 "0yrgwwacrhsgpyp14c3imkd4bb9b4i68q4df9cq1i1fh4fc2nn5p"))))
  1104. (build-system gnu-build-system)
  1105. (arguments
  1106. (list #:make-flags
  1107. #~(list (string-append "prefix=" #$output))
  1108. #:phases
  1109. #~(modify-phases %standard-phases
  1110. (delete 'configure) ; no configure script
  1111. (delete 'check)
  1112. (add-after 'install 'check
  1113. (lambda* (#:key outputs #:allow-other-keys)
  1114. (invoke (string-append (assoc-ref outputs "out")
  1115. "/bin/cowsay")
  1116. "We're done!"))))))
  1117. (inputs
  1118. (list perl))
  1119. (home-page (string-append "https://web.archive.org/web/20071026043648/"
  1120. "http://www.nog.net:80/~tony/warez/cowsay.shtml"))
  1121. (synopsis "Speaking cow text filter")
  1122. (description "Cowsay is basically a text filter. Send some text into it,
  1123. and you get a cow saying your text. If you think a talking cow isn't enough,
  1124. cows can think too: all you have to do is run @command{cowthink}. If you're
  1125. tired of cows, a variety of other ASCII-art messengers are available.")
  1126. (license license:gpl3+)))
  1127. (define-public deal
  1128. (package
  1129. (name "deal")
  1130. (version "3.1.11")
  1131. (source (origin
  1132. (method git-fetch)
  1133. (uri (git-reference
  1134. (url "https://github.com/gtwilliams/deal")
  1135. (commit (string-append "v" version))))
  1136. (file-name (git-file-name name version))
  1137. (sha256
  1138. (base32
  1139. "1wcrx3yq5ycnkdnygcq80ljpgc9iwyrr8zayprzvbibvj77hdm0c"))))
  1140. (build-system gnu-build-system)
  1141. (arguments
  1142. (list
  1143. #:test-target "test"
  1144. #:make-flags
  1145. #~(let* ((tcl #$(this-package-input "tcl"))
  1146. (tcl-version #$(version-major+minor (package-version tcl))))
  1147. (list "CPPFLAGS += -O3"
  1148. (string-append "CC=" #$(cc-for-target))
  1149. (string-append "TCL_INCL=" tcl "/include")
  1150. (string-append "LDFLAGS=-L" tcl "/lib"
  1151. " -ltcl" tcl-version
  1152. " -lm")
  1153. (string-append "DATA_DIR=" #$output "/share/deal/")))
  1154. #:phases
  1155. #~(modify-phases %standard-phases
  1156. (add-after 'unpack 'locate-pod2man
  1157. (lambda* (#:key inputs #:allow-other-keys)
  1158. (substitute* "Makefile"
  1159. (("/usr/bin/pod2man")
  1160. (search-input-file inputs "/bin/pod2man")))))
  1161. (delete 'configure) ;no configure script
  1162. ;; Prevent the error: "Makefile:248: Make.dep: No such file
  1163. ;; or directory".
  1164. (add-before 'build 'create-Make.dep
  1165. (lambda _
  1166. (call-with-output-file "Make.dep" (const #t))))
  1167. ;; There is no install target. Do everything manually.
  1168. (replace 'install
  1169. (lambda _
  1170. (let ((bin (string-append #$output "/bin"))
  1171. (man (string-append #$output "/share/man/man6"))
  1172. (data (string-append #$output "/share/deal")))
  1173. (install-file "deal" bin)
  1174. (install-file "deal.6" man)
  1175. (install-file "deal.tcl" data)
  1176. (for-each (lambda (d)
  1177. (let ((target (string-append data "/" d)))
  1178. (mkdir-p target)
  1179. (copy-recursively d target)))
  1180. '("ex" "format" "input" "lib")))))
  1181. ;; Tests need to happen once the data is properly installed
  1182. ;; because the "deal.tcl" script file location is hard-coded
  1183. ;; in the "deal" binary.
  1184. (delete 'check)
  1185. (add-after 'install 'check
  1186. (assoc-ref %standard-phases 'check)))))
  1187. (native-inputs
  1188. (list perl))
  1189. (inputs
  1190. (list tcl))
  1191. (home-page "https://bridge.thomasoandrews.com/deal/")
  1192. (synopsis "Bridge hand generator")
  1193. (description
  1194. "This program generates bridge hands. It can be told to generate only
  1195. hands satisfying conditions like being balanced, having a range of
  1196. High Cards Points (HCP), controls, or other user-definable properties.
  1197. Hands can be output in various formats, like PBN for feeding to other
  1198. bridge programs, Deal itself, or split up into a file per player for
  1199. practise.")
  1200. (license (list license:gpl2+
  1201. license:gpl1+ ;ansidecl.h
  1202. license:bsd-3)))) ;random.c
  1203. (define-public falltergeist
  1204. (package
  1205. (name "falltergeist")
  1206. (version "0.3.1")
  1207. (source (origin
  1208. (method git-fetch)
  1209. (uri (git-reference
  1210. (url "https://github.com/falltergeist/falltergeist")
  1211. (commit version)))
  1212. (file-name (git-file-name name version))
  1213. (sha256
  1214. (base32
  1215. "05cg58i2g32wbmrvmdsicic8xs83gld3qr1p7r4lnlckcl1l7dy4"))))
  1216. (build-system cmake-build-system)
  1217. (arguments
  1218. `(#:tests? #f)) ; no tests provided
  1219. (native-inputs (list pkg-config))
  1220. (inputs `(("sdl" ,(sdl-union (list sdl2
  1221. sdl2-image
  1222. sdl2-mixer)))
  1223. ("glew" ,glew)
  1224. ("glm" ,glm)))
  1225. (home-page "https://falltergeist.org/")
  1226. (synopsis "Fallout 2 game engine")
  1227. (description "This package provides the Fallout 2 game engine. Game data
  1228. should be placed in @file{~/.local/share/falltergeist}.")
  1229. (license license:gpl3+)))
  1230. (define-public foobillard++
  1231. ;; Even though this latest revision is old already, stable release is
  1232. ;; lagging way behind it, and has issues with textures rendering.
  1233. (let ((svn-revision 170))
  1234. (package
  1235. (name "foobillard++")
  1236. (version (string-append "3.43-r" (number->string svn-revision)))
  1237. (source
  1238. (origin
  1239. (method svn-fetch)
  1240. (uri (svn-reference
  1241. (url "svn://svn.code.sf.net/p/foobillardplus/code/")
  1242. (revision svn-revision)))
  1243. (file-name (git-file-name name version))
  1244. (sha256
  1245. (base32 "00b693ys5zvzjbjzzj3dqfzm5xw64gwjf9m8qv6bkmf0klbhmayk"))
  1246. (patches
  1247. (search-patches "foobillard++-pkg-config.patch"))
  1248. (modules '((guix build utils)))
  1249. (snippet
  1250. '(begin
  1251. ;; Unfortunately, the game includes background music with
  1252. ;; a non-commercial clause. Delete it.
  1253. (for-each delete-file (find-files "data/music" "\\.ogg$"))
  1254. #t))))
  1255. (build-system gnu-build-system)
  1256. (arguments
  1257. `(#:configure-flags
  1258. (list
  1259. ;; Install data in a less exotic location.
  1260. (string-append "--prefix=" (assoc-ref %outputs "out") "/share")
  1261. ;; Prevent a build error about undefined trigonometric functions.
  1262. "--enable-fastmath=no")
  1263. #:phases
  1264. (modify-phases %standard-phases
  1265. (add-after 'unpack 'fix-makefile
  1266. ;; Remove hard-coded directories. Also fix installation
  1267. ;; rule: it tries to move around non-existent files or
  1268. ;; files already moved.
  1269. (lambda* (#:key outputs #:allow-other-keys)
  1270. (substitute* "Makefile.am"
  1271. (("/usr") (assoc-ref outputs "out"))
  1272. (("cp .*?/foobillardplus\\.desktop.*") "")
  1273. (("cp .*?/foobillardplus\\.(png|xbm) \\$\\(datarootdir\\).*")
  1274. ""))
  1275. #t))
  1276. (add-after 'unpack 'unbundle-font
  1277. ;; XXX: The package ships with LinBiolinum_aSB.ttf and
  1278. ;; LinBiolinum_aS.ttf, which are not provided by
  1279. ;; `font-linuxlibertine' package. Therefore, we cannot replace
  1280. ;; them yet.
  1281. (lambda* (#:key inputs #:allow-other-keys)
  1282. (let ((dejavu (string-append (assoc-ref inputs "font-dejavu")
  1283. "/share/fonts/truetype/")))
  1284. (with-directory-excursion "data"
  1285. (for-each (lambda (f)
  1286. (delete-file f)
  1287. (symlink (string-append dejavu f) f))
  1288. '("DejaVuSans-Bold.ttf" "DejaVuSans.ttf"))))
  1289. #t))
  1290. (replace 'bootstrap
  1291. (lambda _
  1292. (invoke "aclocal" "--force")
  1293. (invoke "autoconf" "-f")
  1294. (invoke "autoheader" "-f")
  1295. (invoke "automake" "-a" "-c" "-f")))
  1296. (add-before 'build 'prepare-build
  1297. ;; Set correct environment for SDL.
  1298. (lambda* (#:key inputs #:allow-other-keys)
  1299. (setenv "CPATH"
  1300. (string-append
  1301. (search-input-directory inputs "include/SDL")
  1302. ":" (or (getenv "CPATH") "")))))
  1303. (add-before 'build 'fix-settings-directory
  1304. ;; Hide foobillardplus settings directory in $HOME.
  1305. (lambda _
  1306. (substitute* "src/history.c"
  1307. (("/foobillardplus-data") "/.foobillardplus"))
  1308. #t))
  1309. (add-before 'install 'create-directories
  1310. ;; Install process does not create directories before
  1311. ;; trying to move file in it.
  1312. (lambda* (#:key outputs #:allow-other-keys)
  1313. (let ((out (assoc-ref outputs "out")))
  1314. (mkdir-p (string-append out "/share/icons"))
  1315. (mkdir-p (string-append out "/share/applications")))
  1316. #t))
  1317. (add-after 'install 'symlink-executable
  1318. ;; Symlink executable to $out/bin.
  1319. (lambda* (#:key outputs #:allow-other-keys)
  1320. (let* ((out (assoc-ref outputs "out"))
  1321. (bin (string-append out "/bin")))
  1322. (mkdir-p bin)
  1323. (with-directory-excursion bin
  1324. (symlink "../share/foobillardplus/bin/foobillardplus"
  1325. "foobillardplus"))
  1326. #t))))))
  1327. (native-inputs
  1328. (list autoconf automake pkg-config))
  1329. (inputs
  1330. `(("font-dejavu" ,font-dejavu)
  1331. ("freetype" ,freetype)
  1332. ("glu" ,glu)
  1333. ("libpng" ,libpng)
  1334. ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net)))))
  1335. (home-page "https://foobillardplus.sourceforge.net/")
  1336. (synopsis "3D billiard game")
  1337. (description "FooBillard++ is an advanced 3D OpenGL billiard game
  1338. based on the original foobillard 3.0a sources from Florian Berger.
  1339. You can play it with one or two players or against the computer.
  1340. The game features:
  1341. @itemize
  1342. @item Wood paneled table with gold covers and gold diamonds.
  1343. @item Reflections on balls.
  1344. @item Zoom in and out, rotation, different angles and bird's eye view.
  1345. @item Different game modes: 8 or 9-ball, Snooker or Carambole.
  1346. @item Tournaments. Compete against other players.
  1347. @item Animated cue with strength and eccentric hit adjustment.
  1348. @item Jump shots and snipping.
  1349. @item Realistic gameplay and billiard sounds.
  1350. @item Red-Green stereo.
  1351. @item And much more.
  1352. @end itemize")
  1353. (license (list license:gpl2 license:silofl1.1)))))
  1354. (define-public freedoom
  1355. (package
  1356. (name "freedoom")
  1357. (version "0.12.1")
  1358. (source
  1359. (origin
  1360. (method git-fetch)
  1361. (uri (git-reference
  1362. (url "https://github.com/freedoom/freedoom")
  1363. (commit (string-append "v" version))))
  1364. (file-name (git-file-name name version))
  1365. (sha256
  1366. (base32 "1mq60lfwaaxmch7hsz8403pwafnlsmsd5z2df2j77ppwndwcrypb"))))
  1367. (build-system gnu-build-system)
  1368. (arguments
  1369. '(#:make-flags
  1370. (list (string-append "prefix=" (assoc-ref %outputs "out")))
  1371. #:tests? #f ; no check target
  1372. #:phases
  1373. (modify-phases %standard-phases
  1374. (delete 'bootstrap)
  1375. (replace 'configure
  1376. (lambda* (#:key inputs outputs #:allow-other-keys)
  1377. (let* ((freedoom (assoc-ref outputs "out"))
  1378. (wad-dir (string-append freedoom "/share/games/doom")))
  1379. ;; Make sure that the install scripts know where to find
  1380. ;; the appropriate WAD files.
  1381. (substitute* "dist/freedoom"
  1382. (("IWAD=freedm.wad")
  1383. (string-append "IWAD=" wad-dir "/freedm.wad"))
  1384. (("IWAD=freedoom1.wad")
  1385. (string-append "IWAD=" wad-dir "/freedoom1.wad"))
  1386. (("IWAD=freedoom2.wad")
  1387. (string-append "IWAD=" wad-dir "/freedoom2.wad")))
  1388. #t))))))
  1389. (native-inputs
  1390. (list asciidoc deutex python python-pillow))
  1391. (home-page "https://freedoom.github.io/")
  1392. (synopsis "Free content game based on the Doom engine")
  1393. (native-search-paths
  1394. (list (search-path-specification
  1395. (variable "DOOMWADDIR")
  1396. (files '("share/games/doom")))
  1397. (search-path-specification
  1398. (variable "DOOMWADPATH")
  1399. (files '("share/games/doom")))))
  1400. (description
  1401. "The Freedoom project aims to create a complete free content first person
  1402. shooter game. Freedoom by itself is just the raw material for a game: it must
  1403. be paired with a compatible game engine (such as @code{prboom-plus}) to be
  1404. played. Freedoom complements the Doom engine with free levels, artwork, sound
  1405. effects and music to make a completely free game.")
  1406. (license license:bsd-3)))
  1407. (define-public freedroidrpg
  1408. (package
  1409. (name "freedroidrpg")
  1410. (version "1.0rc2")
  1411. (source
  1412. (origin
  1413. (method url-fetch)
  1414. (uri (let ((major+minor
  1415. (version-major+minor
  1416. (string-replace-substring version "rc" "."))))
  1417. (string-append "http://ftp.osuosl.org/pub/freedroid/"
  1418. "freedroidRPG-" major+minor "/"
  1419. "freedroidRPG-" version ".tar.gz")))
  1420. (sha256
  1421. (base32 "10jknaad2ph9j5bs4jxvpnl8rq5yjlq0nasv98f4mki2hh8yiczy"))))
  1422. (build-system gnu-build-system)
  1423. (arguments
  1424. (list
  1425. #:configure-flags
  1426. #~(list
  1427. (string-append "CFLAGS=-fcommon "
  1428. "-I" #$(this-package-input "sdl-gfx") "/include/SDL "
  1429. "-I" #$(this-package-input "sdl-image") "/include/SDL "
  1430. "-I" #$(this-package-input "sdl-mixer") "/include/SDL")
  1431. "--enable-opengl")
  1432. ;; FIXME: the test suite fails with the following error output:
  1433. ;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
  1434. ;; SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
  1435. #:tests? #f))
  1436. (native-inputs
  1437. (list pkg-config))
  1438. (inputs
  1439. (list glew
  1440. glu
  1441. libjpeg-turbo
  1442. libogg
  1443. libpng
  1444. libvorbis
  1445. mesa
  1446. python-wrapper
  1447. sdl
  1448. sdl-gfx
  1449. sdl-image
  1450. sdl-mixer
  1451. zlib))
  1452. (home-page "https://www.freedroid.org/")
  1453. (synopsis "Isometric role-playing game against killer robots")
  1454. (description
  1455. "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
  1456. The game tells the story of a world destroyed by a conflict between robots and
  1457. their human masters. To restore peace to humankind, the player must complete
  1458. numerous quests while fighting off rebelling robots---either by taking control
  1459. of them, or by simply blasting them to pieces with melee and ranged weapons in
  1460. real-time combat.")
  1461. (license (list license:expat ; lua/
  1462. license:gpl3 ; src/gen_savestruct.py
  1463. license:gpl2+)))) ; the rest
  1464. (define-public golly
  1465. (package
  1466. (name "golly")
  1467. (version "4.2")
  1468. (source (origin
  1469. (method url-fetch)
  1470. (uri (string-append "mirror://sourceforge/golly/golly/golly-"
  1471. version "/golly-" version
  1472. "-src.tar.gz"))
  1473. (sha256
  1474. (base32
  1475. "0pg9cp83nxc354lizgza5bqdy7z5wh36863203zw6r6s4flji4an"))))
  1476. (build-system gnu-build-system)
  1477. (arguments
  1478. '(#:make-flags (list "CC=gcc"
  1479. (string-append "GOLLYDIR="
  1480. (assoc-ref %outputs "out")
  1481. "/share/golly"))
  1482. #:tests? #f ; no check target
  1483. #:phases
  1484. (modify-phases %standard-phases
  1485. (delete 'configure)
  1486. (replace 'build
  1487. (lambda* (#:key make-flags outputs #:allow-other-keys)
  1488. (with-directory-excursion "gui-wx"
  1489. (apply invoke `("make" ,@make-flags "-f" "makefile-gtk")))))
  1490. (replace 'install
  1491. (lambda* (#:key outputs #:allow-other-keys)
  1492. (let* ((out (assoc-ref outputs "out"))
  1493. (bin (string-append out "/bin"))
  1494. (doc (string-append out "/share/doc/golly"))
  1495. (pixmaps (string-append out "/share/pixmaps"))
  1496. (share (string-append out "/share/golly")))
  1497. (for-each (lambda (binary)
  1498. (install-file binary bin))
  1499. '("bgolly" "golly"))
  1500. (for-each (lambda (document)
  1501. (install-file
  1502. (string-append "docs/" document ".html")
  1503. doc))
  1504. '("License" "ReadMe" "ToDo"))
  1505. (install-file "gui-wx/icons/appicon.xpm" pixmaps)
  1506. (for-each (lambda (folder)
  1507. (copy-recursively
  1508. folder
  1509. (string-append share "/" folder)))
  1510. '("Help" "Patterns" "Rules" "Scripts")))
  1511. #t)))))
  1512. (native-inputs
  1513. (list lua))
  1514. (inputs
  1515. (list glu mesa python sdl2 wxwidgets zlib))
  1516. (home-page "https://golly.sourceforge.net/")
  1517. (synopsis "Software for exploring cellular automata")
  1518. (description
  1519. "Golly simulates Conway's Game of Life and many other types of cellular
  1520. automata. The following features are available:
  1521. @enumerate
  1522. @item Support for bounded and unbounded universes, with cells of up to 256
  1523. states.
  1524. @item Support for multiple algorithms, including Bill Gosper's Hashlife
  1525. algorithm.
  1526. @item Loading patterns from BMP, PNG, GIF and TIFF image files.
  1527. @item Reading RLE, macrocell, Life 1.05/1.06, dblife and MCell files.
  1528. @item Scriptable via Lua or Python.
  1529. @item Extracting patterns, rules and scripts from zip files.
  1530. @item Downloading patterns, rules and scripts from online archives.
  1531. @item Pasting patterns from the clipboard.
  1532. @item Unlimited undo/redo.
  1533. @item Configurable keyboard shortcuts.
  1534. @item Auto fit option to keep patterns within the view.
  1535. @end enumerate")
  1536. (license license:gpl2+)))
  1537. (define-public joycond
  1538. (let ((commit "f9a66914622514c13997c2bf7ec20fa98e9dfc1d")
  1539. (revision "1"))
  1540. (package
  1541. (name "joycond")
  1542. (version (git-version "0.1.0" revision commit))
  1543. (source
  1544. (origin
  1545. (method git-fetch)
  1546. (uri (git-reference
  1547. (url "https://github.com/DanielOgorchock/joycond")
  1548. (commit commit)))
  1549. (file-name (git-file-name name version))
  1550. (sha256
  1551. (base32 "07z86yp27vxc0b44jgvf1vpa69rh3wdvd1xbzcsrj3f32743pv5a"))))
  1552. (build-system cmake-build-system)
  1553. (arguments
  1554. `(#:tests? #f ;no test suite
  1555. #:phases
  1556. (modify-phases %standard-phases
  1557. (add-after 'unpack 'fix-bin-location
  1558. (lambda* (#:key outputs #:allow-other-keys)
  1559. (let ((out (assoc-ref outputs "out")))
  1560. (substitute* "CMakeLists.txt"
  1561. (("/lib/udev/rules.d")
  1562. (string-append out "/lib/udev/rules.d"))
  1563. (("/etc/systemd/system")
  1564. (string-append out "/etc/systemd/system"))
  1565. (("/etc/modules-load.d")
  1566. (string-append out "/etc/modules-load.d"))
  1567. (("/usr/bin")
  1568. (string-append out "/bin")))))))))
  1569. (native-inputs (list pkg-config))
  1570. (inputs
  1571. (list eudev libevdev))
  1572. (home-page "https://github.com/DanielOgorchock/joycond")
  1573. (synopsis "Joy-Con controller daemon")
  1574. (description "This package provides a userspace daemon for the Nintendo
  1575. Joy-Con controllers.")
  1576. (license license:gpl3))))
  1577. (define-public julius
  1578. (package
  1579. (name "julius")
  1580. (version "1.7.0")
  1581. (source
  1582. (origin
  1583. (method git-fetch)
  1584. (uri (git-reference
  1585. (url "https://github.com/bvschaik/julius")
  1586. (commit (string-append "v" version))))
  1587. (file-name (git-file-name name version))
  1588. (sha256
  1589. (base32 "0w7kmgz9ya0ck9cxhsyralarg7y6ydx4plmh33r4mkxkamlr7493"))
  1590. ;; Remove unused bundled libraries.
  1591. (modules '((guix build utils)))
  1592. (snippet
  1593. '(begin
  1594. (with-directory-excursion "ext"
  1595. (for-each delete-file-recursively '("dirent" "png" "SDL2" "zlib")))
  1596. #t))))
  1597. (build-system cmake-build-system)
  1598. (inputs
  1599. (list libpng sdl2 sdl2-mixer))
  1600. (home-page "https://github.com/bvschaik/julius")
  1601. (synopsis "Re-implementation of Caesar III game engine")
  1602. (description
  1603. "Engine for Caesar III, a city-building real-time strategy game.
  1604. Julius includes some UI enhancements while preserving the logic (including
  1605. bugs) of the original game, so that saved games are compatible. This package
  1606. does not include game data.")
  1607. (license (list license:agpl3
  1608. license:zlib)))) ; ext/tinyfiledialogs
  1609. (define-public augustus
  1610. (package
  1611. (inherit julius)
  1612. (name "augustus")
  1613. (version "3.2.0")
  1614. (source
  1615. (origin
  1616. (method git-fetch)
  1617. (uri (git-reference
  1618. (url "https://github.com/Keriew/augustus")
  1619. (commit (string-append "v" version))))
  1620. (file-name (git-file-name name version))
  1621. (sha256
  1622. (base32 "0d1k5279imc17mk3lxn8amc4ljgcj4v6x6lj2w3bph1z0a7a4bim"))
  1623. ;; Remove unused bundled libraries.
  1624. (modules '((guix build utils)))
  1625. (snippet
  1626. '(begin
  1627. (with-directory-excursion "ext"
  1628. (for-each delete-file-recursively
  1629. '("dirent" "expat" "png" "SDL2" "zlib")))))))
  1630. (arguments
  1631. ;; No tests. See https://github.com/Keriew/augustus/issues/82.
  1632. `(#:tests? #f))
  1633. (inputs (modify-inputs (package-inputs julius)
  1634. (prepend expat)))
  1635. (home-page "https://github.com/Keriew/augustus")
  1636. (synopsis "Re-implementation of Caesar III game engine with gameplay changes")
  1637. (description
  1638. "Fork of Julius, an engine for the a city-building real-time strategy
  1639. game Caesar III. Gameplay enhancements include:
  1640. @itemize
  1641. @item roadblocks;
  1642. @item market special orders;
  1643. @item global labour pool;
  1644. @item partial warehouse storage;
  1645. @item increased game limits;
  1646. @item zoom controls.
  1647. @end itemize\n")))
  1648. (define-public meandmyshadow
  1649. (package
  1650. (name "meandmyshadow")
  1651. (version "0.5a")
  1652. (source (origin
  1653. (method url-fetch)
  1654. (uri (string-append "mirror://sourceforge/meandmyshadow/"
  1655. version "/meandmyshadow-" version
  1656. "-src.tar.gz"))
  1657. (sha256
  1658. (base32
  1659. "0i98v6cgmpsxy7mbb0s2y6f6qq6mkwzk2nrv1nz39ncf948aky2h"))))
  1660. (build-system cmake-build-system)
  1661. (arguments
  1662. `(#:tests? #f)) ; there are no tests
  1663. (native-inputs
  1664. (list pkg-config))
  1665. (inputs
  1666. `(("curl" ,curl)
  1667. ("libarchive" ,libarchive)
  1668. ("lua" ,lua)
  1669. ("sdl" ,(sdl-union (list sdl2
  1670. sdl2-image
  1671. sdl2-mixer
  1672. sdl2-ttf)))))
  1673. (home-page "https://acmepjz.github.io/meandmyshadow/")
  1674. (synopsis "Puzzle/platform game")
  1675. (description "Me and My Shadow is a puzzle/platform game in which you try
  1676. to reach the exit by solving puzzles. Spikes, moving blocks, fragile blocks
  1677. and much more stand between you and the exit. Record your moves and let your
  1678. shadow mimic them to reach blocks you couldn't reach alone.")
  1679. (license license:gpl3+)))
  1680. (define-public opensurge
  1681. (package
  1682. (name "opensurge")
  1683. (version "0.6.0.3")
  1684. (source
  1685. (origin
  1686. (method git-fetch)
  1687. (uri (git-reference
  1688. (url "https://github.com/alemart/opensurge")
  1689. (commit (string-append "v" version))))
  1690. (file-name (git-file-name name version))
  1691. (sha256
  1692. (base32 "0yia2qcva741a64qpls8a59lvnx5vynqkk2i3arkflw6f1m1vb55"))))
  1693. (build-system cmake-build-system)
  1694. (arguments
  1695. (list #:tests? #f ; there are no tests
  1696. #:configure-flags
  1697. #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
  1698. (string-append "-DGAME_BINDIR=" #$output "/bin") ; not games
  1699. (string-append "-DGAME_DATADIR=" #$output "/share/" #$name)
  1700. (string-append "-DDESKTOP_ENTRY_PATH=" #$output "/share/applications")
  1701. (string-append "-DDESKTOP_ICON_PATH=" #$output "/share/pixmaps")
  1702. (string-append "-DDESKTOP_METAINFO_PATH=" #$output "/share/metainfo"))
  1703. #:phases
  1704. #~(modify-phases %standard-phases
  1705. (add-after 'unpack 'fix-xdg-open-path
  1706. (lambda* (#:key inputs #:allow-other-keys)
  1707. ;; Look for xdg-open in the store.
  1708. (substitute* "src/core/web.c"
  1709. (("/usr/(bin/xdg-open)" _ bin)
  1710. (search-input-file inputs bin)))))
  1711. (add-after 'unpack 'unbundle-fonts
  1712. (lambda* (#:key inputs #:allow-other-keys)
  1713. ;; Replace bundled fonts with links to the store.
  1714. (with-directory-excursion "fonts"
  1715. (for-each (lambda (font)
  1716. (let ((file (string-append "share/fonts/truetype/"
  1717. font)))
  1718. (delete-file font)
  1719. (symlink (search-input-file inputs file) font)))
  1720. '("Roboto-Black.ttf"
  1721. "Roboto-Bold.ttf"
  1722. "Roboto-Medium.ttf"))))))))
  1723. (inputs
  1724. (list allegro font-google-roboto surgescript xdg-utils))
  1725. (home-page "https://opensurge2d.org")
  1726. (synopsis "2D retro side-scrolling game")
  1727. (description "@code{Open Surge} is a 2D retro side-scrolling platformer
  1728. inspired by the Sonic games. The player runs at high speeds through each
  1729. level while collecting items and avoiding obstacles. The game includes a
  1730. built-in level editor.")
  1731. (license
  1732. ;; Code is under GPL 3+, assets are under various licenses.
  1733. ;; See src/misc/credits.c for details.
  1734. (list license:gpl3+
  1735. license:cc0
  1736. license:cc-by3.0
  1737. license:cc-by-sa3.0
  1738. license:expat
  1739. license:public-domain
  1740. license:silofl1.1))))
  1741. (define-public knights
  1742. (package
  1743. (name "knights")
  1744. (version "025")
  1745. (source (origin
  1746. (method url-fetch)
  1747. (uri (string-append "http://www.knightsgame.org.uk/files/knights_"
  1748. version "_src.tar.gz"))
  1749. (sha256
  1750. (base32
  1751. "18vp2ygvn0s0jz8rm585jqf6hjqkam1ximq81k0r9hpmfj7wb88f"))))
  1752. (build-system gnu-build-system)
  1753. (arguments
  1754. '(#:make-flags
  1755. (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  1756. "CXXFLAGS=-lpthread")
  1757. #:phases
  1758. (modify-phases %standard-phases
  1759. ;; No configure script.
  1760. (delete 'configure))
  1761. #:tests? #f)) ;; No check target.
  1762. (inputs
  1763. `(("boost" ,boost)
  1764. ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer)))
  1765. ("freetype" ,freetype)
  1766. ("fontconfig" ,fontconfig)
  1767. ("curl" ,curl)))
  1768. (native-inputs
  1769. (list pkg-config))
  1770. (home-page "http://www.knightsgame.org.uk/")
  1771. (synopsis "Multiplayer dungeon game involving knights and quests")
  1772. (description "Knights is a multiplayer game involving several knights who
  1773. must run around a dungeon and complete various quests. Each game revolves
  1774. around a quest – for example, you might have to find some items and carry them
  1775. back to your starting point. This may sound easy, but as there are only
  1776. enough items in the dungeon for one player to win, you may end up having to
  1777. kill your opponents to get their stuff! Other quests involve escaping from
  1778. the dungeon, fighting a duel to the death against the enemy knights, or
  1779. destroying an ancient book using a special wand.")
  1780. ;; This package includes modified sources of lua (X11), enet (Expat), and
  1781. ;; guichan (BSD-3). The "Coercri" library is released under the Boost
  1782. ;; license. The whole package is released under GPLv3+.
  1783. (license license:gpl3+)))
  1784. (define-public gnome-2048
  1785. (package
  1786. (name "gnome-2048")
  1787. (version "3.38.2")
  1788. (source (origin
  1789. (method url-fetch)
  1790. (uri (string-append "mirror://gnome/sources/gnome-2048/"
  1791. (version-major+minor version) "/"
  1792. "gnome-2048-" version ".tar.xz"))
  1793. (sha256
  1794. (base32
  1795. "0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2"))
  1796. (patches
  1797. (search-patches "gnome-2048-fix-positional-argument.patch"))))
  1798. (build-system meson-build-system)
  1799. (arguments
  1800. `(#:glib-or-gtk? #t
  1801. #:phases
  1802. (modify-phases %standard-phases
  1803. (add-after 'unpack 'skip-gtk-update-icon-cache
  1804. ;; Don't create 'icon-theme.cache'.
  1805. (lambda _
  1806. (substitute* "meson_post_install.py"
  1807. (("gtk-update-icon-cache") "true")))))))
  1808. (inputs
  1809. (list gtk+
  1810. clutter
  1811. clutter-gtk
  1812. libgee
  1813. libgnome-games-support-1))
  1814. (native-inputs
  1815. (list gettext-minimal
  1816. `(,glib "bin") ; for desktop-file-validate and appstream-util
  1817. itstool
  1818. libxml2
  1819. pkg-config
  1820. vala))
  1821. (home-page "https://wiki.gnome.org/Apps/2048")
  1822. (synopsis "Move the tiles until you obtain the 2048 tile")
  1823. (description "GNOME 2048 provides a 2D grid for playing 2048, a
  1824. single-player sliding tile puzzle game. The objective of the game is to merge
  1825. together adjacent tiles of the same number until the sum of 2048 is achieved
  1826. in one tile.")
  1827. (license license:gpl3+)))
  1828. (define-public gnome-chess
  1829. (package
  1830. (name "gnome-chess")
  1831. (version "3.37.3")
  1832. (source (origin
  1833. (method url-fetch)
  1834. (uri (string-append "mirror://gnome/sources/gnome-chess/"
  1835. (version-major+minor version) "/"
  1836. "gnome-chess-" version ".tar.xz"))
  1837. (sha256
  1838. (base32
  1839. "09axf0q1mp13sv8cs0syfg8ahcd9r2qb26278r09j6s4njxmkfv4"))))
  1840. (build-system meson-build-system)
  1841. (arguments
  1842. '(#:glib-or-gtk? #t
  1843. #:phases
  1844. (modify-phases %standard-phases
  1845. (add-after 'unpack 'skip-gtk-update-icon-cache
  1846. ;; Don't create 'icon-theme.cache'.
  1847. (lambda _
  1848. (substitute* "meson_post_install.py"
  1849. (("gtk-update-icon-cache") "true"))
  1850. #t)))))
  1851. (inputs
  1852. (list gtk+ librsvg))
  1853. (native-inputs
  1854. `(("gettext" ,gettext-minimal)
  1855. ("glib:bin" ,glib "bin") ; for desktop-file-validate and appstream-util
  1856. ("itstool" ,itstool)
  1857. ("pkg-config" ,pkg-config)
  1858. ("vala" ,vala)))
  1859. (home-page "https://wiki.gnome.org/Apps/Chess")
  1860. (synopsis "Chess board for GNOME")
  1861. (description "GNOME Chess provides a 2D board for playing chess games
  1862. against human or computer players. It supports loading and saving games in
  1863. Portable Game Notation. To play against a computer, install a chess engine
  1864. such as chess or stockfish.")
  1865. (license license:gpl3+)))
  1866. (define-public gnubg
  1867. (package
  1868. (name "gnubg")
  1869. (version "1.06.002")
  1870. (source
  1871. (origin
  1872. (method url-fetch)
  1873. (uri (string-append "mirror://gnu/gnubg/gnubg-release-"
  1874. version "-sources.tar.gz"))
  1875. (sha256
  1876. (base32
  1877. "11xwhcli1h12k6rnhhyq4jphzrhfik7i8ah3k32pqw803460n6yf"))))
  1878. (build-system gnu-build-system)
  1879. (inputs (list ;; XXX: Build with an older Pango for 'pango_font_get_hb_font' and
  1880. ;; 'pango_coverage_get_type'. Try removing this for versions > 1.06.002.
  1881. pango-1.42
  1882. glib
  1883. readline
  1884. gtk+-2
  1885. mesa
  1886. glu
  1887. gtkglext
  1888. sqlite
  1889. libcanberra))
  1890. (native-inputs `(("python-2" ,python-2)
  1891. ("pkg-config" ,pkg-config)))
  1892. (arguments
  1893. `(#:configure-flags
  1894. ;; SSE instructions are available on Intel systems only.
  1895. (list ,@(if (any (cute string-prefix? <> (or (%current-target-system)
  1896. (%current-system)))
  1897. '("x86_64" "i686"))
  1898. '("--enable-simd=sse2") ; prevent avx instructions
  1899. '()))
  1900. #:phases
  1901. (modify-phases %standard-phases
  1902. (add-after 'install 'install-desktop-file
  1903. (lambda* (#:key outputs #:allow-other-keys)
  1904. (let* ((out (assoc-ref outputs "out"))
  1905. (apps (string-append out "/share/applications")))
  1906. (mkdir-p apps)
  1907. (with-output-to-file (string-append apps "/gnubg.desktop")
  1908. (lambda _
  1909. (format #t
  1910. "[Desktop Entry]~@
  1911. Name=GNU Backgammon~@
  1912. Exec=~a/bin/gnubg -w~@
  1913. Icon=gnubg~@
  1914. Categories=Game;~@
  1915. Terminal=false~@
  1916. Type=Application~%"
  1917. out))))
  1918. #t)))))
  1919. (home-page "https://www.gnu.org/software/gnubg/")
  1920. (synopsis "Backgammon game")
  1921. (description "The GNU backgammon application (also known as \"gnubg\") can
  1922. be used for playing, analyzing and teaching the game. It has an advanced
  1923. evaluation engine based on artificial neural networks suitable for both
  1924. beginners and advanced players. In addition to a command-line interface, it
  1925. also features an attractive, 3D representation of the playing board.")
  1926. (license license:gpl3+)))
  1927. (define-public gnubik
  1928. (package
  1929. (name "gnubik")
  1930. (version "2.4.3")
  1931. (source
  1932. (origin
  1933. (method url-fetch)
  1934. (uri (string-append "mirror://gnu/gnubik/gnubik-"
  1935. version ".tar.gz"))
  1936. (sha256
  1937. (base32
  1938. "1vlf924mq8hg93bsjj0rzvs0crc6psmlxyc6zn0fr7msnmpx6gib"))))
  1939. (build-system gnu-build-system)
  1940. (arguments
  1941. '(#:phases (modify-phases %standard-phases
  1942. (add-after 'unpack 'skip-gtk-update-icon-cache
  1943. (lambda _
  1944. ;; Do not attempt to run 'gtk-update-icon-cache', which is
  1945. ;; unnecessary and causes a needless dependency on glib.
  1946. (substitute* "Makefile.in"
  1947. (("gtk-update-icon-cache")
  1948. "true"))
  1949. #t)))))
  1950. (inputs (list gtk+-2
  1951. mesa
  1952. glu
  1953. libx11
  1954. guile-2.0
  1955. gtkglext))
  1956. (native-inputs `(("gettext" ,gettext-minimal)
  1957. ("pkg-config" ,pkg-config)))
  1958. (home-page "https://www.gnu.org/software/gnubik/")
  1959. (synopsis "3d Rubik's cube game")
  1960. (description
  1961. "GNUbik is a puzzle game in which you must manipulate a cube to make
  1962. each of its faces have a uniform color. The game is customizable, allowing
  1963. you to set the size of the cube (the default is 3x3) or to change the colors.
  1964. You may even apply photos to the faces instead of colors. The game is
  1965. scriptable with Guile.")
  1966. (license license:gpl3+)))
  1967. (define-public gnushogi
  1968. (package
  1969. (name "gnushogi")
  1970. (version "1.4.2")
  1971. (source
  1972. (origin
  1973. (method url-fetch)
  1974. (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
  1975. version ".tar.gz"))
  1976. (sha256
  1977. (base32
  1978. "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
  1979. (arguments `(#:tests? #f)) ;; No check target.
  1980. (build-system gnu-build-system)
  1981. (home-page "https://www.gnu.org/software/gnushogi/")
  1982. (synopsis "The game of Shogi (Japanese chess)")
  1983. (description "GNU Shogi is a program that plays the game Shogi (Japanese
  1984. Chess). It is similar to standard chess but this variant is far more complicated.")
  1985. (license license:gpl3+)))
  1986. (define-public ltris
  1987. (package
  1988. (name "ltris")
  1989. (version "1.2.4")
  1990. (source
  1991. (origin
  1992. (method url-fetch)
  1993. (uri (string-append "mirror://sourceforge/lgames/ltris/"
  1994. "ltris-" version ".tar.gz"))
  1995. (sha256
  1996. (base32 "10wg6v12w3jms8ka2x9a87p06l9gzpr94ai9v428c9r320q7psyn"))))
  1997. (build-system gnu-build-system)
  1998. (arguments
  1999. '(#:phases
  2000. (modify-phases %standard-phases
  2001. (add-after 'set-paths 'set-sdl-paths
  2002. (lambda* (#:key inputs #:allow-other-keys)
  2003. (setenv "CPATH"
  2004. (string-append
  2005. (search-input-directory inputs "include/SDL")
  2006. ":" (or (getenv "CPATH") ""))))))))
  2007. (inputs
  2008. (list (sdl-union (list sdl sdl-mixer))))
  2009. (home-page "https://lgames.sourceforge.net/LTris/")
  2010. (synopsis "Tetris clone based on the SDL library")
  2011. (description
  2012. "LTris is a tetris clone: differently shaped blocks are falling down the
  2013. rectangular playing field and can be moved sideways or rotated by 90 degree
  2014. units with the aim of building lines without gaps which then disappear (causing
  2015. any block above the deleted line to fall down). LTris has three game modes: In
  2016. Classic you play until the stack of blocks reaches the top of the playing field
  2017. and no new blocks can enter. In Figures the playing field is reset to a new
  2018. figure each level and later on tiles and lines suddenly appear. In Multiplayer
  2019. up to three players (either human or CPU) compete with each other sending
  2020. removed lines to all opponents. There is also a Demo mode in which you can
  2021. watch your CPU playing while enjoying a cup of tea!")
  2022. (license license:gpl2+)))
  2023. (define-public nethack
  2024. (package
  2025. (name "nethack")
  2026. (version "3.6.7")
  2027. (source
  2028. (origin
  2029. (method url-fetch)
  2030. (uri
  2031. (string-append "https://www.nethack.org/download/" version "/nethack-"
  2032. (string-join (string-split version #\.) "") "-src.tgz"))
  2033. (sha256
  2034. (base32 "1cmc596x8maixi2bkx9kblp3daxw156ahnklc656dygbdpgngkwq"))))
  2035. (native-inputs
  2036. (list bison flex))
  2037. (inputs
  2038. (list ncurses less))
  2039. (build-system gnu-build-system)
  2040. (arguments
  2041. '(#:make-flags
  2042. `(,(string-append "PREFIX=" (assoc-ref %outputs "out")))
  2043. #:phases
  2044. (modify-phases %standard-phases
  2045. (add-before 'configure 'patch-paths
  2046. (lambda _
  2047. (substitute* "sys/unix/nethack.sh"
  2048. (("^ *cd .*$") ""))
  2049. (substitute* "sys/unix/Makefile.utl"
  2050. (("^YACC *=.*$") "YACC = bison -y\n")
  2051. (("^LEX *=.*$") "LEX = flex\n")
  2052. (("^# CC = gcc") "CC = gcc"))
  2053. (substitute* "sys/unix/hints/linux"
  2054. (("/bin/gzip") (string-append
  2055. (assoc-ref %build-inputs "gzip")
  2056. "/bin/gzip"))
  2057. (("^WINTTYLIB=.*") "WINTTYLIB=-lncurses"))
  2058. (substitute* "include/config.h"
  2059. (("^.*define CHDIR.*$") "")
  2060. (("^/\\* *#*define *REPRODUCIBLE_BUILD *\\*/")
  2061. ;; Honor SOURCE_DATE_EPOCH.
  2062. "#define REPRODUCIBLE_BUILD"))
  2063. ;; Note: 'makedefs' rejects and ignores dates that are too old
  2064. ;; or too new, so we must choose something reasonable here.
  2065. (setenv "SOURCE_DATE_EPOCH" "1531865062")
  2066. (substitute* "sys/unix/Makefile.src"
  2067. (("^# CC = gcc") "CC = gcc"))
  2068. #t))
  2069. (replace 'configure
  2070. (lambda _
  2071. (let ((bash (string-append
  2072. (assoc-ref %build-inputs "bash")
  2073. "/bin/bash")))
  2074. (with-directory-excursion "sys/unix"
  2075. (substitute* "setup.sh" (("/bin/sh") bash))
  2076. (invoke bash "setup.sh" "hints/linux"))
  2077. #t)))
  2078. (add-after 'install 'fixup-paths
  2079. (lambda _
  2080. (let* ((output (assoc-ref %outputs "out"))
  2081. (nethack-script (string-append output "/bin/nethack")))
  2082. (mkdir-p (string-append output "/games/lib/nethackuserdir"))
  2083. (for-each
  2084. (lambda (file)
  2085. (rename-file
  2086. (string-append output "/games/lib/nethackdir/" file)
  2087. (string-append output "/games/lib/nethackuserdir/"
  2088. file)))
  2089. '("xlogfile" "logfile" "perm" "record" "save"))
  2090. (mkdir-p (string-append output "/bin"))
  2091. (call-with-output-file nethack-script
  2092. (lambda (port)
  2093. (format port "#!~a/bin/sh
  2094. PATH=~a:$PATH
  2095. if [ ! -d ~~/.config/nethack ]; then
  2096. mkdir -p ~~/.config/nethack
  2097. cp -r ~a/games/lib/nethackuserdir/* ~~/.config/nethack
  2098. chmod -R +w ~~/.config/nethack
  2099. fi
  2100. RUNDIR=$(mktemp -d)
  2101. cleanup() {
  2102. rm -rf $RUNDIR
  2103. }
  2104. trap cleanup EXIT
  2105. cd $RUNDIR
  2106. for i in ~~/.config/nethack/*; do
  2107. ln -s $i $(basename $i)
  2108. done
  2109. for i in ~a/games/lib/nethackdir/*; do
  2110. ln -s $i $(basename $i)
  2111. done
  2112. ~a/games/nethack \"$@\""
  2113. (assoc-ref %build-inputs "bash")
  2114. (list->search-path-as-string
  2115. (list
  2116. (string-append
  2117. (assoc-ref %build-inputs "coreutils") "/bin")
  2118. (string-append
  2119. (assoc-ref %build-inputs "less") "/bin"))
  2120. ":")
  2121. output
  2122. output
  2123. output)))
  2124. (chmod nethack-script #o555)
  2125. #t)))
  2126. (delete 'check))))
  2127. (home-page "https://nethack.org")
  2128. (synopsis "Classic dungeon crawl game")
  2129. (description "NetHack is a single player dungeon exploration game that runs
  2130. on a wide variety of computer systems, with a variety of graphical and text
  2131. interfaces all using the same game engine. Unlike many other Dungeons &
  2132. Dragons-inspired games, the emphasis in NetHack is on discovering the detail of
  2133. the dungeon and not simply killing everything in sight - in fact, killing
  2134. everything in sight is a good way to die quickly. Each game presents a
  2135. different landscape - the random number generator provides an essentially
  2136. unlimited number of variations of the dungeon and its denizens to be discovered
  2137. by the player in one of a number of characters: you can pick your race, your
  2138. role, and your gender.")
  2139. (license
  2140. (license:fsdg-compatible
  2141. "https://nethack.org/common/license.html"))))
  2142. (define-public pipewalker
  2143. (package
  2144. (name "pipewalker")
  2145. (version "0.9.4")
  2146. (source
  2147. (origin
  2148. (method url-fetch)
  2149. (uri (string-append "mirror://sourceforge/pipewalker/pipewalker/"
  2150. version "/pipewalker-" version ".tar.gz"))
  2151. (sha256
  2152. (base32 "1x46wgk0s55562pd96cxagxkn6wpgglq779f9b64ff1k3xzp3myn"))))
  2153. (build-system gnu-build-system)
  2154. (arguments
  2155. `(#:configure-flags
  2156. (list (string-append "--docdir=" (assoc-ref %outputs "out")
  2157. "/share/doc/" ,name "-" ,version))
  2158. #:phases
  2159. (modify-phases %standard-phases
  2160. (add-after 'configure 'patch-docdir
  2161. ;; Makefile.in ignores configure's ‘--docdir=...’ option. Fix that.
  2162. (lambda _
  2163. (substitute* "Makefile"
  2164. (("(pkgdocdatadir = ).*" _ assignment)
  2165. (string-append assignment "$(docdir)\n")))
  2166. #t)))))
  2167. (inputs
  2168. (list libpng mesa sdl))
  2169. (home-page "https://pipewalker.sourceforge.net/")
  2170. (synopsis "Logical tile puzzle")
  2171. (description
  2172. "PipeWalker is a simple puzzle game with many diffent themes: connect all
  2173. computers to one network server, bring water from a source to the taps, etc.
  2174. The underlying mechanism is always the same: you must turn each tile in the
  2175. grid in the right direction to combine all components into a single circuit.
  2176. Every puzzle has a complete solution, although there may be more than one.")
  2177. (license license:gpl3+)))
  2178. (define-public prboom-plus
  2179. (package
  2180. (name "prboom-plus")
  2181. (version "2.5.1.4")
  2182. (source (origin
  2183. (method url-fetch)
  2184. (uri (string-append "mirror://sourceforge/prboom-plus/prboom-plus/"
  2185. version "/prboom-plus-" version ".tar.gz"))
  2186. (sha256
  2187. (base32 "151v6nign86m1a2vqz27krsccpc9m4d1jax4y43v2fa82wfj9qp0"))
  2188. (modules '((guix build utils)))
  2189. (snippet
  2190. '(begin
  2191. (substitute* "src/version.c"
  2192. (("__DATE__") "")
  2193. (("__TIME__") ""))
  2194. #t))))
  2195. (build-system gnu-build-system)
  2196. (arguments
  2197. '(#:configure-flags '("--disable-cpu-opt")
  2198. #:make-flags `(,(string-append "gamesdir="
  2199. (assoc-ref %outputs "out") "/bin"))
  2200. #:phases
  2201. (modify-phases %standard-phases
  2202. (add-after 'set-paths 'set-sdl'paths
  2203. (lambda* (#:key inputs #:allow-other-keys)
  2204. (setenv "CPATH"
  2205. (string-append
  2206. (search-input-directory inputs "/include/SDL")
  2207. ":" (or (getenv "CPATH") ""))))))))
  2208. (inputs
  2209. (list fluidsynth
  2210. glu
  2211. libmad
  2212. libpng
  2213. libvorbis
  2214. pcre
  2215. portmidi
  2216. (sdl-union (list sdl sdl-image sdl-mixer sdl-net))))
  2217. (home-page "https://prboom-plus.sourceforge.net/")
  2218. (synopsis "Version of the classic 3D shoot'em'up game Doom")
  2219. (description
  2220. "PrBoom+ is a Doom source port developed from the original PrBoom project.")
  2221. (license license:gpl2+)))
  2222. (define-public retux
  2223. (let ((release "1.6.1")
  2224. (revision 0))
  2225. (package
  2226. (name "retux")
  2227. (version (if (zero? revision)
  2228. release
  2229. (string-append release "-"
  2230. (number->string revision))))
  2231. (source (origin
  2232. (method url-fetch)
  2233. (uri (string-append "https://github.com/retux-game/retux/"
  2234. "releases/download/v"
  2235. version "/retux-"
  2236. release "-src.zip"))
  2237. (sha256
  2238. (base32
  2239. "1bkyfm0h4kys0x7c1340fnkhgnmcrf4j2xjm250r5w8q6l7v2wj4"))))
  2240. (build-system python-build-system)
  2241. (arguments
  2242. `(#:tests? #f ; no check target
  2243. #:phases
  2244. (modify-phases %standard-phases
  2245. ;; no setup.py script
  2246. (delete 'build)
  2247. (replace 'install
  2248. (lambda* (#:key outputs #:allow-other-keys)
  2249. (let* ((out (assoc-ref outputs "out"))
  2250. (bin (string-append out "/bin"))
  2251. (data (string-append out "/share/retux")))
  2252. (mkdir-p bin)
  2253. (substitute* "retux.py"
  2254. ;; Use the correct data directory.
  2255. (("os\\.path\\.join\\(os\\.path\\.dirname\\(__file__\\), \"data\"\\),")
  2256. (string-append "\"" data "\",")))
  2257. (copy-file "retux.py" (string-append bin "/retux"))
  2258. (copy-recursively "data" data)))))))
  2259. (native-inputs
  2260. (list unzip))
  2261. (inputs
  2262. (list python-sge python-xsge))
  2263. (home-page "https://retux-game.github.io/")
  2264. (synopsis "Action platformer game")
  2265. (description
  2266. "ReTux is an action platformer loosely inspired by the Mario games,
  2267. utilizing the art assets from the @code{SuperTux} project.")
  2268. ;; GPL version 3 or later is the license for the code and some art.
  2269. ;; The rest of the licenses are for the art exclusively, as listed in
  2270. ;; data/LICENSES.
  2271. (license (list license:cc0
  2272. license:cc-by3.0
  2273. license:cc-by-sa3.0
  2274. license:cc-by-sa4.0
  2275. license:gpl2+
  2276. license:gpl3+)))))
  2277. (define-public robotfindskitten
  2278. (package
  2279. (name "robotfindskitten")
  2280. (version "2.8284271.702") ; 1600003_201b is older, see ChangeLog
  2281. (source (origin
  2282. (method url-fetch)
  2283. (uri (string-append "https://github.com/" name "/" name
  2284. "/releases/download/" version "/"
  2285. name "-" version ".tar.gz"))
  2286. (sha256
  2287. (base32
  2288. "1bwrkxm83r9ajpkd6x03nqvmdfpf5vz6yfy0c97pq3v3ykj74082"))))
  2289. (build-system gnu-build-system)
  2290. (arguments
  2291. (list
  2292. #:tests? #f ; there are no tests
  2293. #:make-flags
  2294. #~(list
  2295. ;; Required for colorized output, see <http://bugs.gnu.org/54607>.
  2296. "CFLAGS=-D_XOPEN_SOURCE=600"
  2297. (string-append "execgamesdir=" #$output "/bin"))))
  2298. (inputs (list ncurses))
  2299. (outputs (list "out" "debug"))
  2300. (synopsis "Thematic meditative game")
  2301. (description
  2302. "You are a robot moving around in a realm filled with ASCII characters.
  2303. Examine humorously described though useless items as you search for a kitten
  2304. among them. The theme of this Zen simulation is continued in its
  2305. documentation.")
  2306. (home-page "http://robotfindskitten.org/")
  2307. (license license:gpl2+)))
  2308. (define-public roguebox-adventures
  2309. (package
  2310. (name "roguebox-adventures")
  2311. (version "3.0.1")
  2312. (source
  2313. (origin
  2314. (method url-fetch)
  2315. (uri (string-append
  2316. "http://download.tuxfamily.org/rba/RogueBoxAdventures_v"
  2317. (string-join (string-split version #\.) "_") "_Source.zip"))
  2318. (file-name (string-append name "-" version ".zip"))
  2319. (sha256
  2320. (base32
  2321. "05zd03s5w9kcpklfgcggbaa6rwf59nm0q9vcj6gh9v2lh402k067"))))
  2322. (build-system python-build-system)
  2323. (arguments
  2324. `(#:tests? #f ; no check target
  2325. #:phases
  2326. (modify-phases %standard-phases
  2327. (replace 'unpack
  2328. (lambda* (#:key source #:allow-other-keys)
  2329. (and (invoke "unzip" source)
  2330. ;; The actual source is buried a few directories deep.
  2331. (chdir (string-append "RogueBoxAdventures_v"
  2332. (string-join
  2333. (string-split ,version #\.) "_")
  2334. "_Source")))))
  2335. ;; no setup.py script
  2336. (replace 'build
  2337. (lambda* (#:key outputs #:allow-other-keys)
  2338. (let* ((out (assoc-ref outputs "out"))
  2339. (data (string-append
  2340. out "/share/games/roguebox-adventures")))
  2341. ;; Use the correct data directory.
  2342. (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py")
  2343. (("basic_path + os\\.sep + 'DATA'")
  2344. (string-append "'" data "'"))
  2345. (("^basic_path.*$")
  2346. (string-append "basic_path ='" data "'\n")))
  2347. (substitute* "LIB/dialog.py"
  2348. (("d_path = os\\.path\\.dirname\\(.*\\)\\)")
  2349. (string-append "d_path = '" data "'")))
  2350. (substitute* "LIB/gra_files.py"
  2351. (("basic_path = b_path\\.replace\\('/LIB',''\\)")
  2352. (string-append "basic_path ='" data "'\n")))
  2353. ;; The game must save in the user's home directory because
  2354. ;; the store is read-only.
  2355. (substitute* "main.py"
  2356. (("home_save = False") "home_save = True")
  2357. (("'icon_small.png'")
  2358. (string-append "'" data "/icon_small.png'"))))
  2359. #t))
  2360. (replace 'install
  2361. (lambda* (#:key outputs #:allow-other-keys)
  2362. (let* ((out (assoc-ref outputs "out"))
  2363. (bin (string-append out "/bin"))
  2364. (roguebox-adventures
  2365. (string-append bin "/roguebox-adventures"))
  2366. (data (string-append
  2367. out "/share/games/roguebox-adventures"))
  2368. (lib (string-append data "/LIB"))
  2369. (doc (string-append
  2370. out "/share/doc/roguebox-adventures")))
  2371. (mkdir-p bin)
  2372. (mkdir-p doc)
  2373. (for-each (lambda (file)
  2374. (copy-recursively file
  2375. (string-append data "/" file)))
  2376. '("AUDIO" "FONT" "GRAPHIC" "LIB" "LICENSE"
  2377. "icon_big.png" "icon_small.png"))
  2378. (for-each (lambda (file)
  2379. (chmod file #o555)
  2380. (install-file file lib))
  2381. '("main.py" "run.py"))
  2382. (copy-recursively "DOC" doc)
  2383. (call-with-output-file
  2384. roguebox-adventures
  2385. (lambda (p)
  2386. (format p "\
  2387. #!~a
  2388. export GUIX_PYTHONPATH=~a/LIB:~a
  2389. exec -a \"~a\" ~a \"$@\"\n"
  2390. (which "bash") data (getenv "GUIX_PYTHONPATH")
  2391. (which "python3")
  2392. (string-append lib "/main.py"))))
  2393. (chmod roguebox-adventures #o555))
  2394. #t)))))
  2395. (native-inputs
  2396. (list unzip))
  2397. (inputs
  2398. (list python-pygame python-tmx))
  2399. (home-page "https://rogueboxadventures.tuxfamily.org")
  2400. (synopsis "Classical roguelike/sandbox game")
  2401. (description
  2402. "RogueBox Adventures is a graphical roguelike with strong influences
  2403. from sandbox games like Minecraft or Terraria. The main idea of RogueBox
  2404. Adventures is to offer the player a kind of roguelike toy-world. This world
  2405. can be explored and changed freely.")
  2406. ;; The GPL3+ is for code, the rest are for art.
  2407. (license (list license:cc0
  2408. license:cc-by3.0
  2409. license:gpl3+
  2410. license:silofl1.1))))
  2411. (define-public seahorse-adventures
  2412. (package
  2413. (name "seahorse-adventures")
  2414. (version "1.4")
  2415. (source
  2416. (origin
  2417. (method git-fetch)
  2418. (uri (git-reference
  2419. (url "https://github.com/dulsi/seahorse-adventures")
  2420. (commit (string-append "Release-" version))))
  2421. (file-name (git-file-name name version))
  2422. (sha256
  2423. (base32 "1dxysa79cz5mflr2953fyk838h1jwvi1ngn8wlpms0ag35yv21s8"))
  2424. (modules '((guix build utils)
  2425. (ice-9 ftw)
  2426. (srfi srfi-1)))
  2427. ;; Remove non-free (non-commercial) font.
  2428. (snippet
  2429. #~(begin
  2430. (for-each delete-file (find-files "data/fonts" "."))))))
  2431. (build-system python-build-system)
  2432. (arguments
  2433. (list
  2434. #:tests? #f ;no test
  2435. #:phases
  2436. #~(modify-phases %standard-phases
  2437. (delete 'build) ;pure Python
  2438. (replace 'install ;no install script
  2439. (lambda* (#:key inputs #:allow-other-keys)
  2440. (let* ((bin (string-append #$output "/bin"))
  2441. (share (string-append #$output "/share"))
  2442. (applications (string-append share "/applications"))
  2443. (data (string-append share "/seahorse-adventures")))
  2444. ;; Install data.
  2445. (for-each (lambda (f)
  2446. (chmod f #o555)
  2447. (install-file f data))
  2448. '("leveledit.py" "run_game.py" "tileedit.py"))
  2449. (for-each (lambda (dir)
  2450. (let ((target (string-append data "/" dir)))
  2451. (mkdir-p target)
  2452. (copy-recursively dir target)))
  2453. '("data" "lib"))
  2454. ;; Create executable.
  2455. (mkdir-p bin)
  2456. (let ((executable (string-append bin "/seahorse-adventures")))
  2457. (call-with-output-file executable
  2458. (lambda (p)
  2459. (format p
  2460. "#!~a~@
  2461. export GUIX_PYTHONPATH=~a:~a~@
  2462. exec -a \"~a\" ~a \"$@\"~%"
  2463. (search-input-file inputs "/bin/bash")
  2464. data
  2465. (getenv "GUIX_PYTHONPATH")
  2466. (search-input-file inputs "/bin/python3")
  2467. (string-append data "/run_game.py"))))
  2468. (chmod executable #o555))
  2469. ;; Add desktop file.
  2470. (mkdir-p applications)
  2471. (make-desktop-entry-file
  2472. (string-append applications "/seahorse-adventures.desktop")
  2473. #:name "Seahorse Adventures"
  2474. #:comment
  2475. '((#f "Help Barbie the seahorse float on bubbles to the moon"))
  2476. #:exec #$name
  2477. #:icon #$name
  2478. #:categories '("Game" "ActionGame")
  2479. #:keywords '("game" "retro" "platform"))
  2480. ;; Add icons.
  2481. (for-each
  2482. (lambda (size)
  2483. (let ((dir (string-append share "/icons/hicolor/"
  2484. size "x" size "/apps")))
  2485. (mkdir-p dir)
  2486. (copy-file
  2487. (string-append "icon" size ".png")
  2488. (string-append dir "/searhorse-adventures.png"))))
  2489. '("32" "64" "128")))))
  2490. (add-after 'install 'unbundle-fonts
  2491. ;; Unbundle Bitstream Vera font and replace deleted one.
  2492. (lambda* (#:key inputs #:allow-other-keys)
  2493. (let ((data (string-append #$output "/share/seahorse-adventures"))
  2494. (vera (search-input-file
  2495. inputs "/share/fonts/truetype/Vera.ttf")))
  2496. (let ((themes-dir (string-append data "/data/themes/")))
  2497. (for-each
  2498. (lambda (theme)
  2499. (let ((target (string-append themes-dir theme "/Vera.ttf")))
  2500. (delete-file target)
  2501. (symlink vera target)))
  2502. '("default" "gray")))
  2503. (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
  2504. (substitute* (string-append data "/lib/main.py")
  2505. (("f_scale = 0.35") "f_scale = 0.47"))))))))
  2506. (inputs
  2507. (list font-bitstream-vera python-pygame))
  2508. (home-page "http://www.imitationpickles.org/barbie/")
  2509. (synopsis "Help Barbie the seahorse float on bubbles to the moon")
  2510. (description
  2511. "Barbie Seahorse Adventures is a retro style platform arcade game.
  2512. You are Barbie the seahorse who travels through the jungle, up to the
  2513. volcano until you float on bubbles to the moon. On the way to your
  2514. final destination you will encounter various enemies, servants of the
  2515. evil overlord who has stolen the galaxy crystal. Avoid getting hit
  2516. and defeat them with your bubbles!")
  2517. ;; GPL2+ is for code, CC0 is for art.
  2518. (license (list license:gpl2+ license:cc0))))
  2519. (define-public solarus
  2520. (package
  2521. (name "solarus")
  2522. ;; XXX: When updating this package, please also update hash in
  2523. ;; `solarus-quest-editor' below.
  2524. (version "1.6.5")
  2525. (source
  2526. (origin
  2527. (method git-fetch)
  2528. (uri (git-reference
  2529. (url "https://gitlab.com/solarus-games/solarus")
  2530. (commit (string-append "v" version))))
  2531. (file-name (git-file-name name version))
  2532. (sha256
  2533. (base32 "0ny9dgqphjv2l39rff2621hnrzpf8qin8vmnv7jdz20azjk4m8id"))))
  2534. (build-system cmake-build-system)
  2535. (arguments
  2536. `(#:phases
  2537. (modify-phases %standard-phases
  2538. (add-after 'unpack 'disable-failing-tests
  2539. ;; The following tests fail reporting a missing "/dev/dri"
  2540. ;; file.
  2541. (lambda _
  2542. (substitute* "tests/cmake/AddTestMaps.cmake"
  2543. ((".*1200_create_shader_from_source.*" all)
  2544. (string-append "#" all))
  2545. ((".*1210_shader_scaling_factor.*" all)
  2546. (string-append "#" all)))
  2547. #t))
  2548. (add-before 'check 'set-home
  2549. ;; Tests fail without setting the following environment
  2550. ;; variables.
  2551. (lambda _
  2552. (setenv "HOME" (getcwd))
  2553. (setenv "XDG_RUNTIME_DIR" (getcwd))
  2554. #t)))))
  2555. (native-inputs
  2556. (list pkg-config qttools-5))
  2557. (inputs
  2558. `(("glm" ,glm)
  2559. ("libmodplug" ,libmodplug)
  2560. ("libogg" ,libogg)
  2561. ("libvorbis" ,libvorbis)
  2562. ("luajit" ,luajit)
  2563. ("openal" ,openal)
  2564. ("physfs" ,physfs)
  2565. ("qtbase" ,qtbase-5)
  2566. ("sdl2" ,(sdl-union (list sdl2 sdl2-image sdl2-ttf)))))
  2567. (home-page "https://www.solarus-games.org/")
  2568. (synopsis "Lightweight game engine for Action-RPGs")
  2569. (description
  2570. "Solarus is a 2D game engine written in C++, that can run games
  2571. scripted in Lua. It has been designed with 16-bit classic Action-RPGs
  2572. in mind.")
  2573. ;; The source code is licensed under the terms of GPL-3.0.
  2574. ;; Resources are licensed under the terms of CC-BY-SA-3.0 and
  2575. ;; CC-BY-SA 4.0.
  2576. (license (list license:gpl3 license:cc-by-sa3.0 license:cc-by-sa4.0))))
  2577. (define-public solarus-quest-editor
  2578. (package
  2579. (inherit solarus)
  2580. (name "solarus-quest-editor")
  2581. (version (package-version solarus))
  2582. (source
  2583. (origin
  2584. (method git-fetch)
  2585. (uri (git-reference
  2586. (url "https://gitlab.com/solarus-games/solarus-quest-editor")
  2587. (commit (string-append "v" version))))
  2588. (file-name (git-file-name name version))
  2589. (sha256
  2590. (base32 "1pvjgd4faxii5sskw1h55lw90hlbazhwni8nxyywzrmkjbq7irm0"))))
  2591. (arguments
  2592. `(#:tests? #false)) ; no test suite
  2593. (inputs
  2594. (modify-inputs (package-inputs solarus)
  2595. (prepend solarus)))
  2596. (synopsis "Create and modify quests for the Solarus engine")
  2597. (description
  2598. "Solarus Quest Editor is a graphical user interface to create and
  2599. modify quests for the Solarus engine.")))
  2600. (define-public superstarfighter
  2601. (package
  2602. (name "superstarfighter")
  2603. (version "0.6.5")
  2604. (source
  2605. (origin
  2606. (method git-fetch)
  2607. (uri (git-reference
  2608. (url "https://github.com/notapixelstudio/superstarfighter")
  2609. ;; The commit is not tagged upstream:
  2610. ;; https://github.com/notapixelstudio/superstarfighter/commit/350605bf5454c26ebe2c57d8217edd03689c0573
  2611. (commit "32521f467616bb390e3929d07e1936ff43fe64da")))
  2612. (file-name (git-file-name name version))
  2613. (sha256
  2614. (base32 "1ckghzrfgvk9z1n5f4ivnamm6s8h9sbv0a3aq9pp4a3yrhkgld0k"))))
  2615. (build-system gnu-build-system)
  2616. (arguments
  2617. `(#:tests? #f ;there are no tests
  2618. #:phases
  2619. (modify-phases %standard-phases
  2620. (replace 'configure
  2621. (lambda _
  2622. (chdir "godot")
  2623. (setenv "HOME" (getcwd))
  2624. (with-output-to-file "export_presets.cfg"
  2625. (lambda ()
  2626. (display
  2627. "[preset.0]
  2628. name=\"Guix\"
  2629. platform=\"Linux/X11\"
  2630. runnable=true
  2631. [preset.0.options]")))
  2632. #t))
  2633. (replace 'build
  2634. (lambda _
  2635. (let ((godot (assoc-ref %build-inputs "godot-headless")))
  2636. (invoke (string-append godot "/bin/godot_server")
  2637. "--export-pack" "Guix"
  2638. "superstarfighter.pck" "project.godot"))
  2639. #t))
  2640. (replace 'install
  2641. (lambda* (#:key inputs outputs #:allow-other-keys)
  2642. (let* ((out (assoc-ref outputs "out"))
  2643. (bin (string-append out "/bin"))
  2644. (share (string-append out "/share"))
  2645. (data (string-append share "/superstarfighter"))
  2646. (icons (string-append share "/icons/hicolor/256x256/apps")))
  2647. (install-file "superstarfighter.pck" data)
  2648. (mkdir-p bin)
  2649. (call-with-output-file (string-append bin "/superstarfighter")
  2650. (lambda (port)
  2651. (format port
  2652. "#!/bin/sh~@
  2653. exec ~a/bin/godot --main-pack ~a/superstarfighter.pck~%"
  2654. (assoc-ref inputs "godot")
  2655. data)
  2656. (chmod port #o755)))
  2657. (mkdir-p icons)
  2658. (copy-file "icon.png" (string-append icons "/" ,name ".png"))
  2659. (make-desktop-entry-file
  2660. (string-append share "/applications/" ,name ".desktop")
  2661. #:name "SuperStarfighter"
  2662. #:comment "Fast-paced arcade combat game"
  2663. #:exec ,name
  2664. #:icon ,name
  2665. #:categories '("Game" "ArcadeGame")))
  2666. #t)))))
  2667. (native-inputs
  2668. `(("godot-headless" ,godot "headless")))
  2669. (inputs
  2670. (list godot))
  2671. (home-page "https://notapixel.itch.io/superstarfighter")
  2672. (synopsis "Fast-paced local multiplayer arcade game")
  2673. (description "In SuperStarfighter, up to four local players compete in a
  2674. 2D arena with fast-moving ships and missiles. Different game types are
  2675. available, as well as a single-player mode with AI-controlled ships.")
  2676. (license (list license:expat ; game
  2677. license:silofl1.1)))) ; fonts
  2678. (define-public tetzle
  2679. (package
  2680. (name "tetzle")
  2681. (version "2.2.1")
  2682. (source (origin
  2683. (method url-fetch)
  2684. (uri (string-append "https://gottcode.org/"
  2685. name
  2686. "/"
  2687. name
  2688. "-"
  2689. version
  2690. "-src.tar.bz2"))
  2691. (sha256
  2692. (base32
  2693. "1m4j4lzqp8fnwmvyglmzcn3vh14ix4hhh52ycmcsjgrsgj1w4p6a"))))
  2694. (build-system cmake-build-system)
  2695. (arguments
  2696. `(#:tests? #f)) ; no tests
  2697. (native-inputs (list qttools))
  2698. (inputs (list qtbase))
  2699. (home-page "https://gottcode.org/tetzle/")
  2700. (synopsis "Jigsaw puzzle game that uses tetrominoes for the pieces")
  2701. (description
  2702. "Tetzle is a jigsaw puzzle game that uses tetrominoes for the pieces. Any image
  2703. can be imported and used to create puzzles with a wide range of sizes. Games are
  2704. saved automatically, and you can select between currently in progress games.")
  2705. (license license:gpl3+)))
  2706. (define %ufoai-commit "a542a87a891f96b1ab2c44d35b2f6f16859a5019")
  2707. (define %ufoai-revision "0")
  2708. (define %ufoai-version (git-version "2.6.0_dev" %ufoai-revision %ufoai-commit))
  2709. (define ufoai-source
  2710. (origin
  2711. (method git-fetch)
  2712. (uri (git-reference
  2713. (url "git://git.code.sf.net/p/ufoai/code") ;HTTPS fails mid-clone
  2714. (commit %ufoai-commit)))
  2715. (file-name (string-append "ufoai-" %ufoai-version "-checkout"))
  2716. (sha256
  2717. (base32
  2718. "024s7b9rcg7iw8i2p72gwnvabk23ljlq0nldws0y4b6hpwzyn1wz"))
  2719. (modules '((guix build utils)
  2720. (srfi srfi-1)
  2721. (ice-9 ftw)))
  2722. (snippet
  2723. '(begin
  2724. ;; Delete ~32MiB of bundled dependencies.
  2725. (with-directory-excursion "src/libs"
  2726. (for-each delete-file-recursively
  2727. (lset-difference equal? (scandir ".")
  2728. '("." ".." "gtest" "mumble"))))
  2729. ;; Use relative path to Lua headers.
  2730. (substitute* "src/common/scripts_lua.h"
  2731. (("\\.\\./libs/lua/") ""))
  2732. ;; Adjust Makefile targets to not depend on 'ufo2map', since we build
  2733. ;; it as a separate package. This way we don't need to make the same
  2734. ;; adjustments for 'ufoai-data' and 'ufoai' below.
  2735. (substitute* "build/maps.mk"
  2736. (("\\./ufo2map") "ufo2map")
  2737. (("maps: ufo2map") "maps:"))
  2738. (substitute* "build/modules/testall.mk"
  2739. (("testall: ufo2map") "testall:"))
  2740. ;; If no cURL headers are found, the build system will try to include
  2741. ;; the bundled version, even when not required. Prevent that.
  2742. (substitute* "build/default.mk"
  2743. (("^include src/libs/curl/lib/Makefile\\.inc")
  2744. ""))
  2745. ;; While here, improve reproducibility by adding the '-X' flag to the
  2746. ;; zip command used to create the map files, in order to prevent time
  2747. ;; stamps from making it into the generated archives.
  2748. (substitute* "build/data.mk"
  2749. (("\\$\\(call ZIP\\)")
  2750. "$(call ZIP) -X"))
  2751. #t))))
  2752. (define-public trigger-rally
  2753. (package
  2754. (name "trigger-rally")
  2755. (version "0.6.6.1")
  2756. (source
  2757. (origin
  2758. (method url-fetch)
  2759. (uri (string-append "mirror://sourceforge/trigger-rally/"
  2760. "trigger-" version "/"
  2761. "trigger-rally-" version ".tar.gz"))
  2762. (sha256
  2763. (base32
  2764. "016bc2hczqscfmngacim870hjcsmwl8r3aq8x03vpf22s49nw23z"))))
  2765. (build-system gnu-build-system)
  2766. (inputs
  2767. `(("freealut" ,freealut)
  2768. ("glew" ,glew)
  2769. ("glu" ,glu)
  2770. ("mesa" ,mesa)
  2771. ("openal" ,openal)
  2772. ("physfs" ,physfs)
  2773. ("sdl" ,(sdl-union (list sdl2 sdl2-image)))
  2774. ("tinyxml2" ,tinyxml2)))
  2775. (arguments
  2776. `(#:make-flags (list (string-append "prefix=" %output)
  2777. "bindir=$(prefix)/bin"
  2778. "datadir=$(datarootdir)"
  2779. "OPTIMS=-Ofast")
  2780. #:tests? #f ; No tests present
  2781. #:phases
  2782. (modify-phases %standard-phases
  2783. (delete 'configure)
  2784. (add-before 'build 'cd-src
  2785. (lambda _ (chdir "src")))
  2786. (add-before 'build 'remove-timestamps
  2787. (lambda _
  2788. (substitute* (list "Trigger/menu.cpp"
  2789. "PEngine/app.cpp")
  2790. ((".*__DATE__.*") ""))))
  2791. (add-before 'build 'make-verbose
  2792. (lambda _
  2793. (substitute* "GNUmakefile"
  2794. (("@\\$\\(CXX\\)") "$(CXX)"))))
  2795. (add-after 'build 'set-data-path
  2796. (lambda* (#:key outputs #:allow-other-keys)
  2797. (let ((out (assoc-ref outputs "out")))
  2798. (substitute* "../bin/trigger-rally.config.defs"
  2799. (("<data path=\"C:[^\"]*\"")
  2800. (string-append "<data path=\"" out "/share/trigger-rally\""))))))
  2801. (add-after 'install 'create-desktop-entry
  2802. (lambda* (#:key outputs #:allow-other-keys)
  2803. (let* ((out (assoc-ref outputs "out"))
  2804. (apps (string-append out "/share/applications")))
  2805. (mkdir-p apps)
  2806. (with-output-to-file
  2807. (string-append apps "/trigger-rally.desktop")
  2808. (lambda ()
  2809. (format #t ; Borrowed from Debian package
  2810. "[Desktop Entry]~@
  2811. Name=Trigger Rally~@
  2812. Icon=trigger-rally~@
  2813. Comment=3D rally racing car game~@
  2814. Comment[de]=3D Rally-Autorennen~@
  2815. Comment[fr_FR]=un jeu de rally en 3D~@
  2816. Comment[ro_RO]=Un joc în 3D cu curse de raliu~@
  2817. Exec=~a/bin/trigger-rally~@
  2818. Terminal=false~@
  2819. StartupNotify=false~@
  2820. Type=Application~@
  2821. TryExec=~:*~a/bin/trigger-rally~@
  2822. Categories=Game;ArcadeGame;~@
  2823. Keywords=racing;tracks;~@
  2824. Keywords[de]=Rennstrecke;~%"
  2825. out)))))))))
  2826. (home-page "https://trigger-rally.sourceforge.net")
  2827. (synopsis "Fast-paced single-player racing game")
  2828. (description "Trigger-rally is a 3D rally simulation with great physics
  2829. for drifting on over 200 maps. Different terrain materials like dirt,
  2830. asphalt, sand, ice, etc. and various weather, light, and fog conditions give
  2831. this rally simulation the edge over many other games. You need to make it
  2832. through the maps in often tight time limits and can further improve by beating
  2833. the recorded high scores. All attached single races must be finished in time
  2834. in order to win an event, unlocking additional events and cars. Most maps are
  2835. equipped with spoken co-driver notes and co-driver icons.")
  2836. (license (list license:cc0 ;textures and audio in data.zip
  2837. license:gpl2+))))
  2838. (define-public ufo2map
  2839. (package
  2840. (name "ufo2map")
  2841. (version %ufoai-version)
  2842. (home-page "https://ufoai.org/")
  2843. (source ufoai-source)
  2844. (build-system gnu-build-system)
  2845. (arguments
  2846. '(#:configure-flags '("CC=gcc" "CXX=g++"
  2847. "--enable-release"
  2848. "--enable-ufo2map"
  2849. "--disable-uforadiant"
  2850. "--disable-cgame-campaign"
  2851. "--disable-cgame-multiplayer"
  2852. "--disable-cgame-skirmish"
  2853. "--disable-game"
  2854. "--disable-memory"
  2855. "--disable-testall"
  2856. "--disable-ufoded"
  2857. "--disable-ufo"
  2858. "--disable-ufomodel"
  2859. "--disable-ufoslicer")
  2860. #:tests? #f ;no tests
  2861. #:phases (modify-phases %standard-phases
  2862. (replace 'configure
  2863. (lambda* (#:key (configure-flags '()) #:allow-other-keys)
  2864. ;; The home-made configure script does not understand
  2865. ;; some of the default flags of gnu-build-system.
  2866. (apply invoke "./configure" configure-flags)))
  2867. (replace 'install
  2868. (lambda* (#:key outputs #:allow-other-keys)
  2869. (let ((out (assoc-ref outputs "out")))
  2870. (install-file "ufo2map" (string-append out "/bin"))
  2871. (install-file "debian/ufo2map.6"
  2872. (string-append out "/share/man/man6"))
  2873. #t))))))
  2874. (native-inputs
  2875. (list pkg-config))
  2876. (inputs
  2877. `(("libjpeg" ,libjpeg-turbo)
  2878. ("libpng" ,libpng)
  2879. ("lua" ,lua-5.1)
  2880. ("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-ttf)))))
  2881. (synopsis "UFO: AI map generator")
  2882. (description
  2883. "This package provides @command{ufo2map}, a program used to generate
  2884. maps for the UFO: Alien Invasion strategy game.")
  2885. (license license:gpl2+)))
  2886. (define ufoai-data
  2887. (package
  2888. (name "ufoai-data")
  2889. (version %ufoai-version)
  2890. (home-page "https://ufoai.org/")
  2891. (source ufoai-source)
  2892. (build-system gnu-build-system)
  2893. (arguments
  2894. '(#:tests? #f
  2895. #:configure-flags '("CC=gcc" "CXX=g++")
  2896. #:phases (modify-phases %standard-phases
  2897. (replace 'configure
  2898. (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys)
  2899. (apply invoke "./configure" configure-flags)))
  2900. (replace 'build
  2901. (lambda* (#:key (parallel-build? #t) #:allow-other-keys)
  2902. (invoke "make"
  2903. "-j" (if parallel-build?
  2904. (number->string (parallel-job-count))
  2905. "1")
  2906. "maps")))
  2907. (add-after 'build 'pack
  2908. (lambda _
  2909. (invoke "make" "pk3")))
  2910. (replace 'install
  2911. (lambda* (#:key outputs #:allow-other-keys)
  2912. (let ((out (assoc-ref outputs "out")))
  2913. (for-each (lambda (file)
  2914. (install-file file out))
  2915. (find-files "base" "\\.pk3$"))
  2916. #t))))))
  2917. (native-inputs
  2918. `(("python" ,python-2)
  2919. ("ufo2map" ,ufo2map)
  2920. ("which" ,which)
  2921. ("zip" ,zip)))
  2922. (synopsis "UFO: AI data files")
  2923. (description
  2924. "This package contains maps and other assets for UFO: Alien Invasion.")
  2925. ;; Most assets are available under either GPL2 or GPL2+. Some use other
  2926. ;; licenses, see LICENSES for details.
  2927. (license (list license:gpl2+ license:gpl2 license:cc-by3.0
  2928. license:cc-by-sa3.0 license:public-domain))))
  2929. (define-public ufoai
  2930. (package
  2931. (name "ufoai")
  2932. (version %ufoai-version)
  2933. (home-page "https://ufoai.org/")
  2934. (source ufoai-source)
  2935. (build-system gnu-build-system)
  2936. (arguments
  2937. `(#:configure-flags
  2938. (list (string-append "--prefix=" (assoc-ref %outputs "out"))
  2939. (string-append "--datadir=" (assoc-ref %outputs "out")
  2940. "/share/games/ufo")
  2941. "CC=gcc" "CXX=g++"
  2942. "--enable-release"
  2943. "--enable-game"
  2944. "--disable-ufo2map"
  2945. "--disable-dependency-tracking"
  2946. ;; Disable hard links to prevent huge NARs.
  2947. "--disable-hardlinkedgame"
  2948. "--disable-hardlinkedcgame")
  2949. #:phases (modify-phases %standard-phases
  2950. (add-after 'unpack 'symlink-data-files
  2951. (lambda* (#:key inputs #:allow-other-keys)
  2952. (let ((data (assoc-ref inputs "ufoai-data")))
  2953. ;; Symlink the data files to where the build system
  2954. ;; expects to find them. Ultimately these files are
  2955. ;; copied to $out/share/games/ufoai/base, losing the
  2956. ;; symlinks; we could fix that after install, but it
  2957. ;; does not make a big difference in practice due to
  2958. ;; deduplication.
  2959. (with-directory-excursion "base"
  2960. (for-each (lambda (file)
  2961. (symlink file (basename file)))
  2962. (find-files data "\\.pk3$")))
  2963. #t)))
  2964. (add-before 'configure 'create-language-files
  2965. (lambda _
  2966. (invoke "make" "lang")))
  2967. (replace 'configure
  2968. (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys)
  2969. (apply invoke "./configure" configure-flags)))
  2970. (replace 'check
  2971. (lambda* (#:key tests? #:allow-other-keys)
  2972. (if tests?
  2973. (invoke "./testall")
  2974. (format #t "test suite not run~%"))
  2975. #t))
  2976. (add-after 'install 'install-man-pages
  2977. (lambda* (#:key outputs #:allow-other-keys)
  2978. (let* ((out (assoc-ref outputs "out"))
  2979. (man6 (string-append out "/share/man/man6")))
  2980. (install-file "debian/ufo.6" man6)
  2981. (install-file "debian/ufoded.6" man6)
  2982. #t))))
  2983. ;; TODO: Some map tests occasionally fail because of randomness issues,
  2984. ;; e.g. not enough generated aliens. The test runner also fails early
  2985. ;; in the build container with 'failed to shutdown server'?
  2986. #:tests? #f))
  2987. (native-inputs
  2988. `(("gettext" ,gettext-minimal)
  2989. ("pkg-config" ,pkg-config)
  2990. ("python" ,python-2)
  2991. ("ufo2map" ,ufo2map)
  2992. ("ufoai-data" ,ufoai-data)))
  2993. (inputs
  2994. `(("curl" ,curl)
  2995. ("libjpeg" ,libjpeg-turbo)
  2996. ("libogg" ,libogg)
  2997. ("libpng" ,libpng)
  2998. ("libtheora" ,libtheora)
  2999. ("libvorbis" ,libvorbis)
  3000. ("libxml2" ,libxml2)
  3001. ("lua" ,lua-5.1)
  3002. ("mesa" ,mesa)
  3003. ("minixml" ,minixml)
  3004. ("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-ttf)))
  3005. ("zlib" ,zlib)))
  3006. (synopsis "Turn-based tactical strategy game")
  3007. (description
  3008. "UFO: Alien Invasion is a tactical strategy game set in the year 2084.
  3009. You control a secret organisation charged with defending Earth from a brutal
  3010. alien enemy. Build up your bases, prepare your team, and dive head-first into
  3011. the fast and flowing turn-based combat.
  3012. Over the long term you will need to conduct research into the alien threat to
  3013. figure out their mysterious goals and use their powerful weapons for your own
  3014. ends. You will produce unique items and use them in combat against your
  3015. enemies.
  3016. You can also use them against your friends with the multiplayer functionality.
  3017. Warning: This is a pre-release version of UFO: AI! Some things may not work
  3018. properly.")
  3019. ;; The game code and most assets are GPL2+, but we use GPL2 only here
  3020. ;; because some assets do not use the "or later" clause. Many individual
  3021. ;; assets use Creative Commons or Public Domain; see the LICENSE file.
  3022. (license (delete license:gpl2+ (package-license ufoai-data)))))
  3023. (define-public xshogi
  3024. (package
  3025. (name "xshogi")
  3026. (version "1.4.2")
  3027. (source
  3028. (origin
  3029. (method url-fetch)
  3030. (uri (string-append "mirror://gnu/gnushogi/xshogi-"
  3031. version ".tar.gz"))
  3032. (sha256
  3033. (base32
  3034. "1dns0nhymak44by18sv48m4xb2skiwbi2i3nb9hl6w9iwd2i2brf"))))
  3035. (build-system gnu-build-system)
  3036. (inputs
  3037. (list libxaw libxt))
  3038. (home-page "https://www.gnu.org/software/gnushogi/")
  3039. (synopsis "User interface for gnushogi")
  3040. (description "A graphical user interface for the package @code{gnushogi}.")
  3041. ;; Contains a copy of GPLv3 but the licence notices simply
  3042. ;; state "GNU General Public Licence" without specifying a version.
  3043. (license license:gpl1+)))
  3044. (define-public abbaye
  3045. (package
  3046. (name "abbaye")
  3047. (version "2.0.1")
  3048. (source
  3049. (origin
  3050. (method git-fetch)
  3051. (uri (git-reference
  3052. (url "https://github.com/nevat/abbayedesmorts-gpl")
  3053. (commit (string-append "v" version))))
  3054. (file-name (git-file-name name version))
  3055. (sha256
  3056. (base32 "1pwqf7r9bqb2p3xrw9i7y8pgr1401fy3mnnqpb1qkhmdl3gqi9hb"))
  3057. (modules '((guix build utils)))
  3058. (snippet
  3059. ;; Unbundle fonts.
  3060. '(begin
  3061. (delete-file-recursively "fonts")
  3062. #t))))
  3063. (build-system gnu-build-system)
  3064. (arguments
  3065. '(#:make-flags '("CC=gcc")
  3066. #:phases (modify-phases %standard-phases
  3067. (add-after 'set-paths 'set-sdl-paths
  3068. (lambda* (#:key inputs #:allow-other-keys)
  3069. (setenv "CPATH"
  3070. (string-append
  3071. (search-input-directory inputs "include/SDL2")
  3072. ":" (or (getenv "CPATH") "")))))
  3073. (add-after 'patch-source-shebangs 'patch-makefile
  3074. (lambda* (#:key outputs #:allow-other-keys)
  3075. ;; Replace /usr with package output directory.
  3076. (substitute* "Makefile"
  3077. (("/usr") (assoc-ref outputs "out")))))
  3078. (add-before 'install 'make-install-dirs
  3079. (lambda* (#:key outputs #:allow-other-keys)
  3080. (let ((prefix (assoc-ref outputs "out")))
  3081. ;; Create directories that the makefile assumes exist.
  3082. (mkdir-p (string-append prefix "/bin"))
  3083. (mkdir-p (string-append prefix "/share/applications"))
  3084. (mkdir-p (string-append prefix "/share/pixmaps")))))
  3085. ;; No configure script.
  3086. (delete 'configure))
  3087. #:tests? #f)) ;; No check target.
  3088. (native-inputs (list pkg-config))
  3089. (inputs (list (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
  3090. (home-page "https://github.com/nevat/abbayedesmorts-gpl")
  3091. (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
  3092. (description "L'Abbaye des Morts is a 2D platform game set in 13th century
  3093. France. The Cathars, who preach about good Christian beliefs, were being
  3094. expelled by the Catholic Church out of the Languedoc region in France. One of
  3095. them, called Jean Raymond, found an old church in which to hide, not knowing
  3096. that beneath its ruins lay buried an ancient evil.")
  3097. (license license:gpl3)))
  3098. (define-public angband
  3099. (package
  3100. (name "angband")
  3101. (version "4.2.4")
  3102. (source
  3103. (origin
  3104. (method git-fetch)
  3105. (uri (git-reference
  3106. (url "https://github.com/angband/angband")
  3107. (commit version)))
  3108. (file-name (git-file-name name version))
  3109. (sha256
  3110. (base32 "1x0qqsv7xa3figcl4v35sin64ffgz32652vk541d8qaq4qcc378n"))
  3111. (modules '((guix build utils)))
  3112. (snippet
  3113. ;; So, some of the sounds/graphics/tilesets are under different
  3114. ;; licenses... some of them even nonfree! This is a console-only
  3115. ;; version of this package so we just remove them.
  3116. ;; In the future, if someone tries to make a graphical variant of
  3117. ;; this package, they can deal with that mess themselves. :)
  3118. '(begin
  3119. (for-each (lambda (subdir)
  3120. (let ((lib-subdir (string-append "lib/" subdir)))
  3121. (delete-file-recursively lib-subdir)))
  3122. '("fonts" "icons" "sounds" "tiles"))
  3123. (substitute* "lib/Makefile"
  3124. ;; And don't try to invoke makefiles in the directories we removed.
  3125. (("gamedata customize help screens fonts tiles sounds icons user")
  3126. "gamedata customize help screens user"))))))
  3127. (build-system gnu-build-system)
  3128. (arguments
  3129. `(#:tests? #f ; no check target
  3130. #:configure-flags (list (string-append "--bindir=" %output "/bin"))))
  3131. (native-inputs (list autoconf automake))
  3132. (inputs (list ncurses))
  3133. (home-page "https://rephial.org/")
  3134. (synopsis "Dungeon exploration roguelike")
  3135. (description "Angband is a Classic dungeon exploration roguelike. Explore
  3136. the depths below Angband, seeking riches, fighting monsters, and preparing to
  3137. fight Morgoth, the Lord of Darkness.")
  3138. (license license:gpl2)))
  3139. (define-public pingus
  3140. (package
  3141. (name "pingus")
  3142. (version "0.7.6")
  3143. (source
  3144. (origin
  3145. (method git-fetch)
  3146. (uri (git-reference
  3147. (url "https://gitlab.com/pingus/pingus.git")
  3148. (commit (string-append "v" version))))
  3149. (file-name (git-file-name name version))
  3150. (sha256
  3151. (base32
  3152. "0wp06kcmknsnxz7bjnsndb8x062z7r23fb3yrnbfnj68qhz18y74"))
  3153. (patches (search-patches "pingus-boost-headers.patch"
  3154. "pingus-sdl-libs-config.patch"))
  3155. (modules '((guix build utils)))
  3156. (snippet
  3157. '(begin
  3158. (substitute* "src/pingus/screens/demo_session.cpp"
  3159. (("#include <iostream>")
  3160. ;; std::function moved to <functional> with C++ 11.
  3161. ;; Remove this for versions newer than 0.7.6.
  3162. "#include <iostream>\n#include <functional>"))
  3163. #t))))
  3164. (build-system gnu-build-system)
  3165. (native-inputs (list pkg-config scons-python2))
  3166. (inputs (list sdl
  3167. sdl-image
  3168. sdl-mixer
  3169. mesa
  3170. glu
  3171. libpng
  3172. boost))
  3173. (arguments
  3174. '(#:make-flags (list (string-append "PREFIX=" %output))
  3175. #:tests? #f ; no check target
  3176. #:phases
  3177. (modify-phases %standard-phases
  3178. (delete 'configure)))) ; no configure script
  3179. (home-page "https://pingus.seul.org/")
  3180. (synopsis "Lemmings clone")
  3181. (description
  3182. "Pingus is a free Lemmings-like puzzle game in which the player takes
  3183. command of a bunch of small animals and has to guide them through levels.
  3184. Since the animals walk on their own, the player can only influence them by
  3185. giving them commands, like build a bridge, dig a hole, or redirect all animals
  3186. in the other direction. Multiple such commands are necessary to reach the
  3187. level's exit. The game is presented in a 2D side view.")
  3188. ;; Some source files are under bsd-3 and gpl2+ licenses.
  3189. (license license:gpl3+)))
  3190. (define-public talkfilters
  3191. (package
  3192. (name "talkfilters")
  3193. (version "2.3.8")
  3194. (source
  3195. (origin
  3196. (method url-fetch)
  3197. (uri (string-append "http://www.hyperrealm.com/talkfilters/"
  3198. "talkfilters-" version ".tar.gz"))
  3199. (sha256
  3200. (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
  3201. (build-system gnu-build-system)
  3202. (home-page "https://www.gnu.org/software/talkfilters/")
  3203. (synopsis "Convert English text to humorous dialects")
  3204. (description "The GNU Talk Filters are programs that convert English text
  3205. into stereotyped or otherwise humorous dialects. The filters are provided as
  3206. a C library, so they can easily be integrated into other programs.")
  3207. (license license:gpl2+)))
  3208. (define-public taisei
  3209. (package
  3210. (name "taisei")
  3211. (version "1.3.2")
  3212. (source
  3213. (origin
  3214. (method url-fetch)
  3215. (uri (string-append "https://github.com/taisei-project/"
  3216. "taisei/releases/download/v" version
  3217. "/taisei-v" version ".tar.xz"))
  3218. (sha256
  3219. (base32 "1g53fcyrlzmvlsb40pw90gaglysv6n1w42hk263iv61ibhdmzh6v"))))
  3220. (build-system meson-build-system)
  3221. (arguments
  3222. `(#:build-type "release" ;comment out for bug-reporting (and cheats)
  3223. #:configure-flags
  3224. (list "-Dr_default=gles30"
  3225. "-Dr_gles20=true"
  3226. "-Dr_gles30=true"
  3227. "-Dshader_transpiler=true")))
  3228. (native-inputs
  3229. (list pkg-config python python-docutils python-pygments))
  3230. (inputs
  3231. (list cglm
  3232. freetype
  3233. libpng
  3234. libwebp
  3235. libzip
  3236. mesa
  3237. openssl
  3238. opusfile
  3239. sdl2
  3240. sdl2-mixer
  3241. shaderc
  3242. spirv-cross
  3243. zlib))
  3244. (home-page "https://taisei-project.org/")
  3245. (synopsis "Shoot'em up fangame and libre clone of Touhou Project")
  3246. (description
  3247. "The player controls a character (one of three: Good, Bad, and Dead),
  3248. dodges the missiles (lots of it cover the screen, but the character's hitbox
  3249. is very small), and shoot at the adversaries that keep appear on the screen.")
  3250. (license (list ;;game
  3251. license:expat
  3252. ;;resources/00-taisei.pkgdir/bgm/
  3253. ;;atlas/portraits/
  3254. license:cc-by4.0
  3255. ;;miscellaneous
  3256. license:cc0
  3257. license:public-domain))))
  3258. (define-public cmatrix
  3259. (package
  3260. (name "cmatrix")
  3261. (version "2.0")
  3262. (source
  3263. (origin
  3264. (method git-fetch)
  3265. (uri (git-reference
  3266. (url "https://github.com/abishekvashok/cmatrix")
  3267. (commit (string-append "v" version))))
  3268. (file-name (git-file-name name version))
  3269. (sha256
  3270. (base32
  3271. "1h9jz4m4s5l8c3figaq46ja0km1gimrkfxm4dg7mf4s84icmasbm"))))
  3272. (build-system gnu-build-system)
  3273. (native-inputs
  3274. (list autoconf automake))
  3275. (arguments
  3276. '(#:phases
  3277. (modify-phases %standard-phases
  3278. (replace 'configure
  3279. (lambda* (#:key outputs #:allow-other-keys)
  3280. ;; This old ‘configure’ script doesn't support
  3281. ;; variables passed as arguments.
  3282. (let ((out (assoc-ref outputs "out")))
  3283. (setenv "CONFIG_SHELL" (which "bash"))
  3284. (invoke "./configure"
  3285. (string-append "--prefix=" out))))))))
  3286. (inputs (list ncurses))
  3287. (home-page "https://www.asty.org/cmatrix")
  3288. (synopsis "Simulate the display from \"The Matrix\"")
  3289. (description "CMatrix simulates the display from \"The Matrix\" and is
  3290. based on the screensaver from the movie's website. It works with terminal
  3291. settings up to 132x300 and can scroll lines all at the same rate or
  3292. asynchronously and at a user-defined speed.")
  3293. (license license:gpl2+)))
  3294. (define-public chess
  3295. (package
  3296. (name "chess")
  3297. (version "6.2.9")
  3298. (source
  3299. (origin
  3300. (method url-fetch)
  3301. (uri (string-append "mirror://gnu/chess/gnuchess-" version
  3302. ".tar.gz"))
  3303. (sha256
  3304. (base32
  3305. "140qqkmvldnf41s39khrgyzr6a0az7dcfhkcmflh0sbmvl5w5z6x"))))
  3306. (build-system gnu-build-system)
  3307. (arguments
  3308. '(#:phases
  3309. (modify-phases %standard-phases
  3310. (add-after 'install 'fix-shell-scripts
  3311. (lambda* (#:key outputs #:allow-other-keys)
  3312. (let* ((out (assoc-ref outputs "out"))
  3313. (bin (string-append out "/bin")))
  3314. (chdir bin)
  3315. (substitute* '("gnuchessx" "gnuchessu")
  3316. (("^gnuchess") (string-append bin "/gnuchess")))))))))
  3317. (home-page "https://www.gnu.org/software/chess/")
  3318. (synopsis "Full chess implementation")
  3319. (description "GNU Chess is a chess engine. It allows you to compete
  3320. against the computer in a game of chess, either through the default terminal
  3321. interface or via an external visual interface such as GNU XBoard.")
  3322. (properties '((upstream-name . "gnuchess")
  3323. (ftp-directory . "/chess")))
  3324. (license license:gpl3+)))
  3325. (define-public freedink-engine
  3326. (package
  3327. (name "freedink-engine")
  3328. (version "109.6")
  3329. (source (origin
  3330. (method url-fetch)
  3331. (uri (string-append "mirror://gnu/freedink/freedink-" version
  3332. ".tar.gz"))
  3333. (patches (search-patches "freedink-engine-fix-sdl-hints.patch"))
  3334. (sha256
  3335. (base32
  3336. "00hhk1bjdrc1np2qz44sa5n1mb62qzwxbvsnws3vpms6iyn3a2sy"))))
  3337. (build-system gnu-build-system)
  3338. (arguments
  3339. `(#:configure-flags '("--disable-embedded-resources")
  3340. #:phases
  3341. (modify-phases %standard-phases
  3342. (add-after 'unpack 'disable-graphical-tests
  3343. (lambda _
  3344. ;; These tests require a graphical interface.
  3345. (substitute* "src/Makefile.am"
  3346. (("test_gfx_fonts TestIOGfxDisplay") ""))
  3347. #t))
  3348. (add-before 'bootstrap 'autoreconf
  3349. (lambda _
  3350. ;; automake is out of date in the source
  3351. ;; autoreconf updates the automake scripts
  3352. (invoke "autoreconf")
  3353. ;; Build fails when autom4te.cache exists.
  3354. (delete-file-recursively "autom4te.cache")
  3355. #t))
  3356. (add-after 'install 'delete-freedinkedit-desktop
  3357. (lambda* (#:key outputs #:allow-other-keys)
  3358. (let ((out (assoc-ref outputs "out")))
  3359. ;; freedinkedit does not know where to find freedink data
  3360. ;; freedink data is read-only, so it cannot be edited anyway.
  3361. ;; TODO: fix freedink.desktop
  3362. (delete-file-recursively (string-append
  3363. out "/share/applications"))
  3364. #t))))))
  3365. (native-inputs `(("autoconf" ,autoconf)
  3366. ("automake" ,automake)
  3367. ("cxxtest" ,cxxtest)
  3368. ("gettext" ,gettext-minimal)
  3369. ("help2man" ,help2man)
  3370. ("pkg-config" ,pkg-config)))
  3371. (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer
  3372. sdl2-ttf sdl2-gfx)))
  3373. ("fontconfig" ,fontconfig)
  3374. ("glm" ,glm)))
  3375. (properties '((ftp-directory . "/freedink")
  3376. (upstream-name . "freedink")))
  3377. (home-page "https://www.gnu.org/software/freedink/")
  3378. (synopsis "Twisted adventures of young pig farmer Dink Smallwood")
  3379. (description
  3380. "GNU FreeDink is a free and portable re-implementation of the engine
  3381. for the role-playing game Dink Smallwood. It supports not only the original
  3382. game data files but it also supports user-produced game mods or \"D-Mods\".
  3383. To that extent, it also includes a front-end for managing all of your D-Mods.")
  3384. (license license:gpl3+)))
  3385. (define-public freedink-data
  3386. (package
  3387. (name "freedink-data")
  3388. (version "1.08.20190120")
  3389. (source (origin
  3390. (method url-fetch)
  3391. (uri (string-append "mirror://gnu/freedink/freedink-data-"
  3392. version ".tar.gz"))
  3393. (sha256
  3394. (base32
  3395. "17gvryadlxk172mblbsil7hina1z5wahwaxnr6g3mdq57dvl8pvi"))))
  3396. (build-system gnu-build-system)
  3397. (arguments
  3398. `(#:phases
  3399. (modify-phases %standard-phases
  3400. (delete 'configure) ; no configure script
  3401. (delete 'check)) ; no tests
  3402. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
  3403. (properties '((ftp-directory . "/freedink")))
  3404. (home-page "https://www.gnu.org/software/freedink/")
  3405. (synopsis "Game data for GNU Freedink")
  3406. (description
  3407. "This package contains the game data of GNU Freedink.")
  3408. (license license:gpl3+)))
  3409. (define-public freedink-dfarc
  3410. (package
  3411. (name "freedink-dfarc")
  3412. (version "3.14")
  3413. (source (origin
  3414. (method url-fetch)
  3415. (uri (string-append "mirror://gnu/freedink/dfarc-"
  3416. version ".tar.gz"))
  3417. (sha256
  3418. (base32
  3419. "1yp8n3w426xnlp10xk06vfi2y3k9xrcfyck7s7qs1v0ys7n284d5"))))
  3420. (build-system gnu-build-system)
  3421. (native-inputs
  3422. (list intltool))
  3423. (inputs
  3424. (list bzip2 wxwidgets))
  3425. (properties '((ftp-directory . "/freedink")
  3426. (upstream-name . "dfarc")))
  3427. (home-page "https://www.gnu.org/software/freedink/")
  3428. (synopsis "Front-end for managing and playing Dink Modules")
  3429. (description "DFArc makes it easy to play and manage the GNU FreeDink game
  3430. and its numerous D-Mods.")
  3431. (license license:gpl3+)))
  3432. (define-public freedink
  3433. ;; This is a wrapper that tells the engine where to find the data.
  3434. (package (inherit freedink-engine)
  3435. (name "freedink")
  3436. (build-system trivial-build-system)
  3437. (arguments
  3438. '(#:builder (begin
  3439. (use-modules (guix build utils))
  3440. (let* ((output (assoc-ref %outputs "out"))
  3441. (bin (string-append output "/bin"))
  3442. (executable (string-append bin "/freedink")))
  3443. (mkdir-p bin)
  3444. (call-with-output-file executable
  3445. (lambda (port)
  3446. (format port "#!~a/bin/sh
  3447. exec ~a/bin/freedink -refdir ~a/share/dink\n"
  3448. (assoc-ref %build-inputs "bash")
  3449. (assoc-ref %build-inputs "engine")
  3450. (assoc-ref %build-inputs "data"))
  3451. (chmod port #o777)))
  3452. #t))
  3453. #:modules ((guix build utils))))
  3454. (inputs `(("engine" ,freedink-engine)
  3455. ("data" ,freedink-data)
  3456. ("bash" ,bash)))
  3457. (native-inputs '())))
  3458. (define-public xboard
  3459. (package
  3460. (name "xboard")
  3461. (version "4.9.1")
  3462. (source
  3463. (origin
  3464. (method url-fetch)
  3465. (uri (string-append "mirror://gnu/xboard/xboard-" version
  3466. ".tar.gz"))
  3467. (sha256
  3468. (base32
  3469. "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
  3470. (build-system gnu-build-system)
  3471. (arguments
  3472. `(#:configure-flags '("CFLAGS=-fcommon")
  3473. #:phases
  3474. (modify-phases %standard-phases
  3475. ;; Fixes https://issues.guix.gnu.org/47195.
  3476. (add-after 'unpack 'patch-aplay-path
  3477. (lambda* (#:key inputs #:allow-other-keys)
  3478. (substitute* "xboard.conf"
  3479. (("aplay -q")
  3480. (string-append (search-input-file inputs "/bin/aplay")
  3481. " -q")))))
  3482. ;; Fixes https://issues.guix.gnu.org/45236.
  3483. (add-after 'unpack 'patch-default-engine
  3484. (lambda* (#:key inputs #:allow-other-keys)
  3485. (substitute* "xboard.conf"
  3486. (("-firstChessProgram fairymax")
  3487. (string-append "-firstChessProgram "
  3488. (assoc-ref inputs "chess")
  3489. "/bin/gnuchessx"))))))))
  3490. (inputs
  3491. (list alsa-utils chess gtk+-2 librsvg))
  3492. (native-inputs
  3493. (list texinfo pkg-config))
  3494. (home-page "https://www.gnu.org/software/xboard/")
  3495. (synopsis "Graphical user interface for chess programs")
  3496. (description "GNU XBoard is a graphical board for all varieties of chess,
  3497. including international chess, xiangqi (Chinese chess), shogi (Japanese chess)
  3498. and Makruk. Several lesser-known variants are also supported. It presents a
  3499. fully interactive graphical interface and it can load and save games in the
  3500. Portable Game Notation.")
  3501. (license license:gpl3+)))
  3502. (define-public gtypist
  3503. (package
  3504. (name "gtypist")
  3505. (version "2.9.5")
  3506. (source (origin
  3507. (method url-fetch)
  3508. (uri (string-append "mirror://gnu/gtypist/gtypist-"
  3509. version ".tar.xz"))
  3510. (sha256
  3511. (base32
  3512. "0xzrkkmj0b1dw3yr0m9hml2y634cc4h61im6zwcq57s7285z8fn1"))
  3513. (modules '((guix build utils)))
  3514. (snippet
  3515. ;; We do not provide `ncurses.h' within an `ncursesw'
  3516. ;; sub-directory, so patch the source accordingly. See
  3517. ;; <http://bugs.gnu.org/19018>.
  3518. '(begin
  3519. (for-each (lambda (file)
  3520. (substitute* file
  3521. (("ncursesw/ncurses.h")
  3522. "ncurses.h")))
  3523. (find-files "." "configure$|\\.c$"))
  3524. #t))))
  3525. (build-system gnu-build-system)
  3526. (inputs (list ncurses perl))
  3527. (home-page "https://www.gnu.org/software/gtypist/")
  3528. (synopsis "Typing tutor")
  3529. (description
  3530. "GNU Typist is a universal typing tutor. It can be used to learn and
  3531. practice touch-typing. Several tutorials are included; in addition to
  3532. tutorials for the standard QWERTY layout, there are also tutorials for the
  3533. alternative layouts Dvorak and Colemak, as well as for the numpad. Tutorials
  3534. are primarily in English, however some in other languages are provided.")
  3535. (license license:gpl3+)))
  3536. (define-public irrlicht
  3537. (package
  3538. (name "irrlicht")
  3539. (version "1.8.5")
  3540. (source (origin
  3541. (method url-fetch)
  3542. (uri (string-append
  3543. "mirror://sourceforge/irrlicht/Irrlicht%20SDK/"
  3544. (version-major+minor version)
  3545. "/" version "/irrlicht-" version ".zip"))
  3546. (sha256
  3547. (base32
  3548. "0gagjh2l3a3m8hsixxhhhan3m5xl7735ka8m4g79jl4qsgp7pyzg"))
  3549. (patches (search-patches "irrlicht-use-system-libs.patch"
  3550. "irrlicht-link-against-needed-libs.patch"))
  3551. (modules '((guix build utils)))
  3552. (snippet
  3553. '(begin
  3554. (for-each delete-file-recursively
  3555. '("bin" ; bundled compiled Windows binaries"
  3556. "source/Irrlicht/MacOSX"
  3557. "source/Irrlicht/bzip2"
  3558. "source/Irrlicht/jpeglib"
  3559. "source/Irrlicht/libpng"
  3560. "source/Irrlicht/lzma"
  3561. "source/Irrlicht/zlib"))
  3562. (delete-file "source/Irrlicht/glext.h")
  3563. (delete-file "source/Irrlicht/glxext.h")
  3564. (delete-file "source/Irrlicht/wglext.h")))))
  3565. (build-system gnu-build-system)
  3566. (arguments
  3567. `(#:phases
  3568. (modify-phases %standard-phases
  3569. (add-after 'unpack 'chdir-to-source
  3570. (lambda _
  3571. ;; The actual source is buried a few directories deep.
  3572. (chdir "source/Irrlicht/")))
  3573. (add-after 'chdir-to-source 'remove-<sys/sysctl.h>
  3574. (lambda _
  3575. (substitute* "COSOperator.cpp"
  3576. (("#include <sys/sysctl.h>") ""))))
  3577. (add-after 'chdir-to-source 'delete-broken-install-rule
  3578. (lambda _
  3579. (substitute* "Makefile"
  3580. ;; We neither build nor want a static library. Skip it.
  3581. ((".*\\bcp .*\\$\\(STATIC_LIB\\).*") ""))))
  3582. (add-after 'chdir-to-source 'fix-build-env
  3583. (lambda* (#:key outputs #:allow-other-keys)
  3584. (let ((out (assoc-ref outputs "out")))
  3585. (substitute* "Makefile"
  3586. (("INSTALL_DIR = /usr/local/lib")
  3587. (string-append "INSTALL_DIR = " out "/lib"))
  3588. ;; Add '-fpermissive' to the CXXFLAGS.
  3589. (("-Wall") "-Wall -fpermissive")) ; CImageLoaderJPG.cpp
  3590. ;; The Makefile assumes these directories exist.
  3591. (mkdir-p (string-append out "/lib"))
  3592. (mkdir-p (string-append out "/include")))))
  3593. (delete 'configure)) ; no configure script
  3594. #:tests? #f ; no check target
  3595. #:make-flags
  3596. (list (string-append "CC=" ,(cc-for-target))
  3597. "sharedlib")))
  3598. (inputs
  3599. (list bzip2
  3600. libjpeg-turbo
  3601. libpng
  3602. libx11
  3603. libxxf86vm
  3604. mesa))
  3605. (synopsis "3D game engine written in C++")
  3606. (description
  3607. "The Irrlicht Engine is a high performance realtime 3D engine written in
  3608. C++. Features include an OpenGL renderer, extensible materials, scene graph
  3609. management, character animation, particle and other special effects, support
  3610. for common mesh file formats, and collision detection.")
  3611. (home-page "https://irrlicht.sourceforge.io/")
  3612. (license license:zlib)))
  3613. (define-public irrlicht-for-minetest
  3614. (package
  3615. (inherit irrlicht)
  3616. (name "irrlicht-for-minetest")
  3617. (version "1.9.0mt10")
  3618. (source
  3619. (origin
  3620. (method git-fetch)
  3621. (uri (git-reference
  3622. (url "https://github.com/minetest/irrlicht")
  3623. (commit version)))
  3624. (file-name (git-file-name name version))
  3625. (sha256
  3626. (base32
  3627. "0y5vchz91khs8dmrkpgc7sqmvzx2yjj6svivvm80r4yppv7s03rw"))))
  3628. (build-system cmake-build-system)
  3629. (arguments
  3630. ;; No check target.
  3631. (list #:tests? #f))
  3632. (inputs
  3633. (modify-inputs (package-inputs irrlicht)
  3634. (prepend libxi)))))
  3635. (define-public mars
  3636. ;; The latest release on SourceForge relies on an unreleased version of SFML
  3637. ;; with a different API, so we take the latest version from the official
  3638. ;; repository on Github.
  3639. (let ((commit "84664cda094efe6e49d9b1550e4f4f98c33eefa2")
  3640. (revision "2"))
  3641. (package
  3642. (name "mars")
  3643. (version (git-version "0.7.5" revision commit))
  3644. (source (origin
  3645. (method git-fetch)
  3646. (uri (git-reference
  3647. (url "https://github.com/thelaui/M.A.R.S.")
  3648. (commit commit)))
  3649. (file-name (git-file-name name version))
  3650. (sha256
  3651. (base32
  3652. "0bdi4ja39rark742qvqixm8khai5k8qd84z5kzim9jcjdvvwyqj9"))))
  3653. (build-system cmake-build-system)
  3654. (arguments
  3655. `(#:tests? #f ; There are no tests
  3656. #:configure-flags (list (string-append "-Dmars_EXE_DEST_DIR="
  3657. %output "/bin"))
  3658. #:phases
  3659. (modify-phases %standard-phases
  3660. (add-after 'unpack 'fix-data-path
  3661. (lambda* (#:key outputs #:allow-other-keys)
  3662. (substitute* "src/System/settings.cpp"
  3663. (("C_dataPath = \"./data/\";")
  3664. (string-append "C_dataPath = \""
  3665. (assoc-ref outputs "out")
  3666. "/share/games/marsshooter/\";"))))))))
  3667. (inputs
  3668. (list mesa fribidi taglib sfml))
  3669. (home-page "https://mars-game.sourceforge.net/")
  3670. (synopsis "2D space shooter")
  3671. (description
  3672. "M.A.R.S. is a 2D space shooter with pretty visual effects and
  3673. attractive physics. Players can battle each other or computer controlled
  3674. enemies in different game modes such as space ball, death match, team death
  3675. match, cannon keep, and grave-itation pit.")
  3676. (license license:gpl3+))))
  3677. (define-public alienblaster
  3678. (package
  3679. (name "alienblaster")
  3680. (version "1.1.0")
  3681. (source
  3682. (origin
  3683. (method url-fetch)
  3684. (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
  3685. "alienblaster-" version ".tgz"))
  3686. (sha256
  3687. (base32
  3688. "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
  3689. (build-system gnu-build-system)
  3690. (arguments
  3691. (list
  3692. #:tests? #f ; no tests
  3693. #:phases
  3694. #~(modify-phases %standard-phases
  3695. (add-after 'unpack 'fix-sdl-paths
  3696. (lambda _
  3697. (let ((share (string-append #$output "/share")))
  3698. ;; Fix name and append path to "SDL_mixer.h"
  3699. (substitute* "src/Makefile"
  3700. (("GAME_NAME=alienBlaster") "GAME_NAME=alienblaster")
  3701. (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
  3702. (string-append line " -I"
  3703. #$(this-package-input "sdl-mixer")
  3704. "/include/SDL")))
  3705. ;; Substitute relative paths in ".cfg" and source/header files
  3706. (substitute* (find-files "./cfg")
  3707. (("(\\./)?images") (string-append share "/images")))
  3708. (substitute* (list "src/global.h" "src/global.cc")
  3709. (("./images") (string-append share "/images"))
  3710. (("./sound") (string-append share "/sound"))
  3711. (("./cfg") (string-append share "/cfg"))))))
  3712. (delete 'configure)
  3713. (replace 'install
  3714. (lambda _
  3715. (install-file "alienblaster" (string-append #$output "/bin"))
  3716. (for-each
  3717. (lambda (dir)
  3718. (copy-recursively dir (string-append #$output "/share/" dir)))
  3719. '("images" "sound" "cfg")))))))
  3720. (inputs (list sdl sdl-mixer))
  3721. (home-page "http://www.schwardtnet.de/alienblaster/")
  3722. (synopsis "Action-loaded 2D arcade shooter game")
  3723. (description "Alien Blaster is an action-loaded 2D arcade shooter
  3724. game. Your mission in the game is simple: stop the invasion of the aliens by
  3725. blasting them. Simultaneous two-player mode is available.")
  3726. (license license:gpl2)))
  3727. (define glkterm
  3728. (package
  3729. (name "glkterm")
  3730. (version "1.0.4")
  3731. (source
  3732. (origin
  3733. (method url-fetch)
  3734. (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
  3735. "glk/implementations/glkterm-104.tar.gz"))
  3736. (sha256
  3737. (base32
  3738. "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
  3739. (build-system gnu-build-system)
  3740. (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
  3741. (arguments
  3742. '(#:tests? #f ; no check target
  3743. #:phases
  3744. (modify-phases %standard-phases
  3745. (replace 'install
  3746. (lambda* (#:key outputs #:allow-other-keys)
  3747. (let* ((out (assoc-ref outputs "out"))
  3748. (inc (string-append out "/include"))
  3749. (lib (string-append out "/lib")))
  3750. (for-each
  3751. (lambda (file)
  3752. (install-file file inc))
  3753. '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
  3754. (install-file "libglkterm.a" lib))
  3755. #t))
  3756. (delete 'configure)))) ; no configure script
  3757. (home-page "https://www.eblong.com/zarf/glk/")
  3758. (synopsis "Curses Implementation of the Glk API")
  3759. (description
  3760. "Glk defines a portable API for applications with text UIs. It was
  3761. primarily designed for interactive fiction, but it should be suitable for many
  3762. interactive text utilities, particularly those based on a command line.
  3763. This is an implementation of the Glk library which runs in a terminal window,
  3764. using the @code{curses.h} library for screen control.")
  3765. (license (license:fsf-free "file://README"))))
  3766. (define-public glulxe
  3767. (package
  3768. (name "glulxe")
  3769. (version "0.5.4")
  3770. (source
  3771. (origin
  3772. (method url-fetch)
  3773. (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
  3774. "glulx/interpreters/glulxe/glulxe-054.tar.gz"))
  3775. (sha256
  3776. (base32
  3777. "0vipydg6ra90yf9b3ipgppwxyb2xdhcxwvirgjy0v20wlf56zhhz"))))
  3778. (build-system gnu-build-system)
  3779. (inputs `(("glk" ,glkterm)))
  3780. (arguments
  3781. '(#:tests? #f ; no check target
  3782. #:make-flags
  3783. (let* ((glk (assoc-ref %build-inputs "glk")))
  3784. (list (string-append "GLKINCLUDEDIR=" glk "/include")
  3785. (string-append "GLKLIBDIR=" glk "/lib")
  3786. (string-append "GLKMAKEFILE=" "Make.glkterm")))
  3787. #:phases
  3788. (modify-phases %standard-phases
  3789. (replace 'install
  3790. (lambda* (#:key outputs #:allow-other-keys)
  3791. (let* ((out (assoc-ref outputs "out"))
  3792. (bin (string-append out "/bin")))
  3793. (install-file "glulxe" bin))
  3794. #t))
  3795. (delete 'configure)))) ; no configure script
  3796. (home-page "https://www.eblong.com/zarf/glulx/")
  3797. (synopsis "Interpreter for Glulx VM")
  3798. (description
  3799. "Glulx is a 32-bit portable virtual machine intended for writing and
  3800. playing interactive fiction. It was designed by Andrew Plotkin to relieve
  3801. some of the restrictions in the venerable Z-machine format. This is the
  3802. reference interpreter, using the Glk API.")
  3803. (license license:expat)))
  3804. (define-public fifechan
  3805. (package
  3806. (name "fifechan")
  3807. (version "0.1.5")
  3808. (source (origin
  3809. (method url-fetch)
  3810. (uri (string-append "https://codeload.github.com/fifengine/"
  3811. "fifechan/tar.gz/" version))
  3812. (file-name (string-append name "-" version ".tar.gz"))
  3813. (sha256
  3814. (base32
  3815. "0wxs9vz5x9y8chghd8vp7vfk089lfb0qnzggi17zrqkrngs5zgi9"))))
  3816. (build-system cmake-build-system)
  3817. (inputs
  3818. (list sdl2 sdl2-image mesa))
  3819. (arguments
  3820. '(#:tests? #f)) ; No included tests
  3821. (home-page "https://fifengine.github.io/fifechan/")
  3822. (synopsis "Cross platform GUI library specifically for games")
  3823. (description
  3824. "Fifechan is a lightweight cross platform GUI library written in C++
  3825. specifically designed for games. It has a built in set of extendable GUI
  3826. Widgets, and allows users to create more.")
  3827. (license license:lgpl2.1+)))
  3828. (define-public fifengine
  3829. (package
  3830. (name "fifengine")
  3831. (version "0.4.2")
  3832. (source (origin
  3833. (method url-fetch)
  3834. (uri (string-append "https://codeload.github.com/fifengine/"
  3835. "fifengine/tar.gz/" version))
  3836. (file-name (string-append name "-" version ".tar.gz"))
  3837. (patches (search-patches "fifengine-swig-compat.patch"
  3838. "fifengine-boost-compat.patch"))
  3839. (sha256
  3840. (base32
  3841. "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
  3842. (build-system cmake-build-system)
  3843. (arguments
  3844. (list #:tests? #f ;TODO The test running fails to run some tests.
  3845. #:configure-flags
  3846. #~(list
  3847. (string-append "-DOPENALSOFT_INCLUDE_DIR="
  3848. (search-input-directory %build-inputs "include/AL"))
  3849. (string-append "-DPYTHON_SITE_PACKAGES="
  3850. #$output "/lib/python"
  3851. #$(version-major+minor
  3852. (package-version (this-package-input "python")))
  3853. "/site-packages"))
  3854. #:phases
  3855. #~(modify-phases %standard-phases
  3856. (add-after 'unpack 'patch-run_tests.py
  3857. (lambda _
  3858. ;; Patch the test runner to exit with a status of 1 if any test
  3859. ;; fails, to allow detecting failures.
  3860. (substitute* "run_tests.py"
  3861. (("ERROR\\. One or more tests failed!'\\)")
  3862. "ERROR. One or more tests failed!')
  3863. \t\texit(1)"))))
  3864. ;; Run tests after installation so that we can make use of the built
  3865. ;; python modules.
  3866. (delete 'check)
  3867. (add-after 'install 'check
  3868. (lambda* (#:key tests? #:allow-other-keys)
  3869. (when tests?
  3870. ;; The tests require an X server.
  3871. (system "Xvfb :1 &")
  3872. (setenv "DISPLAY" ":1")
  3873. (setenv "XDG_RUNTIME_DIR" "/tmp")
  3874. ;; Run tests
  3875. (chdir #$(string-append "../" (package-name this-package)
  3876. "-" (package-version this-package)))
  3877. (invoke "python3" "run_tests.py" "-a")))))))
  3878. (native-inputs
  3879. (list python swig xorg-server-for-tests))
  3880. (inputs
  3881. (list sdl2
  3882. sdl2-image
  3883. sdl2-ttf
  3884. tinyxml
  3885. openal
  3886. libogg
  3887. glew
  3888. libvorbis
  3889. boost
  3890. fifechan
  3891. swig
  3892. python))
  3893. (propagated-inputs
  3894. (list python-future))
  3895. (home-page "https://www.fifengine.net/")
  3896. (synopsis "FIFE is a multi-platform isometric game engine written in C++")
  3897. (description
  3898. "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
  3899. isometric game engine. Python bindings are included allowing users to create
  3900. games using Python as well as C++.")
  3901. (license license:lgpl2.1+)))
  3902. (define-public fizmo
  3903. (package
  3904. (name "fizmo")
  3905. (version "0.8.5")
  3906. (source (origin
  3907. (method url-fetch)
  3908. (uri (string-append "https://fizmo.spellbreaker.org/source/"
  3909. "fizmo-" version ".tar.gz"))
  3910. (sha256
  3911. (base32
  3912. "1amyc4n41jf08kxmdgkk30bzzx54miaxa97w28f417qwn8lrl98w"))))
  3913. (build-system gnu-build-system)
  3914. (arguments
  3915. '(#:configure-flags
  3916. (let ((libjpeg (assoc-ref %build-inputs "libjpeg"))
  3917. (ncurses (assoc-ref %build-inputs "ncurses")))
  3918. (list (string-append "--with-jpeg-includedir=" libjpeg "/include")))))
  3919. (native-inputs
  3920. (list pkg-config))
  3921. (inputs
  3922. `(("freetype" ,freetype)
  3923. ("libjpeg" ,libjpeg-turbo)
  3924. ("libpng" ,libpng)
  3925. ("libsndfile" ,libsndfile)
  3926. ("libxml2" ,libxml2)
  3927. ("ncurses" ,ncurses)
  3928. ("sdl2" ,sdl2)))
  3929. (home-page "https://fizmo.spellbreaker.org/")
  3930. (synopsis "Z-machine interpreter")
  3931. (description
  3932. "Fizmo is a console-based Z-machine interpreter. It is used to play
  3933. interactive fiction, also known as text adventures, which were implemented
  3934. either by Infocom or created using the Inform compiler.")
  3935. (license license:bsd-3)))
  3936. (define-public gnugo
  3937. (package
  3938. (name "gnugo")
  3939. (version "3.8")
  3940. (source (origin
  3941. (method url-fetch)
  3942. (uri (string-append "mirror://gnu/gnugo/gnugo-" version
  3943. ".tar.gz"))
  3944. (sha256
  3945. (base32
  3946. "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
  3947. (build-system gnu-build-system)
  3948. (inputs
  3949. (list readline))
  3950. (arguments
  3951. `(#:configure-flags '("CFLAGS=-fcommon")))
  3952. (synopsis "Play the game of Go")
  3953. (description
  3954. "GNU Go is a program that plays the game of Go, in which players
  3955. place stones on a grid to form territory or capture other stones. While
  3956. it can be played directly from the terminal, rendered in ASCII characters,
  3957. it is also possible to play GNU Go with 3rd party graphical interfaces or
  3958. even in Emacs. It supports the standard game storage format (SGF, Smart
  3959. Game Format) and inter-process communication format (GMP, Go Modem
  3960. Protocol).")
  3961. (home-page "https://www.gnu.org/software/gnugo/")
  3962. (license license:gpl3+)))
  3963. (define-public extremetuxracer
  3964. (package
  3965. (name "extremetuxracer")
  3966. (version "0.8.2")
  3967. (source (origin
  3968. (method url-fetch)
  3969. (uri (string-append
  3970. "mirror://sourceforge/extremetuxracer/releases/"
  3971. version "/etr-" version ".tar.xz"))
  3972. (sha256
  3973. (base32
  3974. "0knd22lzhzqih1w92y6m7yxha376c6ydl22wy4xm6jg2x5jlk1qw"))))
  3975. (build-system gnu-build-system)
  3976. (native-inputs
  3977. (list pkg-config))
  3978. (inputs
  3979. (list glu sfml))
  3980. (synopsis "High-speed arctic racing game based on Tux Racer")
  3981. ;; Snarfed straight from Debian.
  3982. (description "Extreme Tux Racer, or etracer as it is called for short, is
  3983. a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the
  3984. game is to slide down a snow- and ice-covered mountain as quickly as possible,
  3985. avoiding the trees and rocks that will slow you down.
  3986. Collect herrings and other goodies while sliding down the hill, but avoid fish
  3987. bones.
  3988. This game is based on the GPL version of the famous game TuxRacer.")
  3989. (home-page "https://sourceforge.net/projects/extremetuxracer/")
  3990. (license license:gpl2+)))
  3991. (define-public exult
  3992. (package
  3993. (name "exult")
  3994. (version "1.8")
  3995. (source
  3996. (origin
  3997. ;; The release tarball isn't bootstrapped, and Git is more robust (SWH).
  3998. (method git-fetch)
  3999. (uri (git-reference
  4000. (url "https://github.com/exult/exult")
  4001. (commit (string-append "v" version))))
  4002. (file-name (git-file-name name version))
  4003. (sha256
  4004. (base32 "1qfbkz05w8989vafc6dvw1wmdi1mvkr4kkgk3ccixadf4616kcb3"))))
  4005. (build-system gnu-build-system)
  4006. (outputs (list "out" "gimp" "studio"))
  4007. (arguments
  4008. (list #:configure-flags
  4009. #~(list "--enable-shared"
  4010. "--disable-static"
  4011. "--enable-lto"
  4012. "--enable-exult-studio"
  4013. "--enable-exult-studio-support"
  4014. "--enable-compiler"
  4015. "--enable-mods" ; needs --enable-compiler!
  4016. "--enable-gimp-plugin"
  4017. ;; A few lines on stdout can save a lot of head-scratching:
  4018. "CPPFLAGS=-DDEBUG_PATHS=1")
  4019. #:phases
  4020. #~(modify-phases %standard-phases
  4021. (add-before 'bootstrap 'patch-game-home-directory
  4022. (lambda _
  4023. (substitute* "gamemgr/modmgr.cc"
  4024. ;; EXULT_DATADIR is in the store where it's rather hard for
  4025. ;; users to put game assets. Use a more writable home by
  4026. ;; default, which users can override in their ~/.exult.cfg.
  4027. (("<GAMEHOME>")
  4028. (string-append "<HOME>/.local/share/exult"))
  4029. ;; …however, this causes a regression: the mods which we'll
  4030. ;; install to EXULT_DATADIR are no longer found. So: don't
  4031. ;; look for mods alongside the assets by default. This too
  4032. ;; can be overridden in users' ~/.exult.cfg.
  4033. (("game_path( \\+ \"/mods\")" _ +suffix)
  4034. (string-append "get_system_path(\"<GAMEHOME>/\") + "
  4035. "cfgname" +suffix)))))
  4036. (add-before 'bootstrap 'move-exult-studio
  4037. (lambda* (#:key outputs #:allow-other-keys)
  4038. (let ((out (assoc-ref outputs "studio")))
  4039. (substitute* "mapedit/studio.cc"
  4040. (("(esdir, )EXULT_DATADIR" _ prefix)
  4041. (string-append prefix "\"" out "/share/exult\"")))
  4042. (substitute* "data/Makefile.am"
  4043. (("(estudionewdir =.*)\\$\\(datadir\\)(.*)"
  4044. _ variable= suffix)
  4045. (string-append variable= out "/share" suffix "\n"))))))
  4046. (add-before 'bootstrap 'fix-gimp-plug-in-prefix
  4047. ;; ./configure will propagate this value to myriad Makefiles
  4048. ;; scattered across the tree, so fix it early.
  4049. (lambda* (#:key outputs #:allow-other-keys)
  4050. (let ((out (assoc-ref outputs "gimp")))
  4051. (substitute* "configure.ac"
  4052. (("(GIMP_PLUGIN_PREFIX=).*" _ variable=)
  4053. (string-append variable= out "/lib/gimp/2.0"))))))
  4054. (add-after 'install 'move-exult_studio
  4055. (lambda* (#:key outputs #:allow-other-keys)
  4056. (let ((source (assoc-ref outputs "out"))
  4057. (target (assoc-ref outputs "studio"))
  4058. (file "/bin/exult_studio"))
  4059. (mkdir-p (string-append target (dirname file)))
  4060. (rename-file (string-append source file)
  4061. (string-append target file))))))))
  4062. (native-inputs
  4063. (list autoconf automake libtool pkg-config
  4064. ;; The following are needed only by the GIMP plug-in.
  4065. gimp libjpeg-turbo
  4066. gegl gtk+-2 ; needed by gimpui-2.0.pc
  4067. ;; The following are needed only by the Usecode compiler.
  4068. bison flex))
  4069. (inputs
  4070. (list fluidsynth freetype libvorbis sdl2
  4071. ;; GTK is needed only by Exult Studio.
  4072. gtk+))
  4073. (synopsis "Role-playing game engine compatible with Ultima VII")
  4074. (description
  4075. "Exult is an Ultima 7 game engine that runs on modern operating systems.
  4076. Ultima 7 (or Ultima VII) is a two-part @acronym{RPG, role-playing game} from the
  4077. early 1990s.
  4078. Exult is fully compatible with the original Ultima 7, but doesn't require any
  4079. of its data files to be useful. Explore entirely new game worlds---or create
  4080. your own with the included game and map editor, Exult Studio.
  4081. This package expects the game(s) to be placed in subdirectories of
  4082. @file{~/.local/share/exult}.")
  4083. (home-page "http://exult.info/")
  4084. (license license:gpl2+)))
  4085. (define-public supertuxkart
  4086. (package
  4087. (name "supertuxkart")
  4088. (version "1.4")
  4089. (source
  4090. (origin
  4091. (method url-fetch)
  4092. (uri (string-append "https://github.com/supertuxkart/stk-code/"
  4093. "releases/download/"
  4094. version "/SuperTuxKart-" version "-src.tar.xz"))
  4095. (sha256
  4096. (base32
  4097. "00qg5i9y4i5gdiiq1dbfsgp7dwj60zb5lkgi2d9p3x5s34j3k44q"))
  4098. (modules '((guix build utils)))
  4099. (snippet
  4100. ;; Delete bundled library sources
  4101. '(begin
  4102. ;; Supertuxkart uses modified versions of the Irrlicht engine
  4103. ;; and the bullet library. The developers gave an explanation
  4104. ;; here: http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
  4105. ;; FIXME: try to unbundle angelscript and libraqm
  4106. (for-each delete-file-recursively
  4107. '("lib/dnsc"
  4108. "lib/enet"
  4109. "lib/mcpp"
  4110. "lib/mojoal"
  4111. "lib/wiiuse"))
  4112. #t))))
  4113. (build-system cmake-build-system)
  4114. (arguments
  4115. `(#:tests? #f ; no check target
  4116. #:configure-flags
  4117. (list "-DUSE_WIIUSE=0"
  4118. "-DUSE_SYSTEM_ENET=TRUE"
  4119. "-DUSE_CRYPTO_OPENSSL=TRUE"
  4120. ;; In order to use the system ENet library, IPv6 support (added in
  4121. ;; SuperTuxKart version 1.1) must be disabled.
  4122. "-DUSE_IPV6=FALSE")))
  4123. (inputs
  4124. `(("curl" ,curl)
  4125. ("freetype" ,freetype)
  4126. ("fribidi" ,fribidi)
  4127. ("glew" ,glew)
  4128. ("harfbuzz" ,harfbuzz)
  4129. ("libopenglrecorder" ,libopenglrecorder)
  4130. ("libvorbis" ,libvorbis)
  4131. ("libx11" ,libx11)
  4132. ("libxrandr" ,libxrandr)
  4133. ("mesa" ,mesa)
  4134. ("openal" ,openal)
  4135. ("sdl2" ,sdl2)
  4136. ("sqlite" ,sqlite)
  4137. ("zlib" ,zlib)
  4138. ;; The following input is needed to build the bundled and modified
  4139. ;; version of irrlicht.
  4140. ("enet" ,enet)
  4141. ("libjpeg" ,libjpeg-turbo)
  4142. ("openssl" ,openssl)))
  4143. (native-inputs (list mcpp pkg-config python))
  4144. (home-page "https://supertuxkart.net/Main_Page")
  4145. (synopsis "3D kart racing game")
  4146. (description "SuperTuxKart is a 3D kart racing game, with a focus on
  4147. having fun over realism. You can play with up to 4 friends on one PC, racing
  4148. against each other or just trying to beat the computer; single-player mode is
  4149. also available.")
  4150. (license license:gpl3+)))
  4151. (define-public unknown-horizons
  4152. (package
  4153. (name "unknown-horizons")
  4154. (version "2019.1")
  4155. (source (origin
  4156. (method url-fetch)
  4157. (uri (string-append "https://codeload.github.com/unknown-horizons/"
  4158. "unknown-horizons/tar.gz/" version))
  4159. (file-name (string-append name "-" version ".tar.gz"))
  4160. (sha256
  4161. (base32
  4162. "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
  4163. (patches (search-patches "unknown-horizons-python-3.8-distro.patch"))))
  4164. (build-system python-build-system)
  4165. (arguments
  4166. '(#:phases
  4167. (modify-phases %standard-phases
  4168. (add-before 'build 'set-HOME
  4169. (lambda _
  4170. (setenv "HOME" "/tmp")
  4171. #t))
  4172. (add-after 'build 'build-extra
  4173. (lambda _
  4174. (invoke "python3" "./setup.py" "build_i18n")
  4175. (invoke "python3" "horizons/engine/generate_atlases.py" "2048")
  4176. #t))
  4177. (add-after 'install 'patch
  4178. (lambda* (#:key outputs #:allow-other-keys)
  4179. (let ((out (assoc-ref outputs "out")))
  4180. (substitute* (string-append out "/bin/unknown-horizons")
  4181. (("os\\.chdir\\(get\\_content\\_dir\\_parent_path\\(\\)\\)")
  4182. (string-append "os.chdir(\""
  4183. (assoc-ref outputs "out")
  4184. "/share/unknown-horizons\")"))))
  4185. #t))
  4186. (add-before 'check 'fix-tests-with-pytest>=4
  4187. (lambda _
  4188. (substitute* "tests/conftest.py"
  4189. (("pytest_namespace")
  4190. "pytest_configure")
  4191. (("get_marker")
  4192. "get_closest_marker"))
  4193. #t))
  4194. ;; TODO: Run GUI tests as well
  4195. (replace 'check
  4196. (lambda _
  4197. (substitute* "horizons/constants.py"
  4198. (("IS_DEV_VERSION = False")
  4199. "IS_DEV_VERSION = True"))
  4200. (invoke "pytest" "tests")
  4201. (substitute* "horizons/constants.py"
  4202. (("IS_DEV_VERSION = True")
  4203. "IS_DEV_VERSION = False"))
  4204. #t)))))
  4205. (inputs
  4206. `(("fifengine" ,fifengine)
  4207. ("python:tk" ,python "tk")
  4208. ("python-pillow" ,python-pillow)
  4209. ("python-pyyaml" ,python-pyyaml)))
  4210. (native-inputs
  4211. (list intltool
  4212. python-distro
  4213. ;; Required for tests
  4214. python-greenlet
  4215. python-polib
  4216. python-pytest
  4217. python-pytest-mock))
  4218. (home-page "https://unknown-horizons.org/")
  4219. (synopsis "Isometric realtime strategy, economy and city building simulation")
  4220. (description
  4221. "Unknown Horizons is a 2D realtime strategy simulation with an emphasis
  4222. on economy and city building. Expand your small settlement to a strong and
  4223. wealthy colony, collect taxes and supply your inhabitants with valuable
  4224. goods. Increase your power with a well balanced economy and with strategic
  4225. trade and diplomacy.")
  4226. (license (list
  4227. license:gpl2+ ; Covers code
  4228. license:expat ; tests/dummy.py, ext/polib.py
  4229. license:cc-by-sa3.0 ; Covers some media content
  4230. license:cc-by3.0 ; Covers some media content
  4231. license:bsd-3)))) ; horizons/ext/speaklater.py
  4232. (define-public gnujump
  4233. (package
  4234. (name "gnujump")
  4235. (version "1.0.8")
  4236. (source (origin
  4237. (method url-fetch)
  4238. (uri (string-append "mirror://gnu/gnujump/gnujump-"
  4239. version ".tar.gz"))
  4240. (sha256
  4241. (base32
  4242. "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"))))
  4243. (build-system gnu-build-system)
  4244. (arguments
  4245. '(#:phases
  4246. (modify-phases %standard-phases
  4247. (add-before
  4248. 'configure 'link-libm
  4249. (lambda _ (setenv "LIBS" "-lm")))
  4250. (add-after 'install 'create-desktop-entry
  4251. (lambda* (#:key outputs #:allow-other-keys)
  4252. (let* ((out (assoc-ref outputs "out"))
  4253. (apps (string-append out "/share/applications")))
  4254. (mkdir-p apps)
  4255. (with-output-to-file
  4256. (string-append apps "/gnujump.desktop")
  4257. (lambda _
  4258. (format #t
  4259. "[Desktop Entry]~@
  4260. Name=GNUjump~@
  4261. Comment=Jump up the tower to survive~@
  4262. Exec=~a/bin/gnujump~@
  4263. Terminal=false~@
  4264. Type=Application~@
  4265. Categories=Game;ArcadeGame~%"
  4266. out)))))))))
  4267. (inputs
  4268. (list glu mesa sdl sdl-image sdl-mixer))
  4269. (home-page "http://gnujump.es.gnu.org/")
  4270. (synopsis
  4271. "Game of jumping to the next floor, trying not to fall")
  4272. (description
  4273. "GNUjump is a simple, yet addictive game in which you must jump from
  4274. platform to platform to avoid falling, while the platforms drop at faster rates
  4275. the higher you go. The game features multiplayer, unlimited FPS, smooth floor
  4276. falling, themeable graphics and sounds, and replays.")
  4277. (license license:gpl3+)))
  4278. (define-public wesnoth
  4279. (package
  4280. (name "wesnoth")
  4281. (version "1.16.6")
  4282. (source (origin
  4283. (method git-fetch)
  4284. (uri (git-reference
  4285. (url "https://github.com/wesnoth/wesnoth")
  4286. (commit version)))
  4287. (file-name (string-append name "-" version ".tar.bz2"))
  4288. (sha256
  4289. (base32
  4290. "0hfvxmdnwn86w254blbjacia342j47rhhahm6ca79la9d04rlz3m"))))
  4291. (build-system cmake-build-system)
  4292. (arguments
  4293. (list #:tests? #f)) ;no test target
  4294. (inputs
  4295. (list boost
  4296. dbus
  4297. fribidi
  4298. libvorbis
  4299. openssl
  4300. pango
  4301. (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
  4302. (native-inputs
  4303. (list gettext-minimal
  4304. pkg-config))
  4305. (home-page "https://www.wesnoth.org/")
  4306. (synopsis "Turn-based strategy game")
  4307. (description
  4308. "The Battle for Wesnoth is a fantasy, turn based tactical strategy game,
  4309. with several single player campaigns, and multiplayer games (both networked and
  4310. local).
  4311. Battle for control on a range of maps, using variety of units which have
  4312. advantages and disadvantages against different types of attacks. Units gain
  4313. experience and advance levels, and are carried over from one scenario to the
  4314. next campaign.")
  4315. (license license:gpl2+)))
  4316. (define-public wesnoth-server
  4317. (package
  4318. (inherit wesnoth)
  4319. (name "wesnoth-server")
  4320. (inputs
  4321. (list boost icu4c openssl sdl2))
  4322. (arguments
  4323. `(#:configure-flags '("-DENABLE_GAME=OFF")
  4324. ,@(package-arguments wesnoth)))
  4325. (synopsis "Dedicated @emph{Battle for Wesnoth} server")
  4326. (description "This package contains a dedicated server for @emph{The
  4327. Battle for Wesnoth}.")))
  4328. (define-public gamine
  4329. (package
  4330. (name "gamine")
  4331. (version "1.6")
  4332. (source (origin
  4333. (method url-fetch)
  4334. (uri (string-append "mirror://sourceforge/gamine-game/"
  4335. "gamine-" version ".tar.gz"))
  4336. (sha256
  4337. (base32
  4338. "1sc6f4445ciigd6yw0ri92746k4hk6ps0bvj9fm1gbp3c3fslk5n"))))
  4339. (build-system gnu-build-system)
  4340. (native-inputs
  4341. (list pkg-config intltool))
  4342. (inputs
  4343. (list gstreamer
  4344. gst-plugins-base ; playbin plugin
  4345. gst-plugins-good ; for wav playback
  4346. gtk+))
  4347. (arguments
  4348. `(#:tests? #f
  4349. #:make-flags
  4350. (let ((out (assoc-ref %outputs "out")))
  4351. (list (string-append "PREFIX=" out)
  4352. (string-append "SYSCONFDIR=" out "/etc")))
  4353. #:phases
  4354. (modify-phases %standard-phases
  4355. (delete 'configure)
  4356. (add-after
  4357. 'install 'wrap-gamine
  4358. (lambda* (#:key outputs #:allow-other-keys)
  4359. (let ((out (assoc-ref outputs "out"))
  4360. (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
  4361. (wrap-program (string-append out "/bin/gamine")
  4362. `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
  4363. #t)))))
  4364. (home-page "http://gamine-game.sourceforge.net/")
  4365. (synopsis "Mouse and keyboard discovery for children")
  4366. (description
  4367. "Gamine is a game designed for young children who are learning to use the
  4368. mouse and keyboard. The child uses the mouse to draw colored dots and lines
  4369. on the screen and keyboard to display letters.")
  4370. ;; Most files under gpl2+ or gpl3+, but eat.wav under gpl3
  4371. (license license:gpl3)))
  4372. (define-public manaplus
  4373. (package
  4374. (name "manaplus")
  4375. (version "1.9.3.23")
  4376. (source (origin
  4377. (method url-fetch)
  4378. (uri (string-append
  4379. "https://repo.manaplus.org/manaplus/download/"
  4380. version "/manaplus-" version ".tar.xz"))
  4381. (sha256
  4382. (base32
  4383. "1ky182p4svwdqm6cf7jbns85hidkhkhq4s17cs2p381f0klapfjz"))))
  4384. (build-system gnu-build-system)
  4385. (arguments
  4386. '(#:configure-flags
  4387. (list (string-append "CPPFLAGS=-I"
  4388. (assoc-ref %build-inputs "sdl-union")
  4389. "/include/SDL"))))
  4390. (native-inputs
  4391. (list pkg-config))
  4392. (inputs
  4393. (list glu curl libxml2 mesa
  4394. (sdl-union)))
  4395. (home-page "https://manaplus.org")
  4396. (synopsis "Client for 'The Mana World' and similar games")
  4397. (description
  4398. "ManaPlus is a 2D MMORPG client for game servers. It is the only
  4399. fully supported client for @uref{http://www.themanaworld.org, The mana
  4400. world}, @uref{http://evolonline.org, Evol Online} and
  4401. @uref{http://landoffire.org, Land of fire}.")
  4402. ;; "src/debug/*" and "src/sdl2gfx/*" are under Zlib.
  4403. ;; "data/themes/{golden-delicious,jewelry}/*" are under CC-BY-SA.
  4404. ;; The rest is under GPL2+.
  4405. (license (list license:gpl2+ license:zlib license:cc-by-sa4.0))))
  4406. (define openttd-engine
  4407. (package
  4408. (name "openttd-engine")
  4409. (version "13.1")
  4410. (source
  4411. (origin (method url-fetch)
  4412. (uri (string-append "https://cdn.openttd.org/openttd-releases/"
  4413. version "/openttd-" version "-source.tar.xz"))
  4414. (sha256
  4415. (base32
  4416. "1fsq1azddk1l11w89r93mgmhna34kvarfak7xy2q48rmf39j5psy"))))
  4417. (build-system cmake-build-system)
  4418. (inputs
  4419. (list allegro
  4420. fontconfig
  4421. freetype
  4422. icu4c
  4423. libpng
  4424. lzo
  4425. sdl
  4426. xz
  4427. zlib))
  4428. (synopsis "Transportation economics simulator game")
  4429. (description "OpenTTD is a game in which you transport goods and
  4430. passengers by land, water and air. It is a re-implementation of Transport
  4431. Tycoon Deluxe with many enhancements including multiplayer mode,
  4432. internationalization support, conditional orders and the ability to clone,
  4433. autoreplace and autoupdate vehicles. This package only includes the game
  4434. engine. When you start it you will be prompted to download a graphics set.")
  4435. (home-page "https://www.openttd.org/")
  4436. ;; This package is GPLv2, except for a few files located in
  4437. ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib
  4438. ;; licenses. In addition, this software contains an in-game downloader
  4439. ;; from which the user may find non-functional data licensed under
  4440. ;; different terms.
  4441. (license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
  4442. (define openttd-opengfx
  4443. (package
  4444. (name "openttd-opengfx")
  4445. (version "7.1")
  4446. (source
  4447. (origin
  4448. (method url-fetch)
  4449. (uri (string-append "https://cdn.openttd.org/opengfx-releases/"
  4450. version "/opengfx-" version "-source.tar.xz"))
  4451. (sha256
  4452. (base32
  4453. "0nhzlk6s73qvznm5fdwcs1b42g2plf26s5ag39fvck45zm7m48jk"))))
  4454. (build-system gnu-build-system)
  4455. (arguments
  4456. (list
  4457. #:make-flags
  4458. #~(list (string-append "CC=" #$(cc-for-target))
  4459. (string-append "INSTALL_DIR="
  4460. #$output
  4461. "/share/games/openttd/baseset/opengfx"))
  4462. #:phases
  4463. #~(modify-phases %standard-phases
  4464. (replace 'configure
  4465. (lambda _
  4466. ;; Make sure HOME is writable for GIMP.
  4467. (setenv "HOME" (getcwd))
  4468. (mkdir-p ".local/share")
  4469. (symlink (string-append #$(this-package-native-input "shared-mime-info")
  4470. "/share/mime")
  4471. ".local/share/mime")
  4472. ;; Redirect stdout, not stderr, to /dev/null. This prevents
  4473. ;; dos2unix from receiving its version information as a flag.
  4474. (substitute* "Makefile"
  4475. (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
  4476. "$(UNIX2DOS) -q --version 1>/dev/null")))))
  4477. ;; The check phase for this package only checks the md5sums of the built
  4478. ;; GRF files against the md5sums of the release versions. Because we use
  4479. ;; different software versions than upstream does, some of the md5sums
  4480. ;; are different. However, the package is still reproducible, it's safe
  4481. ;; to disable this test.
  4482. #:tests? #f
  4483. #:parallel-build? #f))
  4484. (native-inputs
  4485. (list dos2unix
  4486. shared-mime-info
  4487. gimp
  4488. grfcodec
  4489. nml
  4490. which
  4491. python))
  4492. (home-page "http://dev.openttdcoop.org/projects/opengfx")
  4493. (synopsis "Base graphics set for OpenTTD")
  4494. (description
  4495. "The OpenGFX project is an implementation of the OpenTTD base graphics
  4496. set that aims to ensure the best possible out-of-the-box experience.
  4497. OpenGFX provides you with...
  4498. @enumerate
  4499. @item All graphics you need to enjoy OpenTTD.
  4500. @item Uniquely drawn rail vehicles for every climate.
  4501. @item Completely snow-aware rivers.
  4502. @item Different river and sea water.
  4503. @item Snow-aware buoys.
  4504. @end enumerate")
  4505. (license license:gpl2)))
  4506. (define openttd-opensfx
  4507. (package
  4508. (name "openttd-opensfx")
  4509. (version "1.0.2")
  4510. (source
  4511. (origin
  4512. (method url-fetch)
  4513. (uri (string-append
  4514. "https://cdn.openttd.org/opensfx-releases/"
  4515. version "/opensfx-" version "-source.tar.xz"))
  4516. (sha256
  4517. (base32
  4518. "0aym026lg0r7dp3jxxs9c0rj8lwy1fz3v9hmk3mml6sycsg3fv42"))))
  4519. (build-system gnu-build-system)
  4520. (native-inputs
  4521. (list catcodec
  4522. python
  4523. tar))
  4524. (arguments
  4525. (list
  4526. #:make-flags
  4527. #~(list (string-append "DIR_NAME=opensfx")
  4528. (string-append "TAR="
  4529. (search-input-file %build-inputs "/bin/tar")))
  4530. ;; The check phase only verifies md5sums, see openttd-opengfx.
  4531. #:tests? #f
  4532. #:phases
  4533. #~(modify-phases %standard-phases
  4534. (add-after 'unpack 'make-reproducible
  4535. (lambda _
  4536. ;; Remove the time dependency of the installed tarball by setting
  4537. ;; the modification times if its members to 0.
  4538. (substitute* "scripts/Makefile.def"
  4539. (("-cf") " --mtime=@0 -cf"))))
  4540. (delete 'configure)
  4541. (add-before 'build 'prebuild
  4542. (lambda _ (invoke "make" "opensfx.cat")))
  4543. (replace 'install
  4544. (lambda* (#:key outputs #:allow-other-keys)
  4545. (copy-recursively "opensfx"
  4546. (string-append (assoc-ref outputs "out")
  4547. "/share/games/openttd/baseset"
  4548. "/opensfx")))))))
  4549. (home-page "http://dev.openttdcoop.org/projects/opensfx")
  4550. (synopsis "Base sounds for OpenTTD")
  4551. (description "OpenSFX is a set of free base sounds for OpenTTD which make
  4552. it possible to play OpenTTD without requiring the proprietary sound files from
  4553. the original Transport Tycoon Deluxe.")
  4554. (license license:cc-by-sa3.0)))
  4555. (define openttd-openmsx
  4556. (package
  4557. (name "openttd-openmsx")
  4558. (version "0.4.2")
  4559. (source
  4560. (origin
  4561. (method url-fetch)
  4562. (uri (string-append
  4563. "https://cdn.openttd.org/openmsx-releases/"
  4564. version "/openmsx-" version "-source.tar.xz"))
  4565. (sha256
  4566. (base32
  4567. "0h583d8fxy78kc3jvpp78r76a48qhxrhm4q7jbnj74aw0kwrcl8g"))))
  4568. (build-system gnu-build-system)
  4569. (native-inputs
  4570. (list grfcodec
  4571. ;; Scripts are Python3 compatible, but call the interpreter as
  4572. ;; python instead of python3.
  4573. python-wrapper
  4574. tar))
  4575. (arguments
  4576. (list
  4577. #:make-flags
  4578. #~(list (string-append "DIR_NAME=openmsx")
  4579. (string-append "TAR="
  4580. (search-input-file %build-inputs "/bin/tar")))
  4581. ;; The check phase only verifies md5sums, see openttd-opengfx.
  4582. #:tests? #f
  4583. #:phases
  4584. #~(modify-phases %standard-phases
  4585. (delete 'configure)
  4586. (replace 'install
  4587. (lambda* (#:key outputs #:allow-other-keys)
  4588. (copy-recursively "openmsx"
  4589. (string-append (assoc-ref outputs "out")
  4590. "/share/games/openttd/baseset"
  4591. "/openmsx")))))))
  4592. (home-page "http://dev.openttdcoop.org/projects/openmsx")
  4593. (synopsis "Music set for OpenTTD")
  4594. (description "OpenMSX is a music set for OpenTTD which makes it possible
  4595. to play OpenTTD without requiring the proprietary music from the original
  4596. Transport Tycoon Deluxe.")
  4597. (license license:gpl2)))
  4598. (define-public openttd
  4599. (package
  4600. (inherit openttd-engine)
  4601. (name "openttd")
  4602. (arguments
  4603. (list
  4604. #:configure-flags
  4605. #~(list (string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin"))
  4606. #:phases
  4607. #~(modify-phases %standard-phases
  4608. (add-after 'unpack 'patch-sources
  4609. (lambda* (#:key inputs #:allow-other-keys)
  4610. (substitute* "src/music/fluidsynth.cpp"
  4611. (("default_sf\\[\\] = \\{" all)
  4612. (string-append all "
  4613. \t/* Guix hardcoded :P */
  4614. \t\"" (search-input-file inputs "/share/soundfonts/FreePatsGM.sf2") "\",
  4615. ")))))
  4616. (add-before 'check 'install-data
  4617. (lambda* (#:key inputs outputs #:allow-other-keys)
  4618. (let ((base "/share/games/openttd"))
  4619. (for-each
  4620. (lambda (dir)
  4621. ;; Copy the entire input, so as to not omit documentation
  4622. ;; etc.
  4623. (copy-recursively
  4624. (string-drop-right dir (string-length base))
  4625. (assoc-ref outputs "out")))
  4626. (search-path-as-list (list base) (map cdr inputs)))))))))
  4627. (inputs
  4628. (modify-inputs (package-inputs openttd-engine)
  4629. (prepend fluidsynth freepats-gm)))
  4630. (native-inputs
  4631. (modify-inputs (package-native-inputs openttd-engine)
  4632. (prepend openttd-opengfx openttd-openmsx openttd-opensfx)))))
  4633. (define openrct2-title-sequences
  4634. (package
  4635. (name "openrct2-title-sequences")
  4636. (version "0.1.2")
  4637. (source
  4638. (origin
  4639. (method url-fetch)
  4640. (uri (string-append "https://github.com/OpenRCT2/title-sequences/releases/download/v"
  4641. version "/title-sequence-v" version ".zip"))
  4642. (file-name (string-append name "-" version ".zip"))
  4643. (sha256
  4644. (base32
  4645. "0qbyxrsw8hlgaq0r5d7lx7an3idy4qbfv7yiw9byhldk763n9cfw"))))
  4646. (build-system trivial-build-system)
  4647. (native-inputs
  4648. `(("bash" ,bash)
  4649. ("coreutils" ,coreutils)
  4650. ("unzip" ,unzip)))
  4651. (arguments
  4652. `(#:modules ((guix build utils))
  4653. #:builder
  4654. (begin
  4655. (use-modules (guix build utils))
  4656. (let* ((out (assoc-ref %outputs "out"))
  4657. (openrct2-title-sequences (string-append out
  4658. "/share/openrct2/title-sequences"))
  4659. (source (assoc-ref %build-inputs "source"))
  4660. (unzip (search-input-file %build-inputs "/bin/unzip")))
  4661. (copy-file source (string-append ,name "-" ,version ".zip"))
  4662. (invoke unzip (string-append ,name "-" ,version ".zip"))
  4663. (delete-file (string-append ,name "-" ,version ".zip"))
  4664. (mkdir-p openrct2-title-sequences)
  4665. (copy-recursively "."
  4666. openrct2-title-sequences)
  4667. #t))))
  4668. (home-page "https://github.com/OpenRCT2/OpenRCT2")
  4669. (synopsis "Title sequences for OpenRCT2")
  4670. (description
  4671. "openrct2-title-sequences is a set of title sequences for OpenRCT2.")
  4672. (license license:gpl3+)))
  4673. (define openrct2-objects
  4674. (package
  4675. (name "openrct2-objects")
  4676. (version "1.0.20")
  4677. (source
  4678. (origin
  4679. (method url-fetch)
  4680. (uri (string-append "https://github.com/OpenRCT2/objects/releases/download/v"
  4681. version "/objects.zip"))
  4682. (file-name (string-append name "-" version ".zip"))
  4683. (sha256
  4684. (base32 "1q7a38kcwrfijav6app1gf253yfv8b0rljbkah8040y6i7snw9mw"))))
  4685. (build-system trivial-build-system)
  4686. (native-inputs
  4687. `(("bash" ,bash)
  4688. ("coreutils" ,coreutils)
  4689. ("unzip" ,unzip)))
  4690. (arguments
  4691. `(#:modules ((guix build utils))
  4692. #:builder
  4693. (begin
  4694. (use-modules (guix build utils))
  4695. (let* ((out (assoc-ref %outputs "out"))
  4696. (openrct2-objects (string-append out
  4697. "/share/openrct2/objects"))
  4698. (source (assoc-ref %build-inputs "source"))
  4699. (unzip (search-input-file %build-inputs "/bin/unzip")))
  4700. (copy-file source (string-append ,name "-" ,version ".zip"))
  4701. (invoke unzip (string-append ,name "-" ,version ".zip"))
  4702. (delete-file (string-append ,name "-" ,version ".zip"))
  4703. (mkdir-p openrct2-objects)
  4704. (copy-recursively "."
  4705. openrct2-objects)
  4706. #t))))
  4707. (home-page "https://github.com/OpenRCT2/OpenRCT2")
  4708. (synopsis "Objects for OpenRCT2")
  4709. (description
  4710. "openrct2-objects is a set of objects for OpenRCT2.")
  4711. (license license:gpl3+)))
  4712. (define-public openrct2
  4713. (package
  4714. (name "openrct2")
  4715. (version "0.3.3")
  4716. (source
  4717. (origin
  4718. (method git-fetch)
  4719. (uri (git-reference
  4720. (url "https://github.com/OpenRCT2/OpenRCT2")
  4721. (commit (string-append "v" version))))
  4722. (file-name (git-file-name name version))
  4723. (sha256
  4724. (base32 "01nanpbz5ycdhkyd46fjfvj18sw729l4vk7xg12600f9rjngjk76"))))
  4725. (build-system cmake-build-system)
  4726. (arguments
  4727. `(#:configure-flags (list "-DDOWNLOAD_OBJECTS=OFF"
  4728. "-DDOWNLOAD_TITLE_SEQUENCES=OFF")
  4729. #:tests? #f ; tests require network access
  4730. #:phases
  4731. (modify-phases %standard-phases
  4732. (add-after 'unpack 'fix-usr-share-paths&add-data
  4733. (lambda* (#:key inputs outputs #:allow-other-keys)
  4734. (let ((titles (assoc-ref inputs "openrct2-title-sequences"))
  4735. (objects (assoc-ref inputs "openrct2-objects")))
  4736. ;; Fix some references to /usr/share.
  4737. (substitute* "src/openrct2/platform/Platform.Linux.cpp"
  4738. (("/usr/share")
  4739. (string-append (assoc-ref %outputs "out") "/share")))
  4740. (copy-recursively
  4741. (string-append titles "/share/openrct2/title-sequences")
  4742. "data/title")
  4743. (copy-recursively
  4744. (string-append objects "/share/openrct2/objects")
  4745. "data/object"))))
  4746. (add-before 'configure 'get-rid-of-errors
  4747. (lambda _
  4748. ;; Don't treat warnings as errors.
  4749. (substitute* "CMakeLists.txt"
  4750. (("-Werror") ""))
  4751. #t)))))
  4752. (inputs `(("curl" ,curl)
  4753. ("duktape" ,duktape)
  4754. ("fontconfig" ,fontconfig)
  4755. ("freetype" ,freetype)
  4756. ("icu4c" ,icu4c)
  4757. ("jansson" ,jansson)
  4758. ("nlohmann-json" ,nlohmann-json)
  4759. ("libpng" ,libpng)
  4760. ("libzip" ,libzip)
  4761. ("mesa" ,mesa)
  4762. ("openrct2-objects" ,openrct2-objects)
  4763. ("openrct2-title-sequences" ,openrct2-title-sequences)
  4764. ("openssl" ,openssl)
  4765. ("sdl2" ,sdl2)
  4766. ("speexdsp" ,speexdsp)
  4767. ("zlib" ,zlib)))
  4768. (native-inputs
  4769. (list pkg-config))
  4770. (home-page "https://github.com/OpenRCT2/OpenRCT2")
  4771. (synopsis "Free software re-implementation of RollerCoaster Tycoon 2")
  4772. (description "OpenRCT2 is a free software re-implementation of
  4773. RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and
  4774. maintaining an amusement park containing attractions, shops and facilities.
  4775. Note that this package does @emph{not} provide the game assets (sounds,
  4776. images, etc.)")
  4777. ;; See <https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files>
  4778. ;; regarding assets.
  4779. (license license:gpl3+)))
  4780. (define-public openriichi
  4781. (package
  4782. (name "openriichi")
  4783. (version "0.2.1.1")
  4784. (source (origin
  4785. (method git-fetch)
  4786. (uri (git-reference
  4787. (url "https://github.com/FluffyStuff/OpenRiichi")
  4788. (commit (string-append "v" version))
  4789. (recursive? #t)))
  4790. (file-name (git-file-name name version))
  4791. (sha256
  4792. (base32
  4793. "1x6m4mli92chns5dky9aq9w4r4pnycvlpa2q0giydapm5q9fkslf"))))
  4794. (build-system meson-build-system)
  4795. (arguments
  4796. '(#:configure-flags (list "--buildtype=release")
  4797. #:glib-or-gtk? #t))
  4798. (inputs (list glew
  4799. gtk+
  4800. libgee
  4801. sdl2
  4802. sdl2-image
  4803. sdl2-mixer))
  4804. (native-inputs (list pkg-config vala))
  4805. (home-page "https://github.com/FluffyStuff/OpenRiichi")
  4806. (synopsis "Japanese Mahjong client")
  4807. (description
  4808. "OpenRiichi is a client for playing Japanese Mahjong, and it supports
  4809. singleplayer and multiplayer, with or without bots. It features all the
  4810. standard riichi rules, as well as some optional ones. It also supports game
  4811. logging, so games can be viewed again.")
  4812. (license license:gpl3)))
  4813. (define-public pinball
  4814. (package
  4815. (name "pinball")
  4816. (version "0.3.20230219")
  4817. (source
  4818. (origin (method git-fetch)
  4819. (uri (git-reference
  4820. (url "https://github.com/adoptware/pinball")
  4821. (commit version)))
  4822. (file-name (git-file-name name version))
  4823. (sha256
  4824. (base32
  4825. "02by4df9hgda5zhl9p3rwg0s4mlxdr0v8f8dk152vjp43p1wqvfp"))
  4826. (patches (search-patches "pinball-system-ltdl.patch"))))
  4827. (build-system gnu-build-system)
  4828. (native-inputs
  4829. (list autoconf automake pkg-config libtool))
  4830. (inputs
  4831. (list glu
  4832. libltdl
  4833. mesa
  4834. (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
  4835. (arguments
  4836. (list
  4837. #:configure-flags
  4838. ;; Configure tries to use pkg-config, but falls short, so:
  4839. #~(list (string-append "CPPFLAGS=-I"
  4840. #$(this-package-input "sdl-union")
  4841. "/include/SDL2"))
  4842. #:phases
  4843. #~(modify-phases %standard-phases
  4844. (replace 'bootstrap
  4845. ;; The `bootstrap` script tries to call a script with
  4846. ;; `/usr/bin/make` in the shebang, but ultimately does the same as
  4847. ;; autoreconf would do, so just use that.
  4848. (lambda _
  4849. (symlink "README.md" "README")
  4850. (invoke "autoreconf" "-vif"))))))
  4851. (home-page "https://pinball.sourceforge.net")
  4852. (synopsis "Pinball simulator")
  4853. (description "The Emilia Pinball Project is a pinball simulator. There
  4854. are only two levels to play with, but they are very addictive.")
  4855. (license license:gpl2)))
  4856. (define-public pioneers
  4857. (package
  4858. (name "pioneers")
  4859. (version "15.6")
  4860. (source (origin
  4861. (method url-fetch)
  4862. (uri (string-append "https://downloads.sourceforge.net/pio/"
  4863. "pioneers-" version ".tar.gz"))
  4864. (sha256
  4865. (base32
  4866. "07b3xdd81n8ybsb4fzc5lx0813y9crzp1hj69khncf4faj48sdcs"))))
  4867. (build-system gnu-build-system)
  4868. (arguments
  4869. `(#:phases
  4870. (modify-phases %standard-phases
  4871. ;; Fixes https://issues.guix.gnu.org/47131.
  4872. (add-after 'unpack 'patch-beep-path
  4873. (lambda* (#:key inputs #:allow-other-keys)
  4874. (substitute* "client/gtk/audio.c"
  4875. (("\"beep\"")
  4876. (string-append "\"" (assoc-ref inputs "beep") "/bin/beep\"")))
  4877. #t)))))
  4878. (inputs (list avahi beep gtk+ librsvg))
  4879. (native-inputs (list intltool itstool libxml2 pkg-config))
  4880. (synopsis "Board game inspired by The Settlers of Catan")
  4881. (description "Pioneers is an emulation of the board game The Settlers of
  4882. Catan. It can be played on a local network, on the internet, and with AI
  4883. players.")
  4884. (home-page "https://pio.sourceforge.net/")
  4885. (license license:gpl2+)))
  4886. (define-public einstein
  4887. (package
  4888. (name "einstein")
  4889. (version "2.0")
  4890. (source (origin
  4891. (method url-fetch)
  4892. (uri (string-append "mirror://debian/pool/main/e/"
  4893. "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
  4894. (sha256
  4895. (base32
  4896. "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
  4897. (patches (search-patches "einstein-build.patch"))))
  4898. (build-system gnu-build-system)
  4899. (inputs
  4900. `(("freetype" ,freetype)
  4901. ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf)))
  4902. ("zlib" ,zlib)))
  4903. (native-inputs
  4904. (list font-dejavu))
  4905. (arguments
  4906. `(#:tests? #f ; no check target
  4907. #:phases
  4908. (modify-phases %standard-phases
  4909. (replace 'configure
  4910. (lambda* (#:key outputs inputs #:allow-other-keys)
  4911. (let ((out (assoc-ref outputs "out"))
  4912. (dejavu (search-input-file
  4913. inputs "/share/fonts/truetype/DejaVuSans.ttf")))
  4914. (substitute* "Makefile"
  4915. (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
  4916. ;; The patch above registers a free font for use by the binary,
  4917. ;; but the font is copied during the compile phase into a
  4918. ;; resources file, so we need to make the ttf file available.
  4919. (symlink dejavu "res/DejaVuSans.ttf")
  4920. #t))))))
  4921. (synopsis "Logic puzzle game")
  4922. (description "The goal of this logic game is to open all cards in a 6x6
  4923. grid, using a number of hints as to their relative position. The game idea
  4924. is attributed to Albert Einstein.")
  4925. ;; The original home page has disappeared.
  4926. (home-page (string-append "http://web.archive.org/web/20120521062745/"
  4927. "http://games.flowix.com/en/index.html"))
  4928. ;; License according to
  4929. ;; http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
  4930. ;; The source code is a DFSG-sanitized tarball and does not contain any
  4931. ;; license information.
  4932. (license license:gpl3+)))
  4933. (define-public powwow
  4934. (package
  4935. (name "powwow")
  4936. (version "1.2.23")
  4937. (source (origin
  4938. (method url-fetch)
  4939. (uri (string-append
  4940. "https://www.hoopajoo.net/static/projects/powwow-"
  4941. version ".tar.gz"))
  4942. (sha256
  4943. (base32
  4944. "1wkl6j91pp40aps2hhnsv0bndgq49smfffws4hqcn7847bpnwwm6"))))
  4945. (inputs
  4946. (list ncurses))
  4947. (build-system gnu-build-system)
  4948. (home-page "https://www.hoopajoo.net/projects/powwow.html")
  4949. (synopsis "MUD and telnet client")
  4950. (description
  4951. "POWWOW is a client software which can be used for telnet as well as for
  4952. @dfn{Multi-User Dungeon} (MUD). Additionally it can serve as a nice client for
  4953. the chat server psyced with the specific config located at
  4954. http://lavachat.symlynx.com/unix/")
  4955. (license license:gpl2+)))
  4956. (define-public red-eclipse
  4957. (let ((release "2.0.0")
  4958. (revision 0))
  4959. (package
  4960. (name "red-eclipse")
  4961. (version (if (zero? revision)
  4962. release
  4963. (string-append release "-"
  4964. (number->string revision))))
  4965. (source
  4966. (origin
  4967. (method git-fetch)
  4968. (uri (git-reference
  4969. (url "https://github.com/redeclipse/base")
  4970. (commit (string-append "v" release))
  4971. (recursive? #t))) ; for game data
  4972. (file-name (git-file-name name version))
  4973. (sha256
  4974. (base32 "0sz0mqhwx8r9n4mk3qrxw420nlsm3y0n48gd0lazgd64lfqjh3ab"))
  4975. (modules '((guix build utils)))
  4976. (snippet
  4977. ;; Remove proprietary libraries and other pre-compiled binaries.
  4978. '(begin
  4979. (delete-file-recursively "bin")
  4980. #t))))
  4981. (build-system gnu-build-system)
  4982. (arguments
  4983. `(#:tests? #f ; no check target
  4984. #:make-flags (list "CC=gcc" "-Csrc"
  4985. (string-append "INSTDIR="
  4986. (assoc-ref %outputs "out") "/bin")
  4987. (string-append "prefix="
  4988. (assoc-ref %outputs "out")))
  4989. #:phases
  4990. (modify-phases %standard-phases
  4991. (add-after 'unpack 'add-store-data-package-path-as-default
  4992. (lambda* (#:key outputs #:allow-other-keys)
  4993. (substitute* "src/engine/server.cpp"
  4994. (("data = \"data\"")
  4995. (string-append "data = \""
  4996. (assoc-ref outputs "out")
  4997. "/share/redeclipse/data\"")))
  4998. #t))
  4999. (delete 'configure) ; no configure script
  5000. (add-after 'set-paths 'set-sdl-paths
  5001. (lambda* (#:key inputs #:allow-other-keys)
  5002. (setenv "CPATH"
  5003. (string-append
  5004. (search-input-directory inputs "/include/SDL2")
  5005. ":" (or (getenv "CPATH") "")))))
  5006. (add-after 'install 'copy-data
  5007. (lambda* (#:key outputs #:allow-other-keys)
  5008. (let ((out (assoc-ref outputs "out")))
  5009. (copy-recursively "config"
  5010. (string-append out "/config"))
  5011. (copy-file "doc/examples/servinit.cfg"
  5012. (string-append out "/config/servinit.cfg"))
  5013. (copy-recursively "data"
  5014. (string-append out "/share/redeclipse/data"))
  5015. (mkdir-p (string-append out "/lib/redeclipse"))
  5016. (symlink (string-append out "/share/redeclipse/data")
  5017. (string-append out "/lib/redeclipse/data")))
  5018. #t))
  5019. (add-after 'copy-data 'wrap-program
  5020. (lambda* (#:key inputs outputs #:allow-other-keys)
  5021. (let* ((out (assoc-ref outputs "out"))
  5022. (bin (string-append out "/bin")))
  5023. (with-directory-excursion bin
  5024. (rename-file "redeclipse_linux"
  5025. ".redeclipse_linux-real")
  5026. (rename-file "redeclipse_server_linux"
  5027. ".redeclipse_server_linux-real")
  5028. (call-with-output-file "redeclipse_linux"
  5029. (lambda (port)
  5030. (format port "#!~a/bin/sh
  5031. # Run the thing from its home, otherwise it just bails out.
  5032. cd \"~a\"
  5033. exec -a \"$0\" ~a/.redeclipse_linux-real~%"
  5034. (assoc-ref inputs "bash") ;implicit input
  5035. (string-append out)
  5036. (string-append bin))))
  5037. (call-with-output-file "redeclipse_server_linux"
  5038. (lambda (port)
  5039. (format port "#!~a/bin/sh
  5040. # Run the thing from its home, otherwise it just bails out.
  5041. cd \"~a\"
  5042. exec -a \"$0\" ~a/.redeclipse_server_linux-real~%"
  5043. (assoc-ref inputs "bash") ;implicit input
  5044. (string-append out)
  5045. (string-append bin))))
  5046. (chmod "redeclipse_linux" #o555)
  5047. (chmod "redeclipse_server_linux" #o555)))
  5048. #t)))))
  5049. (native-inputs
  5050. (list pkg-config))
  5051. (inputs
  5052. (list curl freetype glu
  5053. (sdl-union (list sdl2 sdl2-image sdl2-mixer))))
  5054. (home-page "https://redeclipse.net/")
  5055. (synopsis "Arena shooter derived from the Cube 2 engine")
  5056. (description
  5057. "Red Eclipse is an arena shooter, created from the Cube2 engine.
  5058. Offering an innovative parkour system and distinct but all potent weapons,
  5059. Red Eclipse provides fast paced and accessible gameplay.")
  5060. ;; The engine is under Zlib; data files are covered by the other
  5061. ;; licenses. More details at file:///doc/all-licenses.txt.
  5062. (license (list license:expat
  5063. license:zlib
  5064. license:cc-by-sa4.0
  5065. license:cc-by-sa3.0
  5066. license:cc-by3.0
  5067. license:cc0
  5068. license:public-domain
  5069. license:silofl1.1)))))
  5070. (define-public grue-hunter
  5071. (package
  5072. (name "grue-hunter")
  5073. (version "1.0")
  5074. (source (origin
  5075. (method url-fetch)
  5076. (uri (string-append "https://jxself.org/grue-hunter.tar.gz"))
  5077. (sha256
  5078. (base32
  5079. "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
  5080. (build-system trivial-build-system) ; no Makefile.PL
  5081. (arguments `(#:modules ((guix build utils))
  5082. #:builder
  5083. (begin
  5084. (use-modules (guix build utils))
  5085. (use-modules (srfi srfi-1))
  5086. (let* ((tarball (assoc-ref %build-inputs "tarball"))
  5087. (perl (string-append (assoc-ref %build-inputs
  5088. "perl")
  5089. "/bin"))
  5090. (gzip (string-append (assoc-ref %build-inputs
  5091. "gzip")
  5092. "/bin/gzip"))
  5093. (tar (string-append (assoc-ref %build-inputs
  5094. "tar")
  5095. "/bin/tar"))
  5096. (out (assoc-ref %outputs "out"))
  5097. (bin (string-append out "/bin"))
  5098. (doc (string-append out
  5099. "/share/doc/grue-hunter")))
  5100. (copy-file tarball "grue-hunter.tar.gz")
  5101. (invoke gzip "-d" "grue-hunter.tar.gz")
  5102. (invoke tar "xvf" "grue-hunter.tar")
  5103. (mkdir-p bin)
  5104. (copy-file "grue-hunter/gh.pl"
  5105. (string-append bin "/grue-hunter"))
  5106. (patch-shebang (string-append bin "/grue-hunter")
  5107. (list perl))
  5108. (install-file "grue-hunter/AGPLv3.txt" doc)
  5109. #t))))
  5110. (inputs `(("perl" ,perl)
  5111. ("tar" ,tar)
  5112. ("gzip" ,gzip)
  5113. ("tarball" ,source)))
  5114. (home-page "https://jxself.org/grue-hunter.shtml")
  5115. (synopsis "Text adventure game")
  5116. (description
  5117. "Grue Hunter is a text adventure game written in Perl. You must make
  5118. your way through an underground cave system in search of the Grue. Can you
  5119. capture it and get out alive?")
  5120. (license license:agpl3+)))
  5121. (define-public lierolibre
  5122. (package
  5123. (name "lierolibre")
  5124. (version "0.5")
  5125. (source (origin
  5126. (method url-fetch)
  5127. (uri (string-append "https://launchpad.net/lierolibre/trunk/"
  5128. version "/+download/lierolibre-"
  5129. version ".tar.xz"))
  5130. (sha256
  5131. (base32
  5132. "1cf1gvsn4qq190lrf9k5bpjnqwlcfw7pajvdnh7z5r4jqw0rsbl9"))
  5133. (patches
  5134. (search-patches "lierolibre-check-unaligned-access.patch"
  5135. "lierolibre-try-building-other-arch.patch"
  5136. "lierolibre-remove-arch-warning.patch"
  5137. "lierolibre-newer-libconfig.patch"
  5138. "lierolibre-is-free-software.patch"))
  5139. (modules '((guix build utils)))
  5140. (snippet
  5141. '(begin
  5142. ;; Delete pre-compiled files.
  5143. (delete-file "data/LIERO.CHR")
  5144. (delete-file "data/LIERO.SND")
  5145. #t))))
  5146. (build-system gnu-build-system)
  5147. (native-inputs
  5148. (list imagemagick pkg-config util-linux sox))
  5149. (inputs
  5150. (list boost libconfig
  5151. (sdl-union (list sdl sdl-image sdl-mixer)) zlib))
  5152. (home-page "https://gitlab.com/lierolibre/lierolibre")
  5153. (synopsis "Old-school earthworm action game")
  5154. (description
  5155. "lierolibre is an earthworm action game where you fight another player
  5156. (or the computer) underground using a wide array of weapons.
  5157. Features:
  5158. @itemize
  5159. @item 2 worms, 40 weapons, great playability, two game modes: Kill'em All
  5160. and Game of Tag, plus AI-players without true intelligence!
  5161. @item Dat nostalgia.
  5162. @item Extensions via a hidden F1 menu:
  5163. @itemize
  5164. @item Replays
  5165. @item Game controller support
  5166. @item Powerlevel palettes
  5167. @end itemize
  5168. @item Ability to write game variables to plain text files.
  5169. @item Ability to load game variables from both EXE and plain text files.
  5170. @item Scripts to extract and repack graphics, sounds and levels.
  5171. @end itemize
  5172. To switch between different window sizes, use F6, F7 and F8, to switch to
  5173. fullscreen, use F5 or Alt+Enter.")
  5174. ;; Code mainly BSD-2, some parts under Boost 1.0. All assets are WTFPL2.
  5175. (license (list license:bsd-2 license:boost1.0 license:wtfpl2))))
  5176. (define-public tennix
  5177. (package
  5178. (name "tennix")
  5179. (version "1.3.1")
  5180. (source
  5181. (origin
  5182. (method git-fetch)
  5183. (uri (git-reference
  5184. (url "https://repo.or.cz/tennix.git")
  5185. (commit (string-append "tennix-" version))))
  5186. (file-name (git-file-name name version))
  5187. (sha256
  5188. (base32 "02cj4lrdrisal5s9pnbf2smx7qz9czczjzndfkhfx0qy67b957sk"))
  5189. ;; Remove non-free images.
  5190. (modules '((guix build utils)))
  5191. (snippet
  5192. '(begin
  5193. (for-each delete-file
  5194. '("data/loc_training_camp.png"
  5195. "data/loc_austrian_open.png"
  5196. "data/loc_olympic_green_tennis.png"))
  5197. #t))))
  5198. (build-system gnu-build-system)
  5199. (arguments
  5200. `(#:tests? #f ;no test
  5201. #:phases
  5202. (modify-phases %standard-phases
  5203. (add-after 'unpack 'fix-include
  5204. (lambda _
  5205. (substitute* '("src/graphics.h" "src/sound.h")
  5206. (("#include \"(SDL_(image|ttf|mixer)\\.h)\"" _ header)
  5207. (string-append "#include \"SDL/" header "\"")))
  5208. (substitute* '("src/tennix.h" "src/network.h" "src/SDL_rotozoom.h")
  5209. (("#include <SDL.h>") "#include <SDL/SDL.h>")
  5210. (("#include <SDL_net.h>") "#include <SDL/SDL_net.h>"))
  5211. #t))
  5212. (add-after 'unpack 'locate-install
  5213. ;; Build process cannot expand "$(INSTALL)" in Makefile.
  5214. (lambda _
  5215. (substitute* "makefile"
  5216. (("^CONFIGURE_OUTPUT :=.*" all)
  5217. (string-append "INSTALL := install -c\n" all)))
  5218. #t))
  5219. (replace 'configure
  5220. ;; The "configure" script is picky about the arguments it
  5221. ;; gets. Call it ourselves.
  5222. (lambda _
  5223. (invoke "./configure" "--prefix" (assoc-ref %outputs "out")))))))
  5224. (native-inputs
  5225. (list which))
  5226. (inputs
  5227. `(("python" ,python-wrapper)
  5228. ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-ttf sdl-net)))))
  5229. (home-page "https://icculus.org/tennix/")
  5230. (synopsis "Play tennis against the computer or a friend")
  5231. (description "Tennix is a 2D tennis game. You can play against the
  5232. computer or against another player using the keyboard. The game runs
  5233. in-window at 640x480 resolution or fullscreen.")
  5234. ;; Project is licensed under GPL2+ terms. It includes images
  5235. ;; released under Public Domain terms, and SDL_rotozoom, released
  5236. ;; under LGPL2.1 terms.
  5237. (license (list license:gpl2+ license:public-domain license:lgpl2.1))))
  5238. (define-public warzone2100
  5239. (package
  5240. (name "warzone2100")
  5241. (version "4.3.5")
  5242. (source
  5243. (origin
  5244. (method url-fetch)
  5245. (uri (string-append "mirror://sourceforge/warzone2100/releases/"
  5246. version
  5247. "/warzone2100_src.tar.xz"))
  5248. (sha256
  5249. (base32 "1hq56hm6bn3s2pksznh5g8hgq6ww6fnl1pspr3bi93k3z7v0imh1"))
  5250. (modules '((guix build utils)))
  5251. (snippet
  5252. '(begin
  5253. (with-directory-excursion "3rdparty"
  5254. (for-each
  5255. delete-file-recursively
  5256. '("discord-rpc"
  5257. "miniupnp"
  5258. "utfcpp")))
  5259. #t))))
  5260. (build-system cmake-build-system)
  5261. (arguments
  5262. (list #:configure-flags #~'("-DWZ_DISTRIBUTOR=Guix"
  5263. "-DWZ_ENABLE_BACKEND_VULKAN=off"
  5264. "-DENABLE_DISCORD=off")
  5265. #:tests? #f ; TODO: Tests seem to be broken, configure.ac is missing.
  5266. #:phases
  5267. #~(modify-phases %standard-phases
  5268. (add-after 'unpack 'fix-utfcpp-include
  5269. (lambda _
  5270. (substitute* "lib/framework/wzstring.cpp"
  5271. (("<utfcpp/source/utf8.h>")
  5272. "<utf8.h>"))))
  5273. (add-after 'unpack 'link-tests-with-qt
  5274. (lambda _
  5275. (substitute* "tests/Makefile.am"
  5276. (("(framework_linktest_LDADD|maptest_LDADD) = "
  5277. prefix)
  5278. (string-append prefix "$(QT5_LIBS) ")))))
  5279. (add-after 'unpack 'fix-ivis-linktest
  5280. (lambda _
  5281. (substitute* "tests/ivis_linktest.cpp"
  5282. (("iV_DrawTextRotated.*;")
  5283. (string-append
  5284. "iV_DrawTextRotated(\"Press ESC to exit.\", "
  5285. "100, 100, 0.0f, font_regular);"))))))))
  5286. (native-inputs (list asciidoc
  5287. ruby-asciidoctor
  5288. gettext-minimal
  5289. pkg-config
  5290. unzip
  5291. ;; 7z is used to create .zip archive, not `zip' as in version 3.2.*.
  5292. p7zip))
  5293. (inputs (list opus
  5294. curl
  5295. fontconfig
  5296. freetype
  5297. glew
  5298. harfbuzz
  5299. libtheora
  5300. libvorbis
  5301. libxrandr
  5302. libsodium
  5303. miniupnpc
  5304. openal
  5305. physfs
  5306. qtbase-5
  5307. qtscript
  5308. openssl
  5309. sdl2
  5310. sqlite
  5311. utfcpp))
  5312. (home-page "https://wz2100.net")
  5313. (synopsis "3D Real-time strategy and real-time tactics game")
  5314. (description
  5315. "Warzone 2100 offers campaign, multi-player, and single-player skirmish
  5316. modes. An extensive tech tree with over 400 different technologies, combined
  5317. with the unit design system, allows for a wide variety of possible units and
  5318. tactics.")
  5319. ;; Everything is GPLv2+ unless otherwise specified in COPYING.NONGPL
  5320. (license (list license:bsd-3
  5321. license:cc0
  5322. license:cc-by-sa3.0
  5323. license:expat
  5324. license:gpl2+
  5325. license:lgpl2.1+))))
  5326. (define-public widelands
  5327. (package
  5328. (name "widelands")
  5329. (version "1.1")
  5330. (source
  5331. (origin
  5332. (method git-fetch)
  5333. (uri (git-reference
  5334. (url "https://github.com/widelands/widelands")
  5335. (commit (string-append "v" version))))
  5336. (file-name (git-file-name name version))
  5337. (sha256
  5338. (base32 "07wbalwdmml9vdh9nh50svnsw4sdj9nnp32azbss8vzq5mxmzvbx"))
  5339. (modules '((guix build utils)))
  5340. (snippet
  5341. '(begin
  5342. (delete-file-recursively "src/third_party/minizip")
  5343. #t))))
  5344. (build-system cmake-build-system)
  5345. (arguments
  5346. `(#:configure-flags
  5347. (let* ((out (assoc-ref %outputs "out"))
  5348. (share (string-append out "/share")))
  5349. (list (string-append "-DCMAKE_INSTALL_PREFIX=" out "/bin")
  5350. (string-append "-DWL_INSTALL_BASEDIR=" share "/widelands")
  5351. (string-append "-DWL_INSTALL_DATADIR=" share "/widelands")
  5352. "-DOPTION_BUILD_WEBSITE_TOOLS=OFF"
  5353. ;; CMakeLists.txt does not handle properly RelWithDebInfo build
  5354. ;; type. When used, no game data is installed!
  5355. "-DCMAKE_BUILD_TYPE=Release"))
  5356. #:phases
  5357. (modify-phases %standard-phases
  5358. (add-after 'unpack 'unbundle-fonts
  5359. ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are
  5360. ;; amiri, Culmus, mmrCensus, Nakula, and Sinhala.
  5361. (lambda* (#:key inputs #:allow-other-keys)
  5362. (with-directory-excursion "data/i18n/fonts"
  5363. (for-each (lambda (font)
  5364. (delete-file-recursively font)
  5365. (symlink (string-append (assoc-ref inputs font)
  5366. "/share/fonts/truetype")
  5367. font))
  5368. '("DejaVu" "MicroHei")))
  5369. #t)))))
  5370. (native-inputs
  5371. `(("gettext" ,gettext-minimal)
  5372. ("pkg-config" ,pkg-config)
  5373. ("python" ,python-wrapper)))
  5374. (inputs
  5375. `(("asio" ,asio)
  5376. ("curl" ,curl)
  5377. ("boost" ,boost)
  5378. ("glew" ,glew)
  5379. ("icu4c" ,icu4c)
  5380. ("libpng" ,libpng)
  5381. ("minizip" ,minizip)
  5382. ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
  5383. ("zlib" ,zlib)
  5384. ;; Fonts for the ‘unbundle-fonts’ phase. Case matters in name!
  5385. ("DejaVu" ,font-dejavu)
  5386. ("MicroHei" ,font-wqy-microhei)))
  5387. (home-page "https://www.widelands.org/")
  5388. (synopsis "Fantasy real-time strategy game")
  5389. (description
  5390. "In Widelands, you are the regent of a small clan. You start out with
  5391. nothing but your headquarters, where all your resources are stored.
  5392. In the course of the game, you will build an ever growing settlement. Every
  5393. member of your clan will do his or her part to produce more resources---wood,
  5394. food, iron, gold and more---to further this growth. The economic network is
  5395. complex and different in the five tribes (Barbarians, Empire, Atlanteans,
  5396. Frisians and Amazons).
  5397. As you are not alone in the world, you will meet other clans sooner or later.
  5398. Some of them may be friendly and you may eventually trade with them. However,
  5399. if you want to rule the world, you will have to train soldiers and fight.
  5400. Widelands offers single-player mode with different campaigns; the campaigns
  5401. all tell stories of tribes and their struggle in the Widelands universe!
  5402. However, settling really starts when you unite with friends over the Internet
  5403. or LAN to build up new empires together---or to crush each other in the dusts
  5404. of war. Widelands also offers an Artificial Intelligence to challenge you.")
  5405. ;; Game is released as GPL2+. Some parts, e.g., art, are released under
  5406. ;; different licenses.
  5407. (license (list license:gpl2+
  5408. license:expat ;src/third_party/eris
  5409. license:silofl1.1 ;Widelands.ttf
  5410. license:cc-by-sa3.0)))) ;some music files
  5411. (define-public widelands-21
  5412. (package
  5413. (inherit widelands)
  5414. (version "21")
  5415. (properties `((superseded . ,widelands)))))
  5416. (define-public starfighter
  5417. (package
  5418. (name "starfighter")
  5419. (version "2.4")
  5420. (source (origin
  5421. (method url-fetch)
  5422. (uri (string-append
  5423. "https://github.com/pr-starfighter/starfighter/releases"
  5424. "/download/v" version "/starfighter-"
  5425. version "-src.tar.gz"))
  5426. (sha256
  5427. (base32
  5428. "0ips79j3sdy8wa64jqka0skbbqkzqiln9bbiiilh4z717q7vz9r5"))))
  5429. (build-system gnu-build-system)
  5430. (native-inputs
  5431. (list pkg-config))
  5432. (inputs
  5433. (list pango sdl2 sdl2-image sdl2-mixer sdl2-ttf))
  5434. (home-page "https://pr-starfighter.github.io/")
  5435. (synopsis "2D scrolling shooter game")
  5436. (description
  5437. "In the year 2579, the intergalactic weapons corporation, WEAPCO, has
  5438. dominated the galaxy. Guide Chris Bainfield and his friend Sid Wilson on
  5439. their quest to liberate the galaxy from the clutches of WEAPCO. Along the
  5440. way, you will encounter new foes, make new allies, and assist local rebels
  5441. in strikes against the evil corporation.")
  5442. ;; gfx and music are under CC-BY 3.0, CC-BY-SA 3.0, CC0 or Public Domain.
  5443. (license (list license:gpl3+
  5444. license:cc-by3.0
  5445. license:cc-by-sa3.0
  5446. license:cc0
  5447. license:public-domain))))
  5448. (define-public chromium-bsu
  5449. (package
  5450. (name "chromium-bsu")
  5451. (version "0.9.16.1")
  5452. (source (origin
  5453. (method url-fetch)
  5454. (uri (string-append "mirror://sourceforge/chromium-bsu"
  5455. "/Chromium B.S.U. source code/"
  5456. "chromium-bsu-" version ".tar.gz"))
  5457. (sha256
  5458. (base32
  5459. "0jk2w5b6s6nkzri585bbz16cif2fhqcnl5l1mq3rd98r9nil3hd1"))))
  5460. (build-system gnu-build-system)
  5461. (native-inputs (list pkg-config))
  5462. (inputs (list gettext-minimal glu quesoglc
  5463. (sdl-union (list sdl sdl-image sdl-mixer))))
  5464. (home-page "https://chromium-bsu.sourceforge.net/")
  5465. (synopsis "Fast-paced, arcade-style, top-scrolling space shooter")
  5466. (description
  5467. "In this game you are the captain of the cargo ship Chromium B.S.U. and
  5468. are responsible for delivering supplies to the troops on the front line. Your
  5469. ship has a small fleet of robotic fighters which you control from the relative
  5470. safety of the Chromium vessel.")
  5471. ;; Clarified Artistic License for everything but sound, which is covered
  5472. ;; by the Expat License.
  5473. (license (list license:clarified-artistic license:expat))))
  5474. (define-public tuxpaint
  5475. (package
  5476. (name "tuxpaint")
  5477. (version "0.9.23") ;keep VER_DATE below in sync
  5478. (source
  5479. (origin
  5480. (method url-fetch)
  5481. (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint/"
  5482. version "/tuxpaint-" version ".tar.gz"))
  5483. (sha256
  5484. (base32
  5485. "09k9pxi88r3dx6dyjwf9h85d4qpva4i29qz63dc558hg9v21k69l"))
  5486. (modules '((guix build utils)))
  5487. (snippet
  5488. '(begin
  5489. ;; Remove win32 directory which contains binary dll's and the
  5490. ;; deprecated visualc directory.
  5491. (for-each delete-file-recursively '("win32" "visualc"))
  5492. (substitute* "Makefile"
  5493. ;; Do not rely on $(GPERF) being an absolute file name
  5494. (("\\[ -x \\$\\(GPERF\\) \\]")
  5495. "$(GPERF) --version >/dev/null 2>&1"))
  5496. #t))
  5497. (patches (search-patches "tuxpaint-stamps-path.patch"))))
  5498. (build-system gnu-build-system)
  5499. (native-inputs
  5500. (list gperf pkg-config))
  5501. (inputs
  5502. `(("cairo" ,cairo)
  5503. ("fribidi" ,fribidi)
  5504. ("gettext" ,gettext-minimal)
  5505. ("libpng" ,libpng)
  5506. ("librsvg" ,librsvg)
  5507. ("libpaper" ,libpaper)
  5508. ("netpbm" ,netpbm)
  5509. ("sdl" ,(sdl-union (list sdl sdl-mixer sdl-ttf sdl-image)))))
  5510. ;; TODO: Use system fonts rather than those in data/fonts
  5511. (arguments
  5512. `(#:make-flags `("VER_DATE=2018-09-02"
  5513. "GPERF=gperf" "CC=gcc"
  5514. "SDL_PCNAME=sdl SDL_image SDL_mixer SDL_ttf"
  5515. ,(string-append "PREFIX=" %output)
  5516. "KDE_PREFIX=$(PREFIX)/share/applications"
  5517. "KDE_ICON_PREFIX=$(PREFIX)/share/icons/"
  5518. "COMPLETIONDIR=$(PREFIX)/etc/bash_completion.d")
  5519. #:parallel-build? #f ;fails on some systems
  5520. #:tests? #f ;No tests
  5521. #:phases (modify-phases %standard-phases
  5522. (delete 'configure) ;no configure phase
  5523. (add-before 'install 'no-sys-cache
  5524. (lambda _ ;do not rebuild system conf cache
  5525. (substitute* "Makefile"
  5526. (("kbuildsycoca4") ""))
  5527. #t))
  5528. (add-after 'install 'fix-import
  5529. (lambda* (#:key inputs outputs #:allow-other-keys)
  5530. (let* ((out (assoc-ref outputs "out"))
  5531. (net (assoc-ref inputs "netpbm"))
  5532. (tpi (string-append out "/bin/tuxpaint-import")))
  5533. (substitute* tpi
  5534. ;; Point to installation prefix so that the default
  5535. ;; configure file is found.
  5536. (("/usr/local") out))
  5537. ;; tuxpaint-import uses a bunch of programs from
  5538. ;; netpbm, so make sure it knows where those are
  5539. (wrap-program tpi
  5540. `("PATH" ":" prefix
  5541. (,(string-append net "/bin"))))))))))
  5542. (native-search-paths
  5543. (list (search-path-specification
  5544. (variable "TUXPAINT_STAMPS_PATH")
  5545. (files '("share/tuxpaint/stamps")))))
  5546. (home-page "http://www.tuxpaint.org")
  5547. (synopsis "Drawing software for children")
  5548. (description
  5549. "Tux Paint is a free drawing program designed for young children (kids
  5550. ages 3 and up). It has a simple, easy-to-use interface; fun sound effects;
  5551. and an encouraging cartoon mascot who helps guide children as they use the
  5552. program. It provides a blank canvas and a variety of drawing tools to help
  5553. your child be creative.")
  5554. (license license:gpl2+)))
  5555. (define-public tuxpaint-stamps
  5556. (package
  5557. (name "tuxpaint-stamps")
  5558. (version "2018.09.01")
  5559. (source
  5560. (origin
  5561. (method url-fetch)
  5562. (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-stamps/"
  5563. (string-map (λ (x) (if (eq? x #\.) #\- x)) version)
  5564. "/tuxpaint-stamps-" version ".tar.gz"))
  5565. (sha256
  5566. (base32
  5567. "1skr23k27yj3vgwfazpzxp90lb2a278gxrkr3bxw7az6zpkmb3yp"))))
  5568. (build-system trivial-build-system)
  5569. (native-inputs
  5570. (list tar gzip))
  5571. (arguments
  5572. `(#:modules ((guix build utils))
  5573. #:builder (begin
  5574. (use-modules (guix build utils))
  5575. (setenv "PATH"
  5576. (string-append
  5577. (assoc-ref %build-inputs "tar") "/bin" ":"
  5578. (assoc-ref %build-inputs "gzip") "/bin"))
  5579. (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
  5580. (chdir (string-append ,name "-" ,version))
  5581. (let ((dir (string-append %output "/share/tuxpaint/stamps")))
  5582. (mkdir-p dir)
  5583. (copy-recursively "stamps" dir))
  5584. #t)))
  5585. (home-page (package-home-page tuxpaint))
  5586. (synopsis "Stamp images for Tux Paint")
  5587. (description
  5588. "This package contains a set of \"Rubber Stamp\" images which can be used
  5589. with the \"Stamp\" tool within Tux Paint.")
  5590. (license license:gpl2+)))
  5591. (define-public tuxpaint-config
  5592. (package
  5593. (name "tuxpaint-config")
  5594. (version "0.0.14") ;keep VER_DATE below in sync
  5595. (source
  5596. (origin
  5597. (method url-fetch)
  5598. (uri (string-append "mirror://sourceforge/tuxpaint/tuxpaint-config/"
  5599. version "/tuxpaint-config-" version ".tar.gz"))
  5600. (sha256
  5601. (base32
  5602. "0zkgxk436nqcp43zghkfmh397c7dvh5bwn2as7gwvv208bzyij6g"))))
  5603. (build-system gnu-build-system)
  5604. (native-inputs
  5605. `(("gettext" ,gettext-minimal)))
  5606. (inputs
  5607. (list fltk
  5608. libpaper
  5609. ;; TODO: Should the following be propagated by fltk?
  5610. libx11
  5611. libxft
  5612. mesa))
  5613. (arguments
  5614. `(#:make-flags `("VER_DATE=2018-09-01"
  5615. "CONFDIR=/etc/tuxpaint" ;don't write to store
  5616. ,(string-append "PREFIX=" %output)
  5617. "GNOME_PREFIX=$(PREFIX)")
  5618. #:parallel-build? #f ;race conditions
  5619. #:tests? #f ;no tests
  5620. #:phases (modify-phases %standard-phases
  5621. (delete 'configure) ;no configure phase
  5622. (add-before 'install 'gzip-no-name
  5623. (lambda* _
  5624. (substitute* "Makefile"
  5625. ;; tuxpaint-config compresses its own documentation;
  5626. ;; make sure it uses flags for reproducibility.
  5627. (("gzip") "gzip --no-name"))))
  5628. (add-before 'install 'make-install-dirs
  5629. (lambda* (#:key outputs #:allow-other-keys)
  5630. (let ((out (assoc-ref outputs "out")))
  5631. (mkdir-p (string-append out "/bin"))
  5632. #t))))))
  5633. (home-page (package-home-page tuxpaint))
  5634. (synopsis "Configure Tux Paint")
  5635. (description
  5636. "Tux Paint Config is a graphical configuration editor for Tux Paint.")
  5637. (license license:gpl2))) ;no "or later" present
  5638. (define-public supertux
  5639. (package
  5640. (name "supertux")
  5641. (version "0.6.3")
  5642. (source (origin
  5643. (method url-fetch)
  5644. (uri (string-append "https://github.com/SuperTux/supertux/"
  5645. "releases/download/v" version "/SuperTux-v"
  5646. version "-Source.tar.gz"))
  5647. (file-name (string-append name "-" version ".tar.gz"))
  5648. (sha256
  5649. (base32
  5650. "1xkr3ka2sxp5s0spp84iv294i29s1vxqzazb6kmjc0n415h0x57p"))
  5651. (patches
  5652. (search-patches "supertux-unbundle-squirrel.patch"))))
  5653. (arguments
  5654. '(#:tests? #f
  5655. #:configure-flags '("-DINSTALL_SUBDIR_BIN=bin"
  5656. "-DUSE_SYSTEM_PHYSFS=ON")
  5657. #:phases
  5658. (modify-phases %standard-phases
  5659. (add-after 'unpack 'patch-squirrel-path
  5660. (lambda* (#:key inputs #:allow-other-keys)
  5661. (let ((squirrel (assoc-ref inputs "squirrel")))
  5662. (substitute* "CMakeLists.txt"
  5663. (("set\\(SQUIRREL_PREFIX.*")
  5664. (string-append "set(SQUIRREL_PREFIX " squirrel ")"))
  5665. (("add_dependencies\\(supertux2_lib squirrel\\)") "")
  5666. (("\\$\\{SQUIRREL_PREFIX\\}/include")
  5667. (string-append "${SQUIRREL_PREFIX}/include/squirrel"))))
  5668. #t)))))
  5669. (build-system cmake-build-system)
  5670. (inputs (list boost
  5671. curl
  5672. freetype
  5673. glew
  5674. glm
  5675. libogg
  5676. libvorbis
  5677. mesa
  5678. openal
  5679. physfs
  5680. sdl2
  5681. sdl2-image
  5682. sdl2-mixer
  5683. squirrel))
  5684. (native-inputs
  5685. (list pkg-config))
  5686. (synopsis "2D platformer game")
  5687. (description "SuperTux is a classic 2D jump'n run sidescroller game in
  5688. a style similar to the original Super Mario games.")
  5689. (home-page "https://supertux.org/")
  5690. (license license:gpl3+)))
  5691. (define-public tintin++
  5692. (package
  5693. (name "tintin++")
  5694. (version "2.02.12")
  5695. (source
  5696. (origin
  5697. (method url-fetch)
  5698. (uri (string-append "mirror://sourceforge/tintin/TinTin++ Source Code/"
  5699. (string-drop-right version 1)
  5700. "/tintin-" version ".tar.gz"))
  5701. (sha256
  5702. (base32 "000sg16w7790ha8ys31qjh1ip5hl02ldfwj1zy6dqz0y5i7zvydn"))))
  5703. (inputs
  5704. (list gnutls pcre readline zlib))
  5705. (arguments
  5706. '(#:tests? #f ; no test suite
  5707. #:phases
  5708. (modify-phases %standard-phases
  5709. ;; The source is in tt/src.
  5710. (add-before 'configure 'chdir
  5711. (lambda _
  5712. (chdir "src")
  5713. #t)))))
  5714. (build-system gnu-build-system)
  5715. (home-page "https://tintin.mudhalla.net/")
  5716. (synopsis "MUD client")
  5717. (description
  5718. "TinTin++ is a MUD client which supports MCCP (Mud Client Compression
  5719. Protocol), MMCP (Mud Master Chat Protocol), xterm 256 colors, most TELNET
  5720. options used by MUDs, as well as those required to login via telnet on
  5721. Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
  5722. (license license:gpl3+)))
  5723. (define-public laby
  5724. (package
  5725. (name "laby")
  5726. (version "0.7.0")
  5727. (source
  5728. (origin (method git-fetch)
  5729. (uri (git-reference
  5730. (url "https://github.com/sgimenez/laby")
  5731. (commit (string-append name "-" version))))
  5732. (file-name (git-file-name name version))
  5733. (sha256
  5734. (base32
  5735. "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
  5736. (patches (search-patches "laby-make-install.patch"
  5737. "laby-use-tmpdir-from-runtime.patch"))))
  5738. (build-system glib-or-gtk-build-system)
  5739. (inputs
  5740. (list gdk-pixbuf
  5741. lablgtk3
  5742. (librsvg-for-system)
  5743. ocaml-lablgtk3-sourceview3
  5744. ocaml
  5745. ocaml-findlib
  5746. ocamlbuild))
  5747. (arguments
  5748. (list #:phases
  5749. #~(modify-phases %standard-phases
  5750. (delete 'configure)
  5751. (add-before 'build 'set-library-path
  5752. (lambda* (#:key inputs #:allow-other-keys)
  5753. (let ((lablgtk #$(this-package-input "lablgtk")))
  5754. (setenv "LD_LIBRARY_PATH"
  5755. (string-append lablgtk "/lib/ocaml/stublibs")))))
  5756. (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
  5757. (lambda* (#:key outputs #:allow-other-keys)
  5758. (let ((laby (string-append #$output "/bin/laby")))
  5759. (wrap-program laby
  5760. ;; Wrapping GDK_PIXBUF_MODULE_FILE allows laby to
  5761. ;; function in pure environments.
  5762. `("GDK_PIXBUF_MODULE_FILE" =
  5763. (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
  5764. #:tests? #f ; no 'check' target
  5765. #:make-flags
  5766. #~(list (string-append "PREFIX=" #$output) "all")))
  5767. (home-page "https://sgimenez.github.io/laby/")
  5768. (synopsis "Programming game")
  5769. (description "Learn programming, playing with ants and spider webs ;-)
  5770. Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
  5771. Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced
  5772. programmers may also add their own favorite language.")
  5773. (license license:gpl3+)))
  5774. (define-public bambam
  5775. (package
  5776. (name "bambam")
  5777. (version "1.2.1")
  5778. (source
  5779. (origin
  5780. (method git-fetch)
  5781. (uri (git-reference
  5782. (url "https://github.com/porridge/bambam")
  5783. (commit (string-append "v" version))))
  5784. (file-name (git-file-name name version))
  5785. (sha256
  5786. (base32 "148cqahklqd4m88j5z1xf3fh4vha41f31wian11hkas106mbsya9"))))
  5787. (build-system python-build-system)
  5788. (arguments
  5789. `(#:tests? #f ; no tests
  5790. #:phases
  5791. (modify-phases %standard-phases
  5792. (delete 'build) ; nothing to build
  5793. (replace 'install
  5794. (lambda* (#:key outputs #:allow-other-keys)
  5795. (let* ((out (assoc-ref outputs "out"))
  5796. (bin (string-append out "/bin"))
  5797. (share (string-append out "/share")))
  5798. (mkdir-p bin)
  5799. (copy-file "bambam.py" (string-append bin "/bambam"))
  5800. (install-file "bambam.6" (string-append share "/man/man6"))
  5801. (copy-recursively "data" (string-append share "/bambam/data")))
  5802. #t)))))
  5803. (inputs
  5804. (list python-pygame))
  5805. (home-page "https://github.com/porridge/bambam")
  5806. (synopsis "Keyboard mashing and doodling game for babies")
  5807. (description "Bambam is a simple baby keyboard (and gamepad) masher
  5808. application that locks the keyboard and mouse and instead displays bright
  5809. colors, pictures, and sounds.")
  5810. (license license:gpl3+)))
  5811. (define-public mrrescue
  5812. (package
  5813. (name "mrrescue")
  5814. (version "1.02e")
  5815. (source (origin
  5816. (method url-fetch)
  5817. (uri (string-append
  5818. "https://github.com/SimonLarsen/mrrescue/releases/"
  5819. "download/" version "/mrrescue" version ".love"))
  5820. (file-name (string-append name "-" version ".love"))
  5821. (sha256
  5822. (base32
  5823. "0jwzbwkgp1l5ia6c7s760gmdirbsncp6nfqp7vqdqsfb63la9gl2"))))
  5824. (build-system trivial-build-system)
  5825. (arguments
  5826. `(#:modules ((guix build utils))
  5827. #:builder
  5828. (begin
  5829. (use-modules (guix build utils))
  5830. (let* ((out (assoc-ref %outputs "out"))
  5831. (script (string-append out "/bin/" ,name))
  5832. (data (string-append out "/share/" ,name))
  5833. (source (assoc-ref %build-inputs "source"))
  5834. (unzip (search-input-file %build-inputs "/bin/unzip"))
  5835. (patch (search-input-file %build-inputs "/bin/patch"))
  5836. (bash (search-input-file %build-inputs "/bin/bash"))
  5837. (love (search-input-file %build-inputs "/bin/love")))
  5838. (mkdir-p (dirname script))
  5839. (with-output-to-file script
  5840. (lambda ()
  5841. (format #t "#!~a~%" bash)
  5842. (format #t "exec -a ~a \"~a\" \"~a\"~%" ,name love data)))
  5843. (chmod script #o755)
  5844. ;; The better way to package this game would be to install *only* the
  5845. ;; script above, pointing to the unextracted .love file in the store.
  5846. ;; However, mrrescue 1.02e needs to be patched to work with Love 11.
  5847. ;; Instead of extracting the .love file, patching it, and re-zipping
  5848. ;; it to the store, simply point the script to the extracted patched
  5849. ;; data directory directly.
  5850. (mkdir-p data)
  5851. (with-directory-excursion data
  5852. (invoke unzip source)
  5853. (invoke patch "-p1" "-i"
  5854. (assoc-ref %build-inputs "love-11.patch")))
  5855. #t))))
  5856. (native-inputs
  5857. `(("unzip" ,unzip)
  5858. ("patch" ,patch)
  5859. ("love-11.patch" ,(search-patch "mrrescue-support-love-11.patch"))))
  5860. (inputs
  5861. (list bash love))
  5862. (home-page "https://tangramgames.dk/games/mrrescue")
  5863. (synopsis "Arcade-style fire fighting game")
  5864. (description
  5865. "Mr. Rescue is an arcade styled 2d action game centered around evacuating
  5866. civilians from burning buildings. The game features fast-paced fire
  5867. extinguishing action, intense boss battles, a catchy soundtrack, and lots of
  5868. throwing people around in pseudo-randomly generated buildings.")
  5869. (license (list license:zlib ; for source code
  5870. license:cc-by-sa3.0)))) ; for graphics and music assets
  5871. (define-public hyperrogue
  5872. (package
  5873. (name "hyperrogue")
  5874. (version "12.1a")
  5875. (source
  5876. (origin
  5877. (method git-fetch)
  5878. (uri (git-reference
  5879. (url "https://github.com/zenorogue/hyperrogue")
  5880. (commit (string-append "v" version))))
  5881. (file-name (git-file-name name version))
  5882. (sha256
  5883. (base32
  5884. "1l09d1r3jdwp54zq071fk09hpggif5phjn0gsapzrjy3i289jran"))))
  5885. (build-system gnu-build-system)
  5886. (arguments
  5887. (list
  5888. #:tests? #f ; no check target
  5889. #:make-flags #~(list "HYPERROGUE_USE_GLEW=1"
  5890. "HYPERROGUE_USE_PNG=1")
  5891. #:phases
  5892. #~(modify-phases %standard-phases
  5893. (add-after 'set-paths 'set-sdl-paths
  5894. (lambda* (#:key inputs #:allow-other-keys)
  5895. (setenv "CPATH"
  5896. (string-append (or (getenv "CPATH") "") ":"
  5897. (search-input-directory inputs
  5898. "/include/SDL")))))
  5899. (replace 'configure
  5900. (lambda* (#:key inputs #:allow-other-keys)
  5901. (let ((share-dir (string-append #$output "/share/hyperrogue/"))
  5902. (fonts-dir (dirname
  5903. (search-input-file inputs
  5904. "DejaVuSans-Bold.ttf"))))
  5905. ;; Set fonts and music path.
  5906. (substitute* "sysconfig.h"
  5907. (("(#define HYPERPATH ).*" _ lead)
  5908. (string-append lead "\"" share-dir "\"\n"))
  5909. (("(#define HYPERFONTPATH ).*" _ lead)
  5910. (string-append lead "\"" fonts-dir "/\"\n")))
  5911. ;; Disable build machine CPU optimizations and warnings treated
  5912. ;; as errors.
  5913. (substitute* "Makefile"
  5914. (("-march=native") "")
  5915. (("-Werror") "")))))
  5916. (replace 'install
  5917. (lambda _
  5918. (install-file "hyperrogue" (string-append #$output "/bin"))
  5919. (let ((share-dir (string-append #$output "/share/hyperrogue/")))
  5920. (install-file "hyperrogue-music.txt" share-dir)
  5921. (for-each (lambda (dir)
  5922. (copy-recursively dir
  5923. (string-append share-dir dir)))
  5924. '("music" "sounds"))))))))
  5925. (inputs
  5926. (list font-dejavu
  5927. glew
  5928. libpng
  5929. (sdl-union (list sdl sdl-gfx sdl-mixer sdl-ttf))))
  5930. (home-page "https://roguetemple.com/z/hyper")
  5931. (synopsis "Non-euclidean graphical rogue-like game")
  5932. (description
  5933. "HyperRogue is a game in which the player collects treasures and fights
  5934. monsters -- rogue-like but for the fact that it is played on the hyperbolic
  5935. plane and not in euclidean space.
  5936. In HyperRogue, the player can move through different parts of the world, which
  5937. are home to particular creatures and may be subject to their own rules of
  5938. \"physics\".
  5939. While the game can use ASCII characters to display the the classical rogue
  5940. symbols, it still needs graphics to render the non-euclidean world.")
  5941. (license (list license:bsd-3 ; glew.c, mtrand.*
  5942. license:cc-by-sa3.0 ; music
  5943. license:cc-by-sa4.0 ; sounds
  5944. license:cc0
  5945. license:public-domain ; direntx.*, some sounds
  5946. license:zlib ; savepng.*
  5947. license:gpl2+)))) ; remaining files
  5948. (define-public kobodeluxe
  5949. (package
  5950. (name "kobodeluxe")
  5951. (version "0.5.1")
  5952. (source (origin
  5953. (method url-fetch)
  5954. (uri (string-append "http://olofson.net/kobodl/download/KoboDeluxe-"
  5955. version ".tar.bz2"))
  5956. (sha256
  5957. (base32
  5958. "0b2wvdpnmaibsy419c16dfwj5kvd3pccby2aaqvm964x74592yqg"))
  5959. (patches (search-patches
  5960. "kobodeluxe-const-charp-conversion.patch"
  5961. "kobodeluxe-enemies-pipe-decl.patch"
  5962. "kobodeluxe-graphics-window-signed-char.patch"
  5963. "kobodeluxe-manpage-minus-not-hyphen.patch"
  5964. "kobodeluxe-midicon-segmentation-fault.patch"
  5965. "kobodeluxe-paths.patch"))))
  5966. (build-system gnu-build-system)
  5967. (arguments
  5968. '(#:configure-flags
  5969. (list (string-append "CPPFLAGS=-I"
  5970. (assoc-ref %build-inputs "sdl-union")
  5971. "/include/SDL"))))
  5972. (inputs
  5973. (list glu
  5974. (sdl-union (list sdl sdl-image))))
  5975. (synopsis "Shooter with space station destruction")
  5976. (description
  5977. "Kobo Deluxe is an enhanced version of Akira Higuchi's XKobo graphical game
  5978. for Un*x systems with X11.")
  5979. (home-page "http://olofson.net/kobodl/")
  5980. (license license:gpl2+)))
  5981. (define-public freeciv
  5982. (package
  5983. (name "freeciv")
  5984. (version "3.0.7")
  5985. (source
  5986. (origin
  5987. (method url-fetch)
  5988. (uri (list (string-append
  5989. "http://files.freeciv.org/stable/freeciv-"
  5990. version ".tar.bz2")
  5991. (string-append
  5992. "mirror://sourceforge/freeciv/Freeciv%20"
  5993. (version-major+minor version) "/" version
  5994. "/freeciv-" version ".tar.xz")))
  5995. (sha256
  5996. (base32 "1i6sm2ich9bazbg8wjzn8z1c5hgmg541lgw8f899fgfhgvqhdrpn"))))
  5997. (build-system gnu-build-system)
  5998. (inputs
  5999. (list curl cyrus-sasl gtk+ sdl-mixer zlib))
  6000. (native-inputs
  6001. (list pkg-config))
  6002. (home-page "https://www.freeciv.org/")
  6003. (synopsis "Turn-based empire building strategy game")
  6004. (description "Freeciv is a turn-based empire building strategy game
  6005. inspired by the history of human civilization. The game commences in
  6006. prehistory and your mission is to lead your tribe from the Stone Age
  6007. into the Space Age.")
  6008. (license license:gpl2+)))
  6009. (define-public no-more-secrets
  6010. (package
  6011. (name "no-more-secrets")
  6012. (version "0.3.3")
  6013. (source
  6014. (origin
  6015. (method git-fetch)
  6016. (uri (git-reference
  6017. (url "https://github.com/bartobri/no-more-secrets")
  6018. (commit (string-append "v" version))))
  6019. (file-name (git-file-name name version))
  6020. (sha256
  6021. (base32 "1zfv4qabikf8w9winsr4brxrdvs3f0d7xvydksyx8bydadsm2v2h"))))
  6022. (build-system gnu-build-system)
  6023. (arguments
  6024. `(#:tests? #f
  6025. #:make-flags (list "CC=gcc" "all-ncurses"
  6026. (string-append "prefix="
  6027. (assoc-ref %outputs "out")))
  6028. #:phases
  6029. (modify-phases %standard-phases
  6030. (delete 'configure))))
  6031. (inputs
  6032. (list ncurses))
  6033. (home-page "https://github.com/bartobri/no-more-secrets")
  6034. (synopsis "Recreation of data decryption effect in \"Sneakers\"")
  6035. (description
  6036. "@code{No More Secrets} provides a command line tool called \"nms\"
  6037. that recreates the famous data decryption effect seen on screen in the 1992
  6038. movie \"Sneakers\".
  6039. This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and
  6040. it will apply the hollywood effect, initially showing encrypted data, then
  6041. starting a decryption sequence to reveal the original plaintext characters.")
  6042. (license license:expat)))
  6043. (define-public megaglest-data
  6044. (package
  6045. (name "megaglest-data")
  6046. (version "3.13.0")
  6047. (source
  6048. (origin
  6049. (method url-fetch)
  6050. (uri (string-append
  6051. "https://github.com/MegaGlest/megaglest-data"
  6052. "/releases/download/" version "/megaglest-data-"
  6053. version ".tar.xz"))
  6054. (sha256
  6055. (base32
  6056. "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
  6057. (build-system cmake-build-system)
  6058. (arguments
  6059. `(#:tests? #f))
  6060. (home-page "https://megaglest.org/")
  6061. (synopsis "Data files for MegaGlest")
  6062. (description "This package contains the data files required for MegaGlest.")
  6063. (license license:cc-by-sa3.0)))
  6064. (define-public megaglest
  6065. (package
  6066. (name "megaglest")
  6067. (version "3.13.0")
  6068. (source
  6069. (origin
  6070. (method url-fetch)
  6071. (uri (string-append
  6072. "https://github.com/MegaGlest/megaglest-source"
  6073. "/releases/download/" version "/megaglest-source-"
  6074. version ".tar.xz"))
  6075. (sha256
  6076. (base32
  6077. "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
  6078. (build-system cmake-build-system)
  6079. (inputs
  6080. (list curl
  6081. fontconfig
  6082. ftgl
  6083. glew
  6084. libjpeg-turbo
  6085. megaglest-data
  6086. mesa
  6087. miniupnpc
  6088. openal
  6089. libircclient
  6090. libpng
  6091. libvorbis
  6092. lua
  6093. sdl2
  6094. wxwidgets-3.0))
  6095. (native-inputs
  6096. (list cppunit pkg-config))
  6097. (arguments
  6098. `(#:configure-flags
  6099. (list "-DCMAKE_CXX_FLAGS=-fcommon"
  6100. "-DCMAKE_C_FLAGS=-fcommon"
  6101. (string-append "-DCUSTOM_DATA_INSTALL_PATH="
  6102. (search-input-directory %build-inputs
  6103. "share/megaglest"))
  6104. "-DBUILD_MEGAGLEST_TESTS=ON")
  6105. #:phases
  6106. (modify-phases %standard-phases
  6107. (add-after 'unpack 'fix-ini-search-path
  6108. (lambda* (#:key outputs #:allow-other-keys)
  6109. (substitute* "source/glest_game/global/config.cpp"
  6110. (("/usr/share/megaglest/")
  6111. (string-append (assoc-ref outputs "out")
  6112. "/share/megaglest/"))))))
  6113. #:test-target "megaglest_tests"))
  6114. (home-page "https://megaglest.org/")
  6115. (synopsis "3D real-time strategy (RTS) game")
  6116. (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
  6117. game, where you control the armies of one of seven different factions: Tech,
  6118. Magic, Egypt, Indians, Norsemen, Persian or Romans.")
  6119. (license license:gpl2+)))
  6120. (define-public freegish
  6121. (let ((commit "21977ee5fc2008231b35160df00efe954c508b16")
  6122. (revision "2"))
  6123. (package
  6124. (name "freegish")
  6125. (version (string-append "0-" revision "." (string-take commit 9)))
  6126. (source (origin
  6127. (method git-fetch)
  6128. (uri (git-reference
  6129. (url "https://github.com/freegish/freegish")
  6130. (commit commit)))
  6131. (file-name (git-file-name name version))
  6132. (sha256
  6133. (base32
  6134. "1qh0gcnbyxyzmb13jifwba4xrzj94m4w9whdvl0gnds6ricmwply"))
  6135. (modules '((guix build utils)))
  6136. ;; The audio files in the "music" directory are licensed under
  6137. ;; CC-BY-NC, so we delete them.
  6138. (snippet
  6139. '(begin
  6140. (delete-file-recursively "music")
  6141. #t))))
  6142. (build-system cmake-build-system)
  6143. (arguments
  6144. `(#:tests? #f ; no tests included
  6145. #:configure-flags
  6146. (list "-DCMAKE_INSTALL_FHS=ON")
  6147. #:phases
  6148. (modify-phases %standard-phases
  6149. (add-after 'unpack 'set-DATAPATH
  6150. (lambda* (#:key outputs #:allow-other-keys)
  6151. (substitute* "CMakeLists.txt"
  6152. (("^option\\(INSTALL_FHS" line)
  6153. (string-append "add_definitions(-DDATAPATH=\""
  6154. (assoc-ref outputs "out") "/share/freegish\")\n"
  6155. line)))
  6156. #t)))))
  6157. (inputs
  6158. (list (sdl-union (list sdl sdl-mixer))
  6159. openal
  6160. libvorbis
  6161. libogg
  6162. mesa
  6163. libpng
  6164. zlib))
  6165. (home-page "https://github.com/freegish/freegish")
  6166. (synopsis "Side-scrolling physics platformer with a ball of tar")
  6167. (description "In FreeGish you control Gish, a ball of tar who lives
  6168. happily with his girlfriend Brea, until one day a mysterious dark creature
  6169. emerges from a sewer hole and pulls her below ground.")
  6170. ;; The textures are available under the Expat license. All other assets
  6171. ;; (including levels) are covered under CC-BY-SA or public domain. The
  6172. ;; source code is under GPLv2+.
  6173. (license (list license:gpl2+
  6174. license:expat
  6175. license:public-domain
  6176. license:cc-by-sa3.0)))))
  6177. (define-public cdogs-sdl
  6178. (package
  6179. (name "cdogs-sdl")
  6180. (version "1.4.0")
  6181. (source
  6182. (origin
  6183. (method git-fetch)
  6184. (uri (git-reference
  6185. (url "https://github.com/cxong/cdogs-sdl")
  6186. (commit version)))
  6187. (file-name (git-file-name name version))
  6188. (sha256
  6189. (base32 "1505z8rli59i1ych4rzwbf4dvhv72icdj22n1xarb8xfyz0wyp3b"))))
  6190. (build-system cmake-build-system)
  6191. (arguments
  6192. `(#:configure-flags
  6193. (list (string-append "-DCDOGS_DATA_DIR="
  6194. (assoc-ref %outputs "out")
  6195. "/share/cdogs-sdl/"))))
  6196. (native-inputs
  6197. (list pkg-config))
  6198. (inputs
  6199. (list gtk+ mesa sdl2 sdl2-image sdl2-mixer))
  6200. (home-page "https://cxong.github.io/cdogs-sdl/")
  6201. (synopsis "Classic overhead run-and-gun game")
  6202. (description "C-Dogs SDL is a classic overhead run-and-gun game,
  6203. supporting up to 4 players in co-op and deathmatch modes. Customize your
  6204. player, choose from many weapons, and blast, slide and slash your way through
  6205. over 100 user-created campaigns.")
  6206. ;; GPLv2+ for code (includes files under BSD-2 and BSD-3),
  6207. ;; CC0/CC-BY/CC-BY-SA for assets.
  6208. (license (list license:gpl2+
  6209. license:bsd-2
  6210. license:bsd-3
  6211. license:cc0
  6212. license:cc-by3.0
  6213. license:cc-by-sa3.0))))
  6214. (define-public kiki
  6215. (package
  6216. (name "kiki")
  6217. (version "1.0.2")
  6218. (source (origin
  6219. (method url-fetch)
  6220. (uri (string-append "mirror://sourceforge/kiki/kiki-src/"
  6221. version "/kiki-" version "-src.tgz"))
  6222. (sha256
  6223. (base32
  6224. "0ihjdsxbn8z3cz0gpcprafiipcqaiskgdnh1rhmw4qff8dszalbn"))
  6225. (modules '((guix build utils)))
  6226. (snippet
  6227. '(begin
  6228. (for-each delete-file (find-files "." "\\.dll$"))
  6229. #t))
  6230. (patches
  6231. (search-patches "kiki-level-selection-crash.patch"
  6232. "kiki-makefile.patch"
  6233. "kiki-missing-includes.patch"
  6234. "kiki-portability-64bit.patch"))))
  6235. (build-system gnu-build-system)
  6236. (arguments
  6237. `(#:tests? #f ; there are no tests
  6238. #:make-flags '("CXX=g++")
  6239. #:phases
  6240. (modify-phases %standard-phases
  6241. (replace 'configure
  6242. (lambda* (#:key inputs outputs #:allow-other-keys)
  6243. (setenv "CPLUS_INCLUDE_PATH"
  6244. (string-append
  6245. (search-input-directory inputs "include/SDL") ":"
  6246. (search-input-directory inputs "include/python2.7")
  6247. ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
  6248. (substitute* "src/main/main.cpp"
  6249. (("#include <SDL.h>" line)
  6250. (string-append line "
  6251. #define K_INCLUDE_GLUT
  6252. #include \"KIncludeTools.h\""))
  6253. (("// initialize SDL" line)
  6254. (string-append "glutInit(&argc,argv);\n" line)))
  6255. (substitute* "src/main/KikiController.cpp"
  6256. (("getenv\\(\"KIKI_HOME\"\\)")
  6257. (string-append "\"" (assoc-ref outputs "out") "/share/kiki/\"")))
  6258. (substitute* "linux/Makefile"
  6259. (("CXXOPTS =" line)
  6260. (string-append line " -fpermissive"))
  6261. (("PYTHON_VERSION=.*") "PYTHON_VERSION=2.7")
  6262. (("PYTHONHOME =.*")
  6263. (string-append "PYTHONHOME = "
  6264. (assoc-ref inputs "python")
  6265. "/lib/python2.7/"))
  6266. (("\\$\\(GLLIBS\\)" line)
  6267. (string-append line " -lm -lpython2.7")))
  6268. (substitute* "src/main/KikiPythonWidget.h"
  6269. (("#define __KikiPythonWidget" line)
  6270. (string-append line "\n#include \"KikiPython.h\"")))
  6271. #t))
  6272. (add-before 'build 'build-kodilib
  6273. (lambda* (#:key make-flags #:allow-other-keys)
  6274. (with-directory-excursion "kodilib/linux"
  6275. (apply invoke "make" make-flags))))
  6276. (add-after 'build-kodilib 'chdir
  6277. (lambda _ (chdir "linux") #t))
  6278. (replace 'install
  6279. (lambda* (#:key outputs #:allow-other-keys)
  6280. (let* ((out (assoc-ref outputs "out"))
  6281. (bin (string-append out "/bin"))
  6282. (share (string-append out "/share/kiki")))
  6283. (mkdir-p bin)
  6284. (mkdir-p share)
  6285. (install-file "kiki" bin)
  6286. (copy-recursively "../py" (string-append share "/py"))
  6287. (copy-recursively "../sound" (string-append share "/sound"))
  6288. #t))))))
  6289. (inputs
  6290. `(("glu" ,glu)
  6291. ;; Kiki builds fine with freeglut 3.0.0 but segfaults on start.
  6292. ("freeglut" ,freeglut-2.8)
  6293. ("sdl-union" ,(sdl-union (list sdl
  6294. sdl-mixer
  6295. sdl-image)))
  6296. ("python" ,python-2)))
  6297. (native-inputs
  6298. (list swig))
  6299. (home-page "https://kiki.sourceforge.net/")
  6300. (synopsis "3D puzzle game")
  6301. (description "Kiki the nano bot is a 3D puzzle game. It is basically a
  6302. mixture of the games Sokoban and Kula-World. Your task is to help Kiki, a
  6303. small robot living in the nano world, repair its maker.")
  6304. ;; See <http://metadata.ftp-master.debian.org/changelogs/main/k/
  6305. ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright>
  6306. ;; for a statement from the author.
  6307. (license license:public-domain)))
  6308. (define-public teeworlds
  6309. (package
  6310. (name "teeworlds")
  6311. (version "0.7.5")
  6312. (source (origin
  6313. (method git-fetch)
  6314. (uri (git-reference
  6315. (url "https://github.com/teeworlds/teeworlds")
  6316. (commit version)
  6317. ;; There are two submodules in datasrc/{languages,maps}
  6318. (recursive? #t)))
  6319. (file-name (git-file-name name version))
  6320. (sha256
  6321. (base32
  6322. "1l19ksmimg6b8zzjy0skyhh7z11ql7n5gvilkv7ay5x2b9ndbqwz"))
  6323. (modules '((guix build utils)
  6324. (ice-9 ftw)
  6325. (ice-9 regex)
  6326. (srfi srfi-1)
  6327. (srfi srfi-26)))
  6328. (snippet ; remove bundled libraries except md5
  6329. '(let ((base-dir "src/engine/external/"))
  6330. (for-each (compose (cut delete-file-recursively <>)
  6331. (cut string-append base-dir <>))
  6332. (remove (cut string-match "(^.)|(^md5$)" <>)
  6333. (scandir base-dir)))
  6334. #t))))
  6335. (build-system cmake-build-system)
  6336. (arguments
  6337. `(#:test-target "run_tests"
  6338. #:phases
  6339. (modify-phases %standard-phases
  6340. (add-after 'unpack 'patch-paths
  6341. (lambda* (#:key outputs #:allow-other-keys)
  6342. ;; Embed path to assets.
  6343. (substitute* "src/engine/shared/storage.cpp"
  6344. (("#define DATA_DIR.*")
  6345. (string-append "#define DATA_DIR \""
  6346. (assoc-ref outputs "out")
  6347. "/share/teeworlds/data"
  6348. "\"")))
  6349. #t))
  6350. (add-after 'unpack 'replace-font
  6351. (lambda* (#:key inputs #:allow-other-keys)
  6352. (delete-file "datasrc/fonts/DejaVuSans.ttf")
  6353. (symlink (string-append (assoc-ref inputs "font-dejavu")
  6354. "/share/fonts/truetype/DejaVuSans.ttf")
  6355. "datasrc/fonts/DejaVuSans.ttf")
  6356. #t)))))
  6357. (inputs
  6358. (list freetype
  6359. font-dejavu
  6360. glu
  6361. json-parser
  6362. mesa
  6363. pnglite
  6364. sdl2
  6365. sdl2-image
  6366. sdl2-mixer
  6367. wavpack
  6368. openssl
  6369. zlib))
  6370. (native-inputs
  6371. `(("googletest" ,googletest)
  6372. ("python" ,python-wrapper)
  6373. ("pkg-config" ,pkg-config)))
  6374. (home-page "https://www.teeworlds.com")
  6375. (synopsis "2D retro multiplayer shooter game")
  6376. (description "Teeworlds is an online multiplayer game. Battle with up to
  6377. 16 players in a variety of game modes, including Team Deathmatch and Capture
  6378. The Flag. You can even design your own maps!")
  6379. (license (list license:bsd-3 license:cc-by-sa3.0)))) ; game+maps&languages
  6380. (define-public enigma
  6381. (package
  6382. (name "enigma")
  6383. (version "1.21")
  6384. (source (origin
  6385. (method url-fetch)
  6386. (uri (string-append "mirror://sourceforge/enigma-game/"
  6387. "Release%20" version "/enigma-"
  6388. version ".tar.gz"))
  6389. (sha256
  6390. (base32
  6391. "00ffh9pypj1948pg3q9sjp1nmiabh52p5c8wpg9n1dcfgl3cywnq"))))
  6392. (build-system gnu-build-system)
  6393. (arguments
  6394. `(#:configure-flags
  6395. (list "--with-system-enet")
  6396. #:phases
  6397. (modify-phases %standard-phases
  6398. (add-after 'unpack 'fix-build-with-new-gcc
  6399. (lambda _
  6400. ;; Fix build with GCC6 and later by avoiding comparing ifstream
  6401. ;; to NULL. Can be removed for versions > 1.21.
  6402. (substitute* "src/lev/Proxy.cc"
  6403. (("ifs != NULL")
  6404. "ifs"))
  6405. #t))
  6406. (add-after 'unpack 'find-sdl
  6407. (lambda _
  6408. (substitute* "configure"
  6409. (("SDL_ttf.h") "SDL/SDL_ttf.h"))
  6410. (substitute* '("tools/ttf2bmf.cc"
  6411. "lib-src/enigma-core/ecl_font.cc"
  6412. "lib-src/enigma-core/ecl_video.cc"
  6413. "lib-src/enigma-core/ecl_buffer.hh"
  6414. "src/SoundEngine.cc"
  6415. "src/SoundEngine.hh"
  6416. "src/MusicManager.cc"
  6417. "src/MusicManager.hh"
  6418. "src/d_models.cc"
  6419. "src/main.cc"
  6420. "src/network.cc")
  6421. (("#include \"SDL_(image|ttf|mixer|types|syswm|mutex).h\"" line header)
  6422. (string-append "#include \"SDL/SDL_" header ".h\"")))
  6423. (substitute* "src/main.cc"
  6424. (("#include <SDL_(image|ttf|mixer).h>" line header)
  6425. (string-append "#include \"SDL/SDL_" header ".h\"")))
  6426. #t)))))
  6427. (inputs
  6428. (list xerces-c
  6429. (sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)) curl
  6430. enet))
  6431. (native-inputs
  6432. (list pkg-config imagemagick))
  6433. (home-page "https://www.nongnu.org/enigma")
  6434. (synopsis "Puzzle game with a dexterity component")
  6435. (description "Enigma is a puzzle game with 550 unique levels. The object
  6436. of the game is to find and uncover pairs of identically colored ‘Oxyd’ stones.
  6437. Simple? Yes. Easy? Certainly not! Hidden traps, vast mazes, laser beams,
  6438. and most of all, countless hairy puzzles usually block your direct way to the
  6439. Oxyd stones. Enigma’s game objects (and there are hundreds of them, lest you
  6440. get bored) interact in many unexpected ways, and since many of them follow the
  6441. laws of physics (Enigma’s special laws of physics, that is), controlling them
  6442. with the mouse isn’t always trivial.")
  6443. (license license:gpl2+)))
  6444. (define-public chroma
  6445. (package
  6446. (name "chroma")
  6447. (version "1.20")
  6448. (source (origin
  6449. (method url-fetch)
  6450. (uri (string-append "http://level7.org.uk/chroma/download/chroma-"
  6451. version ".tar.bz2"))
  6452. (sha256
  6453. (base32
  6454. "02hn448ckfxbx2fqr9wgf66rwl0vr4gl87yvsr5fc99zz9zw2f5v"))))
  6455. (build-system gnu-build-system)
  6456. (arguments
  6457. `(#:tests? #f)) ; no tests included
  6458. (inputs
  6459. `(("sdl-union" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-ttf)))
  6460. ("freetype" ,freetype)
  6461. ("ncurses" ,ncurses)
  6462. ("fontconfig" ,fontconfig)
  6463. ("libxft" ,libxft)))
  6464. (native-inputs
  6465. (list pkg-config))
  6466. (home-page "http://level7.org.uk/chroma/")
  6467. (synopsis "Abstract puzzle game")
  6468. (description "Chroma is an abstract puzzle game. A variety of colourful
  6469. shapes are arranged in a series of increasingly complex patterns, forming
  6470. fiendish traps that must be disarmed and mysterious puzzles that must be
  6471. manipulated in order to give up their subtle secrets. Initially so
  6472. straightforward that anyone can pick it up and begin to play, yet gradually
  6473. becoming difficult enough to tax even the brightest of minds.")
  6474. (license license:gpl2+)))
  6475. (define-public fillets-ng
  6476. (package
  6477. (name "fillets-ng")
  6478. (version "1.0.1")
  6479. (source (origin
  6480. (method url-fetch)
  6481. (uri (string-append "mirror://sourceforge/fillets/"
  6482. "Fish%20Fillets%20-%20Next%20Generation/"
  6483. version "/fillets-ng-" version ".tar.gz"))
  6484. (sha256
  6485. (base32
  6486. "1nljp75aqqb35qq3x7abhs2kp69vjcj0h1vxcpdyn2yn2nalv6ij"))))
  6487. (build-system gnu-build-system)
  6488. (arguments
  6489. `(#:configure-flags
  6490. (list (string-append "--with-lua="
  6491. (assoc-ref %build-inputs "lua")))
  6492. #:make-flags
  6493. (list (string-append "CFLAGS=-I"
  6494. (assoc-ref %build-inputs "sdl-union")
  6495. "/include/SDL")
  6496. (string-append "CXXFLAGS=-I"
  6497. (assoc-ref %build-inputs "sdl-union")
  6498. "/include/SDL"))
  6499. #:phases
  6500. (modify-phases %standard-phases
  6501. ;; Lua 5.1 does not provide it.
  6502. (add-after 'unpack 'do-not-link-with-lualib
  6503. (lambda _
  6504. (substitute* "configure"
  6505. (("-llualib") ""))
  6506. #t))
  6507. (add-after 'install 'install-data
  6508. (lambda* (#:key inputs outputs #:allow-other-keys)
  6509. (let ((data (string-append (assoc-ref outputs "out")
  6510. "/share/games/fillets-ng")))
  6511. (mkdir-p data)
  6512. (invoke "tar" "-xvf"
  6513. (assoc-ref inputs "fillets-ng-data")
  6514. "--strip-components=1"
  6515. "-C" data)))))))
  6516. (inputs
  6517. (list (sdl-union (list sdl sdl-mixer sdl-image sdl-ttf)) fribidi
  6518. libx11 lua-5.1))
  6519. (native-inputs
  6520. `(("pkg-config" ,pkg-config)
  6521. ("fillets-ng-data"
  6522. ,(origin
  6523. (method url-fetch)
  6524. (uri (string-append "mirror://sourceforge/fillets/"
  6525. "Fish%20Fillets%20-%20Next%20Generation/"
  6526. version "/fillets-ng-data-" version ".tar.gz"))
  6527. (sha256
  6528. (base32
  6529. "169p0yqh2gxvhdilvjc2ld8aap7lv2nhkhkg4i1hlmgc6pxpkjgh"))))))
  6530. (home-page "https://fillets.sourceforge.net")
  6531. (synopsis "Puzzle game")
  6532. (description "Fish Fillets NG is strictly a puzzle game. The goal in
  6533. every of the seventy levels is always the same: find a safe way out. The fish
  6534. utter witty remarks about their surroundings, the various inhabitants of their
  6535. underwater realm quarrel among themselves or comment on the efforts of your
  6536. fish. The whole game is accompanied by quiet, comforting music.")
  6537. (license license:gpl2+)))
  6538. (define-public crawl
  6539. (package
  6540. (name "crawl")
  6541. (version "0.29.1")
  6542. (source
  6543. (origin
  6544. (method git-fetch)
  6545. (uri (git-reference
  6546. (url "https://github.com/crawl/crawl")
  6547. (commit version)))
  6548. (file-name (git-file-name name version))
  6549. (sha256
  6550. (base32 "17bl8hdv2z3mpdfmd5gnwg3r1p9dqjbisiql24pxs1d33qcw0h7x"))
  6551. (patches (search-patches "crawl-upgrade-saves.patch"))))
  6552. (build-system gnu-build-system)
  6553. (inputs
  6554. (list lua-5.1 ncurses sqlite zlib))
  6555. (native-inputs
  6556. (list bash-minimal
  6557. bison
  6558. flex
  6559. perl
  6560. pkg-config
  6561. python-wrapper
  6562. python-pyyaml))
  6563. (arguments
  6564. (list
  6565. #:make-flags
  6566. #~(list (string-append "SQLITE_INCLUDE_DIR="
  6567. #$(this-package-input "sqlite")
  6568. "/include")
  6569. (string-append "prefix=" #$output)
  6570. "SAVEDIR=~/.crawl"
  6571. ;; Don't compile with SSE on systems which don't have it.
  6572. #$@(match (%current-system)
  6573. ((or "i686-linux" "x86_64-linux")
  6574. '())
  6575. (_ '("NOSSE=TRUE")))
  6576. ;; don't build any bundled dependencies
  6577. "BUILD_LUA="
  6578. "BUILD_SQLITE="
  6579. "BUILD_ZLIB="
  6580. "-Ccrawl-ref/source")
  6581. #:phases
  6582. #~(modify-phases %standard-phases
  6583. (add-after 'unpack 'set-version
  6584. (lambda _
  6585. (call-with-output-file "crawl-ref/source/util/release_ver"
  6586. (lambda (port)
  6587. (display #$version port)))))
  6588. (add-after 'unpack 'find-SDL-image
  6589. (lambda _
  6590. (substitute* "crawl-ref/source/windowmanager-sdl.cc"
  6591. (("SDL_image.h") "SDL2/SDL_image.h"))))
  6592. (delete 'configure)
  6593. (replace 'check
  6594. (lambda* (#:key tests? make-flags #:allow-other-keys)
  6595. (when tests?
  6596. (setenv "HOME" (getcwd))
  6597. ;; Fake a terminal for the test cases.
  6598. (setenv "TERM" "xterm-256color")
  6599. ;; Run the tests that don't require a debug build.
  6600. (apply invoke "make" "nondebugtest"
  6601. (format #f "-j~d" (parallel-job-count))
  6602. ;; Force command line build for test cases.
  6603. (append make-flags '("GAME=crawl" "TILES=")))))))))
  6604. (synopsis "Roguelike dungeon crawler game")
  6605. (description "Dungeon Crawl Stone Soup (also known as \"Crawl\" or DCSS
  6606. for short) is a roguelike adventure through dungeons filled with dangerous
  6607. monsters in a quest to find the mystifyingly fabulous Orb of Zot.")
  6608. (home-page "https://crawl.develz.org")
  6609. (license (list license:gpl2+
  6610. license:bsd-2
  6611. license:bsd-3
  6612. license:cc0
  6613. license:expat
  6614. license:zlib
  6615. license:asl2.0))))
  6616. ;; The linter here claims that patch file names should start with the package
  6617. ;; name. But, in this case, the patches are inherited from crawl with the
  6618. ;; "crawl-" prefix instead of "crawl-tiles-".
  6619. (define-public crawl-tiles
  6620. (package
  6621. (inherit crawl)
  6622. (name "crawl-tiles")
  6623. (arguments
  6624. (substitute-keyword-arguments
  6625. (package-arguments crawl)
  6626. ((#:make-flags flags)
  6627. #~(cons*
  6628. (string-append "PROPORTIONAL_FONT="
  6629. #$(this-package-input "font-dejavu")
  6630. "/share/fonts/truetype/DejaVuSans.ttf")
  6631. (string-append "MONOSPACED_FONT="
  6632. #$(this-package-input "font-dejavu")
  6633. "/share/fonts/truetype/DejaVuSansMono.ttf")
  6634. "TILES=y"
  6635. ;; Rename the executable to allow parallel installation with crawl.
  6636. "GAME=crawl-tiles"
  6637. #$flags))))
  6638. (inputs
  6639. (modify-inputs (package-inputs crawl)
  6640. (prepend font-dejavu freetype glu libpng sdl2 sdl2-image sdl2-mixer)))
  6641. (native-inputs
  6642. (modify-inputs (package-native-inputs crawl)
  6643. (prepend pngcrush which)))
  6644. (synopsis "Graphical roguelike dungeon crawler game")))
  6645. (define-public lugaru
  6646. (package
  6647. (name "lugaru")
  6648. (version "1.2")
  6649. (source (origin
  6650. (method url-fetch)
  6651. (uri (string-append "https://bitbucket.org/osslugaru/lugaru/downloads/"
  6652. "lugaru-" version ".tar.xz"))
  6653. (sha256
  6654. (base32
  6655. "15zgcshy22q51rm72zi6y9z7qlgnz5iw3gczjdlir4bqmxy4gspk"))))
  6656. (build-system cmake-build-system)
  6657. (arguments
  6658. `(#:configure-flags
  6659. (list "-DSYSTEM_INSTALL=ON")
  6660. ;; no test target
  6661. #:tests? #f))
  6662. (native-inputs
  6663. (list pkg-config))
  6664. (inputs
  6665. `(("sdl2" ,sdl2)
  6666. ("glu" ,glu)
  6667. ("libjpeg" ,libjpeg-turbo)
  6668. ("libpng" ,libpng)
  6669. ("openal" ,openal)
  6670. ("vorbis" ,libvorbis)
  6671. ("zlib" ,zlib)))
  6672. (home-page "https://osslugaru.gitlab.io")
  6673. (synopsis "Cross-platform third-person action game")
  6674. (description "Lugaru is a third-person action game. The main character,
  6675. Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills.
  6676. In his quest to find those responsible for slaughtering his village, he uncovers
  6677. a far-reaching conspiracy involving the corrupt leaders of the rabbit republic
  6678. and the starving wolves from a nearby den. Turner takes it upon himself to
  6679. fight against their plot and save his fellow rabbits from slavery.")
  6680. (license (list license:gpl2+ ; code
  6681. ;; assets:
  6682. license:cc-by-sa3.0
  6683. license:cc-by-sa4.0))))
  6684. (define-public 0ad-data
  6685. (package
  6686. (name "0ad-data")
  6687. (version "0.0.26-alpha")
  6688. (source
  6689. (origin
  6690. (method url-fetch)
  6691. (uri (string-append "https://releases.wildfiregames.com/0ad-"
  6692. version "-unix-data.tar.xz"))
  6693. (file-name (string-append name "-" version ".tar.xz"))
  6694. (sha256
  6695. (base32 "0z9dfw2hn2fyrx70866lv5464fbagdb8dip321wq10pqb22y805j"))))
  6696. (build-system trivial-build-system)
  6697. (native-inputs (list tar unzip xz))
  6698. (arguments
  6699. `(#:modules ((guix build utils))
  6700. #:builder
  6701. (begin
  6702. (use-modules (guix build utils))
  6703. (let ((out (assoc-ref %outputs "out"))
  6704. (source (assoc-ref %build-inputs "source"))
  6705. (tar (search-input-file %build-inputs "/bin/tar"))
  6706. (unzip (search-input-file %build-inputs "/bin/unzip"))
  6707. (xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
  6708. (setenv "PATH" xz-path)
  6709. (mkdir out)
  6710. (invoke tar "xvf" source "-C" out "--strip=3")
  6711. (for-each (lambda (name)
  6712. (let* ((dir (string-append out "/mods/" name))
  6713. (file (string-append dir "/" name ".zip")))
  6714. (invoke unzip "-o" "-d" dir file)
  6715. (delete-file file)))
  6716. '("mod" "public"))))))
  6717. (synopsis "Data files for 0ad")
  6718. (description "0ad-data provides the data files required by the game 0ad.")
  6719. (home-page "https://play0ad.com")
  6720. (license (list (license:fsdg-compatible
  6721. "http://tavmjong.free.fr/FONTS/ArevCopyright.txt"
  6722. "Similar to the license of the Bitstream Vera fonts.")
  6723. (license:fsdg-compatible
  6724. "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")
  6725. license:cc-by-sa3.0
  6726. license:expat
  6727. license:gfl1.0
  6728. license:gpl2+
  6729. license:gpl3+))))
  6730. (define-public 0ad
  6731. (package
  6732. (name "0ad")
  6733. (version "0.0.26-alpha")
  6734. (source
  6735. (origin
  6736. (method url-fetch)
  6737. (uri (string-append "https://releases.wildfiregames.com/0ad-"
  6738. version "-unix-build.tar.xz"))
  6739. (file-name (string-append name "-" version ".tar.xz"))
  6740. (sha256
  6741. (base32 "0jzfq09ispi7740c01h6yqxqv9y3zx66d217z32pfbiiwgvns71f"))))
  6742. ;; A snippet here would cause a build failure because of timestamps
  6743. ;; reset. See https://bugs.gnu.org/26734.
  6744. (inputs
  6745. (list 0ad-data
  6746. curl
  6747. enet
  6748. fmt
  6749. freetype
  6750. gloox
  6751. icu4c-68
  6752. libidn
  6753. libpng
  6754. libsodium
  6755. libvorbis
  6756. libxcursor
  6757. libxml2
  6758. miniupnpc
  6759. mozjs-78
  6760. openal
  6761. sdl2
  6762. wxwidgets
  6763. zlib))
  6764. (native-inputs
  6765. (list boost
  6766. cmake-minimal
  6767. cxxtest
  6768. mesa
  6769. pkg-config
  6770. python-2))
  6771. (build-system gnu-build-system)
  6772. (arguments
  6773. `(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
  6774. #:tests? #f ;tests fail currently
  6775. #:phases
  6776. (modify-phases %standard-phases
  6777. (add-after 'unpack 'delete-bundles
  6778. (lambda* (#:key inputs #:allow-other-keys)
  6779. (delete-file-recursively "libraries/source/spidermonkey")
  6780. (delete-file-recursively "libraries/source/cxxtest-4.4")
  6781. (substitute* "build/premake/premake5.lua"
  6782. (("rootdir\\.\\.\"\\/libraries\\/source\\/cxxtest-4.4\\/bin\\/cxxtestgen\"")
  6783. (string-append "\"" (assoc-ref inputs "cxxtest")
  6784. "/bin/cxxtestgen"
  6785. "\"")))))
  6786. (add-after 'unpack 'fix-mozjs-compatibility
  6787. ;; 0ad only builds fine with a specific version of mozjs
  6788. ;; (version 78.6 for 0ad-0.0.25).
  6789. ;; Here we change the error in case of version mismatch to a warning,
  6790. ;; and add some minor compatibility fixes.
  6791. (lambda _
  6792. (substitute* "source/scriptinterface/ScriptTypes.h"
  6793. (("#error Your compiler is trying to use")
  6794. "#warning Your compiler is trying to use"))
  6795. (substitute* "source/scriptinterface/ScriptContext.cpp"
  6796. (("JS::PrepareZoneForGC\\(")
  6797. "JS::PrepareZoneForGC(m_cx, "))))
  6798. (replace 'configure
  6799. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  6800. (let* ((jobs (number->string (parallel-job-count)))
  6801. (out (assoc-ref outputs "out"))
  6802. (lib (string-append out "/lib"))
  6803. (data (string-append out "/share/0ad")))
  6804. (setenv "JOBS" (string-append "-j" jobs))
  6805. (setenv "CC" "gcc")
  6806. (with-directory-excursion "build/workspaces"
  6807. (apply invoke
  6808. `("./update-workspaces.sh"
  6809. ,(string-append "--libdir=" lib)
  6810. ,(string-append "--datadir=" data)
  6811. ;; TODO: "--with-system-nvtt"
  6812. "--with-system-mozjs"
  6813. ,@(if tests? '() '("--without-tests"))))))))
  6814. (delete 'check)
  6815. (replace 'install
  6816. (lambda* (#:key inputs outputs #:allow-other-keys)
  6817. (chdir "binaries")
  6818. (let* ((out (assoc-ref outputs "out"))
  6819. (bin (string-append out "/bin"))
  6820. (lib (string-append out "/lib"))
  6821. (data (string-append out "/share/0ad"))
  6822. (applications (string-append out "/share/applications"))
  6823. (hicolor (string-append out "/share/icons/hicolor/128x128/apps"))
  6824. (metainfo (string-append out "/share/metainfo"))
  6825. (mime (string-append out "/share/mime/application"))
  6826. (0ad-data (assoc-ref inputs "0ad-data")))
  6827. ;; data
  6828. (copy-recursively "data" data)
  6829. (for-each (lambda (file)
  6830. (symlink (string-append 0ad-data "/" file)
  6831. (string-append data "/" file)))
  6832. '("config" "mods/mod" "mods/public" "tools"))
  6833. ;; libraries
  6834. (for-each (lambda (file)
  6835. (install-file file lib))
  6836. (find-files "system" "\\.so$"))
  6837. ;; binaries
  6838. (install-file "system/pyrogenesis" bin)
  6839. (with-directory-excursion bin
  6840. (symlink "pyrogenesis" "0ad"))
  6841. ;; resources
  6842. (with-directory-excursion "../build/resources"
  6843. (install-file "0ad.desktop" applications)
  6844. (install-file "0ad.png" hicolor)
  6845. (install-file "0ad.appdata.xml" metainfo)
  6846. (install-file "pyrogenesis.xml" mime)))))
  6847. (add-after 'install 'check
  6848. (lambda* (#:key tests? #:allow-other-keys)
  6849. (when tests?
  6850. (with-directory-excursion "system"
  6851. (invoke "./test"))))))))
  6852. (home-page "https://play0ad.com")
  6853. (synopsis "3D real-time strategy game of ancient warfare")
  6854. (description "0 A.D. is a real-time strategy (RTS) game of ancient
  6855. warfare. It's a historically-based war/economy game that allows players to
  6856. relive or rewrite the history of twelve ancient civilizations, each depicted
  6857. at their peak of economic growth and military prowess.
  6858. 0ad needs a window manager that supports 'Extended Window Manager Hints'.")
  6859. (license (list license:bsd-2
  6860. license:bsd-3
  6861. license:expat
  6862. license:gpl2+
  6863. license:ibmpl1.0
  6864. license:isc
  6865. license:lgpl2.1
  6866. license:lgpl3
  6867. license:mpl2.0
  6868. license:zlib))))
  6869. (define-public open-adventure
  6870. (package
  6871. (name "open-adventure")
  6872. (version "1.16")
  6873. (source
  6874. (origin
  6875. (method git-fetch)
  6876. (uri (git-reference
  6877. (url "https://gitlab.com/esr/open-adventure")
  6878. (commit version)))
  6879. (file-name (git-file-name name version))
  6880. (sha256
  6881. (base32 "0spciwqcyldalzdd813zwigbldcnyaxi7kfslq1yp0fg4c4a10aa"))))
  6882. (build-system gnu-build-system)
  6883. (arguments
  6884. (list
  6885. #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
  6886. #:parallel-tests? #f ;some tests fail non-deterministically
  6887. #:phases
  6888. #~(modify-phases %standard-phases
  6889. (delete 'configure) ;no configure script
  6890. (add-before 'build 'use-echo
  6891. (lambda _
  6892. (substitute* (list "tests/Makefile" "tests/tapview")
  6893. (("/bin/echo") (which "echo")))))
  6894. (add-after 'build 'build-manpage
  6895. (lambda _
  6896. ;; This target is missing a dependency
  6897. (substitute* "Makefile"
  6898. ((".adoc.6:" line)
  6899. (string-append line " advent.adoc")))
  6900. (invoke "make" ".adoc.6")))
  6901. ;; There is no install target.
  6902. (replace 'install
  6903. (lambda _
  6904. (let ((bin (string-append #$output "/bin"))
  6905. (man (string-append #$output "/share/man/man6")))
  6906. (install-file "advent" bin)
  6907. (install-file "advent.6" man)))))))
  6908. (native-inputs
  6909. (list asciidoc
  6910. libedit
  6911. pkg-config
  6912. python-pyyaml
  6913. python-wrapper))
  6914. (home-page "https://gitlab.com/esr/open-adventure")
  6915. (synopsis "Colossal Cave Adventure")
  6916. (description
  6917. "The original Colossal Cave Adventure from 1976 was the origin of all
  6918. text adventures, dungeon-crawl (computer) games, and computer-hosted
  6919. roleplaying games. This is a forward port of the last version released by
  6920. Crowther & Woods, its original authors, in 1995. It has been known as
  6921. ``adventure 2.5'' and ``430-point adventure''.")
  6922. (license license:bsd-2)))
  6923. (define-public open-adventure-2.5
  6924. (package
  6925. (inherit open-adventure)
  6926. (version "2.5")
  6927. (properties `((superseded . ,open-adventure)))))
  6928. (define-public tome4
  6929. (package
  6930. (name "tome4")
  6931. (version "1.7.4")
  6932. (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
  6933. (source
  6934. (origin
  6935. (method url-fetch)
  6936. (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
  6937. version ".tar.bz2"))
  6938. (sha256
  6939. (base32 "197jmd99l3w3sig32pvdlq9fcgdjjx7g9csy08kz174cyhrlyly3"))
  6940. (modules '((guix build utils)))
  6941. (snippet
  6942. '(begin
  6943. (substitute* '("src/music.h" "src/tSDL.h")
  6944. (("#elif defined(__FreeBSD__)" line)
  6945. (string-append
  6946. line " || defined(__GNUC__)")))
  6947. (substitute* '("src/tgl.h")
  6948. (("#include <GL/glext.h>") ""))))))
  6949. (build-system gnu-build-system)
  6950. (native-inputs
  6951. (list unzip))
  6952. (inputs
  6953. `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
  6954. ("glu" ,glu)
  6955. ("premake4" ,premake4)
  6956. ("openal" ,openal)
  6957. ("vorbis" ,libvorbis)
  6958. ("luajit" ,luajit)))
  6959. (arguments
  6960. `(#:make-flags
  6961. (list (string-append "CC=" ,(cc-for-target))
  6962. "config=release")
  6963. ;; XXX: Building in parallel occasionally causes this build failure:
  6964. ;; ../src/luajit2/src/host/buildvm.c:73:10: fatal error: buildvm_arch.h:
  6965. ;; No such file or directory
  6966. #:parallel-build? #f
  6967. #:phases (modify-phases %standard-phases
  6968. (delete 'bootstrap)
  6969. (replace 'configure
  6970. (lambda _
  6971. (invoke "premake4" "gmake")))
  6972. (add-after 'set-paths 'set-sdl-paths
  6973. (lambda* (#:key inputs #:allow-other-keys)
  6974. (setenv "CPATH"
  6975. (string-append
  6976. (search-input-directory inputs "/include/SDL2")
  6977. ":" (or (getenv "CPATH") "")))))
  6978. (delete 'check)
  6979. ;; premake doesn't provide install target
  6980. (replace 'install
  6981. (lambda* (#:key inputs outputs #:allow-other-keys)
  6982. (let* ((out (assoc-ref outputs "out"))
  6983. (usr (string-append out "/usr"))
  6984. (bin (string-append out "/bin"))
  6985. (licenses (string-append out "/share/licenses"))
  6986. (documents (string-append out "/share/doc"))
  6987. (pixmaps (string-append out "/share/pixmaps"))
  6988. (icon "te4-icon.png")
  6989. (data (string-append out "/share/" ,name))
  6990. (applications (string-append
  6991. out "/share/applications"))
  6992. (unzip (string-append
  6993. (assoc-ref inputs "unzip") "/bin/unzip"))
  6994. (wrapper (string-append bin "/" ,name)))
  6995. ;; icon
  6996. (mkdir-p pixmaps)
  6997. (invoke unzip "-j"
  6998. (string-append
  6999. "game/engines/te4-" ,version ".teae")
  7000. (string-append
  7001. "data/gfx/" icon) "-d" pixmaps)
  7002. ;; game executable
  7003. (install-file "t-engine" data)
  7004. (mkdir-p bin)
  7005. (with-output-to-file wrapper
  7006. (lambda ()
  7007. (display
  7008. (string-append
  7009. "#!/bin/sh\n"
  7010. ;; No bootstrap code found,
  7011. ;; defaulting to working directory
  7012. ;; for engine code!
  7013. "cd " data "\n"
  7014. "exec -a tome4 ./t-engine \"$@\"\n"))))
  7015. (chmod wrapper #o555)
  7016. ;; licenses
  7017. (for-each (lambda (file)
  7018. (install-file file licenses))
  7019. '("COPYING" "COPYING-MEDIA"))
  7020. ;; documents
  7021. (for-each (lambda (file)
  7022. (install-file file documents))
  7023. '("CONTRIBUTING" "CREDITS"))
  7024. ;; data
  7025. (copy-recursively "bootstrap" (string-append
  7026. data "/bootstrap"))
  7027. (copy-recursively "game" (string-append data "/game"))
  7028. ;; launcher
  7029. (mkdir-p applications)
  7030. (make-desktop-entry-file
  7031. (string-append applications "/" ,name ".desktop")
  7032. #:name "ToME4"
  7033. #:comment ,synopsis
  7034. #:exec ,name
  7035. #:icon icon
  7036. #:categories '("Game" "RolePlaying"))))))))
  7037. (home-page "https://te4.org")
  7038. (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
  7039. combat and advanced character building. Play as one of many unique races and
  7040. classes in the lore-filled world of Eyal, exploring random dungeons, facing
  7041. challenging battles, and developing characters with your own tailored mix of
  7042. abilities and powers. With a modern graphical and customisable interface,
  7043. intuitive mouse control, streamlined mechanics and deep, challenging combat,
  7044. Tales of Maj’Eyal offers engaging roguelike gameplay for the 21st century.")
  7045. (license license:gpl3+)))
  7046. (define-public quakespasm
  7047. (package
  7048. (name "quakespasm")
  7049. (version "0.93.2")
  7050. (source
  7051. (origin
  7052. (method url-fetch)
  7053. (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
  7054. version ".tgz"))
  7055. (sha256
  7056. (base32 "0qm0j5drybvvq8xadfyppkpk3rxqsxbywzm6iwsjwdf0iia3gss5"))))
  7057. (arguments
  7058. `(#:tests? #f
  7059. #:make-flags '("CC=gcc"
  7060. "MP3LIB=mpg123"
  7061. "USE_CODEC_FLAC=1"
  7062. "USE_CODEC_MIKMOD=1"
  7063. "USE_SDL2=1"
  7064. "-CQuake")
  7065. #:phases (modify-phases %standard-phases
  7066. (delete 'configure)
  7067. (add-after 'unpack 'fix-makefile-paths
  7068. (lambda* (#:key outputs #:allow-other-keys)
  7069. (let ((out (assoc-ref outputs "out")))
  7070. (mkdir-p (string-append out "/bin"))
  7071. (substitute* "Quake/Makefile"
  7072. (("/usr/local/games")
  7073. (string-append out "/bin")))
  7074. #t))))))
  7075. (build-system gnu-build-system)
  7076. (inputs (list libmikmod
  7077. libvorbis
  7078. flac
  7079. mesa
  7080. mpg123
  7081. sdl2))
  7082. (synopsis "First person shooter engine for Quake 1")
  7083. (description "Quakespasm is a modern engine for id software's Quake 1.
  7084. It includes support for 64 bit CPUs, custom music playback, a new sound driver,
  7085. some graphical niceities, and numerous bug-fixes and other improvements.")
  7086. (home-page "https://quakespasm.sourceforge.net/")
  7087. (license license:gpl2+)))
  7088. (define-public vkquake
  7089. (package
  7090. (inherit quakespasm)
  7091. (name "vkquake")
  7092. (version "1.01.0")
  7093. (source
  7094. (origin
  7095. (method git-fetch)
  7096. (uri (git-reference
  7097. (url "https://github.com/Novum/vkQuake")
  7098. (commit version)))
  7099. (file-name (git-file-name name version))
  7100. (sha256
  7101. (base32 "1iwin8j5kbyrknbkhjgpy8nmm7pxqzr0daa9gn7p38qhg2mh0a39"))))
  7102. (arguments
  7103. `(#:make-flags
  7104. (let ((vulkanlib (string-append (assoc-ref %build-inputs
  7105. "vulkan-loader") "/lib")))
  7106. (list "CC=gcc"
  7107. "MP3LIB=mpg123"
  7108. "USE_CODEC_FLAC=1"
  7109. "USE_CODEC_MIKMOD=1"
  7110. "USE_SDL2=1"
  7111. (string-append "LDFLAGS=-Wl,-rpath=" vulkanlib)
  7112. "-CQuake"))
  7113. #:phases (modify-phases %standard-phases
  7114. (add-after 'unpack 'patch-for-new-vulkan
  7115. (lambda _
  7116. ;; Mimic upstream commit a869a22d9b51c68e for
  7117. ;; compatibility with newer vulkan-headers.
  7118. (substitute* "Quake/gl_rmisc.c"
  7119. (("VK_DYNAMIC_STATE_RANGE_SIZE")
  7120. "3"))
  7121. #t))
  7122. (delete 'configure)
  7123. (add-after 'unpack 'fix-makefile-paths
  7124. (lambda* (#:key outputs #:allow-other-keys)
  7125. (let ((vulkan (assoc-ref %build-inputs
  7126. "vulkan-loader"))
  7127. (out (assoc-ref outputs "out")))
  7128. (mkdir-p (string-append out "/bin"))
  7129. (substitute* "Quake/Makefile" ((" /usr")
  7130. (string-append " " out)))
  7131. (substitute* "Quake/Makefile" (("/games")
  7132. (string-append "/bin")))
  7133. (substitute* "Quake/Makefile" (("..VULKAN_SDK.") vulkan))
  7134. #t))))
  7135. ,@(strip-keyword-arguments '(#:make-flags #:phases)
  7136. (package-arguments quakespasm))))
  7137. (inputs (modify-inputs (package-inputs quakespasm)
  7138. (prepend vulkan-headers vulkan-loader)))
  7139. (description "vkquake is a modern engine for id software's Quake 1.
  7140. It includes support for 64 bit CPUs, custom music playback, a new sound driver,
  7141. some graphical niceities, and numerous bug-fixes and other improvements.")
  7142. (home-page "https://github.com/Novum/vkQuake")))
  7143. (define-public yamagi-quake2
  7144. (package
  7145. (name "yamagi-quake2")
  7146. (version "7.45")
  7147. (source
  7148. (origin
  7149. (method url-fetch)
  7150. (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
  7151. version ".tar.xz"))
  7152. (sha256
  7153. (base32 "0rgz8x7lzd0zb0xqd0gvnf2641nr9xpfm6v14mgh99hspxklaln7"))))
  7154. (build-system gnu-build-system)
  7155. (arguments
  7156. `(#:tests? #f
  7157. #:make-flags
  7158. (list "CC=gcc"
  7159. ;; An optional directory where it will look for quake2 data files
  7160. ;; in addition to the current working directory.
  7161. "WITH_SYSTEMWIDE=yes"
  7162. "WITH_SYSTEMDIR=\"/opt/quake2\"")
  7163. #:phases
  7164. (modify-phases %standard-phases
  7165. (delete 'configure)
  7166. (add-before 'build 'patch-libraries
  7167. (lambda* (#:key inputs #:allow-other-keys)
  7168. ;; The game writes paths to openal.so and curl.so to ~/.yq2/...
  7169. ;; Workaround: hard-code the compiled paths where it loads them;
  7170. ;; this prevents loading old or garbage collected libraries.
  7171. (substitute* "src/client/sound/qal.c"
  7172. (("al_driver->string")
  7173. (string-append "\"" (assoc-ref inputs "openal")
  7174. "/lib/libopenal.so\"")))
  7175. (substitute* "src/client/curl/qcurl.c"
  7176. (("cl_libcurl->string")
  7177. (string-append "\"" (assoc-ref inputs "curl")
  7178. "/lib/libcurl.so\"")))))
  7179. (replace 'install
  7180. (lambda* (#:key outputs #:allow-other-keys)
  7181. (let ((out (assoc-ref outputs "out")))
  7182. (mkdir-p (string-append out "/lib"))
  7183. (mkdir-p (string-append out "/bin"))
  7184. ;; The yamagi-quake2 binary must be in the same directory
  7185. ;; as its engine libraries, but symlinking it to /bin is okay.
  7186. ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
  7187. (copy-recursively "release"
  7188. (string-append out "/lib/yamagi-quake2"))
  7189. (symlink (string-append out "/lib/yamagi-quake2/quake2")
  7190. (string-append out "/bin/yamagi-quake2"))
  7191. (symlink (string-append out "/lib/yamagi-quake2/q2ded")
  7192. (string-append out "/bin/yamagi-q2ded"))))))))
  7193. (native-inputs
  7194. (list pkg-config))
  7195. (inputs
  7196. (list curl
  7197. libvorbis
  7198. mesa
  7199. openal
  7200. sdl2
  7201. zlib))
  7202. (synopsis "First person shooter engine based on quake2")
  7203. (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
  7204. The main focus is an unchanged single player experience like back in 1997,
  7205. thus the gameplay and the graphics are unaltered. However the user may use one
  7206. of the unofficial retexturing packs. In comparison with the official client,
  7207. over 1000 bugs were fixed and an extensive code audit done,
  7208. making Yamagi Quake II one of the most solid Quake II implementations available.")
  7209. (home-page "https://www.yamagi.org/quake2/")
  7210. (license (list license:gpl2+ ; game and server
  7211. (license:non-copyleft ; info-zip
  7212. "file://LICENSE"
  7213. "See Info-Zip section.")
  7214. license:public-domain)))) ; stb
  7215. (define-public nudoku
  7216. (package
  7217. (name "nudoku")
  7218. (version "2.1.0")
  7219. (source
  7220. (origin
  7221. (method git-fetch)
  7222. (uri (git-reference
  7223. (url "https://github.com/jubalh/nudoku")
  7224. (commit version)))
  7225. (file-name (git-file-name name version))
  7226. (sha256
  7227. (base32 "12v00z3p0ymi8f3w4b4bgl4c76irawn3kmd147r0ap6s9ssx2q6m"))))
  7228. (build-system gnu-build-system)
  7229. (native-inputs
  7230. (list autoconf automake gettext-minimal pkg-config))
  7231. (inputs
  7232. (list ncurses))
  7233. (home-page "https://jubalh.github.io/nudoku/")
  7234. (synopsis "Sudoku for your terminal")
  7235. (description "Nudoku is a ncurses-based Sudoku game for your terminal.")
  7236. (license license:gpl3+)))
  7237. (define-public the-butterfly-effect
  7238. (package
  7239. (name "the-butterfly-effect")
  7240. (version "0.9.3.1")
  7241. (source
  7242. (origin
  7243. (method git-fetch)
  7244. (uri (git-reference
  7245. (url "https://github.com/the-butterfly-effect/tbe")
  7246. (commit (string-append "v" version))))
  7247. (file-name (git-file-name name version))
  7248. (sha256
  7249. (base32
  7250. "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj"))))
  7251. (build-system gnu-build-system)
  7252. (arguments
  7253. `(#:phases
  7254. (modify-phases %standard-phases
  7255. (delete 'configure)
  7256. ;; There is no "install" phase. By default, tbe is installed
  7257. ;; in the build directory. Provide our own installation.
  7258. (replace 'install
  7259. (lambda* (#:key outputs #:allow-other-keys)
  7260. (let* ((out (assoc-ref outputs "out"))
  7261. (bin (string-append out "/bin"))
  7262. (share (string-append out "/share")))
  7263. (install-file "usr/games/tbe" bin)
  7264. (mkdir-p share)
  7265. (copy-recursively "usr/share" share)
  7266. #t))))
  7267. ;; Test suite requires a running Xorg server. Even when
  7268. ;; provided, it fails with "D-Bus library appears to be
  7269. ;; incorrectly set up; failed to read machine uuid: Failed to
  7270. ;; open "/etc/machine-id": No such file or directory" along
  7271. ;; with multiple "QPainter:: ... Painter not active" warnings.
  7272. #:tests? #f))
  7273. (inputs
  7274. (list qtbase-5 qtsvg-5))
  7275. (native-inputs
  7276. `(("cmake" ,cmake-minimal)
  7277. ("gettext-minimal" ,gettext-minimal)
  7278. ("qttools-5" ,qttools-5)))
  7279. (synopsis "Realistic physics puzzle game")
  7280. (description "The Butterfly Effect (tbe) is a game that uses
  7281. realistic physics simulations to combine lots of simple mechanical
  7282. elements to achieve a simple goal in the most complex way possible.")
  7283. (home-page "http://the-butterfly-effect.org/")
  7284. ;; Main license is GPL2-only. However, artwork is distributed
  7285. ;; under various licenses, listed here.
  7286. (license (list license:gpl2 license:public-domain license:expat
  7287. license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))
  7288. (define-public pioneer
  7289. (package
  7290. (name "pioneer")
  7291. (version "20220203")
  7292. (source (origin
  7293. (method git-fetch)
  7294. (uri (git-reference
  7295. (url "https://github.com/pioneerspacesim/pioneer")
  7296. (commit version)))
  7297. (file-name (git-file-name name version))
  7298. (sha256
  7299. (base32
  7300. "0qjq6lsr1rmcnvq9b7r745cpp7n0q6cpc3k81q8ai4xspbq61m8w"))))
  7301. (build-system cmake-build-system)
  7302. (native-inputs
  7303. (list pkg-config))
  7304. (inputs
  7305. (list assimp
  7306. curl
  7307. freetype
  7308. glew
  7309. glu
  7310. libpng
  7311. libsigc++-2
  7312. libvorbis
  7313. lua-5.2 ;not compatible with 5.3
  7314. mesa
  7315. (sdl-union (list sdl2 sdl2-image))))
  7316. (arguments
  7317. `(#:tests? #f ;tests are broken
  7318. #:configure-flags (list "-DUSE_SYSTEM_LIBLUA:BOOL=YES"
  7319. "-DUSE_SYSTEM_LIBGLEW:BOOL=YES"
  7320. (string-append "-DPIONEER_DATA_DIR="
  7321. %output "/share/games/pioneer"))
  7322. #:make-flags (list "all" "build-data")))
  7323. (home-page "https://pioneerspacesim.net")
  7324. (synopsis "Game of lonely space adventure")
  7325. (description
  7326. "Pioneer is a space adventure game set in our galaxy at the turn of the
  7327. 31st century. The game is open-ended, and you are free to eke out whatever
  7328. kind of space-faring existence you can think of. Look for fame or fortune by
  7329. exploring the millions of star systems. Turn to a life of crime as a pirate,
  7330. smuggler or bounty hunter. Forge and break alliances with the various
  7331. factions fighting for power, freedom or self-determination. The universe is
  7332. whatever you make of it.")
  7333. (license license:gpl3)))
  7334. (define-public badass
  7335. (let ((commit "3c3cd669b4fc8f73a102e3702788f7b28dc47dbb")
  7336. (revision "0"))
  7337. (package
  7338. (name "badass")
  7339. (version (git-version "0.0" revision commit))
  7340. (source (origin
  7341. (method git-fetch)
  7342. (uri (git-reference
  7343. (url "https://github.com/umayr/badass")
  7344. (commit commit)))
  7345. (file-name (git-file-name name version))
  7346. (sha256
  7347. (base32
  7348. "05c9vdcb5ym3z0n5ll3v39mw4yl9jcjnlydmn0yl89ai9pv71zb6"))))
  7349. (build-system go-build-system)
  7350. (arguments
  7351. '(#:import-path "github.com/umayr/badass"))
  7352. (synopsis "Hacking contribution graphs in git")
  7353. (description
  7354. "Badass generates false commits for a range of dates, essentially
  7355. hacking the gamification of contribution graphs on platforms such as
  7356. Github or Gitlab.")
  7357. (home-page "https://github.com/umayr/badass")
  7358. (license license:expat))))
  7359. (define-public colobot
  7360. (package
  7361. (name "colobot")
  7362. (version "0.2.0-alpha")
  7363. (source
  7364. (origin
  7365. (method git-fetch)
  7366. (uri (git-reference
  7367. (url "https://github.com/colobot/colobot")
  7368. (commit (string-append "colobot-gold-" version))
  7369. (recursive? #t))) ;for "data/" subdir
  7370. (file-name (git-file-name name version))
  7371. (sha256
  7372. (base32 "02z21pw47j2afjsikn5b162gacwgiahdrlhmfxhq4xqlzsvz58z6"))))
  7373. (build-system cmake-build-system)
  7374. (arguments
  7375. `(#:tests? #f ;no test
  7376. #:phases
  7377. (modify-phases %standard-phases
  7378. (add-after 'unpack 'make-git-checkout-writable
  7379. (lambda _
  7380. (for-each make-file-writable (find-files "."))
  7381. #t))
  7382. (add-after 'unpack 'fix-directories
  7383. (lambda _
  7384. (substitute* "CMakeLists.txt"
  7385. (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix)
  7386. (string-append prefix "/bin"))
  7387. (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ prefix)
  7388. (string-append prefix "/colobot")))
  7389. #t))
  7390. (add-after 'fix-directories 'install-music
  7391. ;; Retrieve and install music files.
  7392. (lambda* (#:key inputs #:allow-other-keys)
  7393. ;; Installation process tries to download music files using
  7394. ;; "wget" if not already present. Since we are going another
  7395. ;; route, skip "wget" command check.
  7396. (substitute* "data/music/CMakeLists.txt"
  7397. (("find_program\\(WGET wget\\)") ""))
  7398. ;; Populate "music/" directory.
  7399. (let ((data (assoc-ref inputs "colobot-music")))
  7400. (invoke "tar" "-xvf" data "-Cdata/music"))
  7401. #t)))))
  7402. (native-inputs
  7403. `(("colobot-music"
  7404. ,(origin
  7405. (method url-fetch)
  7406. (uri (string-append "https://colobot.info/files/music/"
  7407. "colobot-music_ogg_" version ".tar.gz"))
  7408. (sha256
  7409. (base32
  7410. "1s86cd36rwkff329mb1ay1wi5qqyi35564ppgr3f4qqz9wj9vs2m"))))
  7411. ("gettext" ,gettext-minimal)
  7412. ("librsvg" ,librsvg)
  7413. ("po4a" ,po4a)
  7414. ("python" ,python-wrapper)))
  7415. (inputs
  7416. `(("boost" ,boost)
  7417. ("glew" ,glew)
  7418. ("libogg" ,libogg)
  7419. ("libpng" ,libpng)
  7420. ("libsndfile" ,libsndfile)
  7421. ("libvorbis" ,libvorbis)
  7422. ("openal" ,openal)
  7423. ("physfs" ,physfs)
  7424. ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-ttf)))))
  7425. (synopsis "Educational programming strategy game")
  7426. (description "Colobot: Gold Edition is a real-time strategy game, where
  7427. you can program your units (bots) in a language called CBOT, which is similar
  7428. to C++ and Java. Your mission is to find a new planet to live and survive.
  7429. You can save humanity and get programming skills!")
  7430. (home-page "https://colobot.info")
  7431. (license license:gpl3+)))
  7432. (define-public gzdoom
  7433. (package
  7434. (name "gzdoom")
  7435. (version "4.3.2")
  7436. (source
  7437. (origin
  7438. (method git-fetch)
  7439. (uri (git-reference
  7440. (url "https://github.com/coelckers/gzdoom")
  7441. (commit (string-append "g" version))))
  7442. (file-name (git-file-name name version))
  7443. (sha256
  7444. (base32 "0i4hyg72z84fc6ca2ic9q82q5cbgrbd7bynl3kpkypxvyasq08wz"))
  7445. (patches (search-patches "gzdoom-search-in-installed-share.patch"
  7446. "gzdoom-find-system-libgme.patch"))
  7447. (modules '((guix build utils)))
  7448. (snippet
  7449. '(begin
  7450. ;; Remove some bundled libraries. XXX There are more, but removing
  7451. ;; them would require, at least, patching the build system.
  7452. (with-directory-excursion "libraries"
  7453. (delete-file-recursively "bzip2")
  7454. (delete-file-recursively "game-music-emu")
  7455. (delete-file-recursively "jpeg")
  7456. (delete-file-recursively "zlib"))
  7457. #t))))
  7458. (arguments
  7459. '(#:tests? #f
  7460. #:configure-flags
  7461. (let ((out (assoc-ref %outputs "out")))
  7462. (list
  7463. (string-append
  7464. "-DCMAKE_CXX_FLAGS:="
  7465. "-DSHARE_DIR=\\\"" out "/share/\\\" "
  7466. "-DGUIX_OUT_PK3=\\\"" out "/share/games/doom\\\"")
  7467. ;; The build requires some extra convincing not to use the bundled
  7468. ;; libgme previously deleted in the soure snippet.
  7469. "-DFORCE_INTERNAL_GME=OFF"
  7470. ;; Link libraries at build time instead of loading them at run time.
  7471. "-DDYN_OPENAL=OFF"
  7472. "-DDYN_FLUIDSYNTH=OFF"
  7473. "-DDYN_GTK=OFF"
  7474. "-DDYN_MPG123=OFF"
  7475. "-DDYN_SNDFILE=OFF"))
  7476. #:phases
  7477. (modify-phases %standard-phases
  7478. (add-before 'configure 'fix-referenced-paths
  7479. (lambda* (#:key inputs outputs #:allow-other-keys)
  7480. (let ((fluid-3 (assoc-ref inputs "fluid-3"))
  7481. (timidity++ (assoc-ref inputs "timidity++"))
  7482. (out (assoc-ref outputs "out")))
  7483. (substitute*
  7484. "src/CMakeLists.txt"
  7485. (("COMMAND /bin/sh")
  7486. (string-append "COMMAND " (which "sh"))))
  7487. (substitute*
  7488. "libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp"
  7489. (("/usr/share/sounds/sf2/FluidR3_GM.sf2")
  7490. (string-append fluid-3 "/share/soundfonts/FluidR3Mono_GM.sf3")))
  7491. (substitute*
  7492. "libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp"
  7493. (("exename = \"timidity\"")
  7494. (string-append "exename = \"" timidity++ "/bin/timidity\"")))
  7495. #t))))))
  7496. (build-system cmake-build-system)
  7497. (inputs `(("bzip2" ,bzip2)
  7498. ("fluid-3" ,fluid-3)
  7499. ("fluidsynth" ,fluidsynth)
  7500. ("gtk+3" ,gtk+)
  7501. ("libgme" ,libgme)
  7502. ("libjpeg" ,libjpeg-turbo)
  7503. ("libsndfile" ,libsndfile)
  7504. ("mesa" ,mesa)
  7505. ("mpg123" ,mpg123)
  7506. ("openal" ,openal)
  7507. ("sdl2" ,sdl2)
  7508. ("timidity++" ,timidity++)
  7509. ("zlib" ,zlib)))
  7510. (native-inputs (list pkg-config unzip))
  7511. (synopsis "Modern Doom 2 source port")
  7512. (description "GZdoom is a port of the Doom 2 game engine, with a modern
  7513. renderer. It improves modding support with ZDoom's advanced mapping features
  7514. and the new ZScript language. In addition to Doom, it supports Heretic, Hexen,
  7515. Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.")
  7516. (home-page "https://zdoom.org/index")
  7517. ;; The source uses x86 assembly
  7518. (supported-systems '("x86_64-linux" "i686-linux"))
  7519. (license (list license:gpl3+ ; gzdoom game
  7520. license:lgpl3+ ; gzdoom renderer
  7521. license:expat ; gdtoa
  7522. (license:non-copyleft ; modified dumb
  7523. "file://dumb/licence.txt"
  7524. "Dumb license, explicitly GPL compatible.")))))
  7525. (define-public odamex
  7526. (package
  7527. (name "odamex")
  7528. (version "0.9.5")
  7529. (source
  7530. (origin
  7531. (method url-fetch)
  7532. (uri (string-append
  7533. "mirror://sourceforge/odamex/Odamex/" version "/"
  7534. "odamex-src-" version ".tar.bz2"))
  7535. (sha256
  7536. (base32 "1x0c9vnwn336inkfamh4na8xjyfjmzfxfn49j4snqymkypjqw6jq"))))
  7537. (build-system cmake-build-system)
  7538. (arguments `(#:tests? #f)) ; no tests
  7539. (native-inputs
  7540. (list deutex))
  7541. (inputs
  7542. `(("sdl" ,sdl2)
  7543. ("sdl-mixer" ,sdl2-mixer)
  7544. ("zlib" ,zlib)
  7545. ("libpng" ,libpng)
  7546. ("curl" ,curl)
  7547. ("alsa-lib" ,alsa-lib)))
  7548. (home-page "https://odamex.net/")
  7549. (synopsis "Multiplayer Doom port")
  7550. (description "Odamex is a modification of the Doom engine that
  7551. allows players to easily join servers dedicated to playing Doom
  7552. online.")
  7553. (license license:gpl2+)))
  7554. (define-public chocolate-doom
  7555. (package
  7556. (name "chocolate-doom")
  7557. (version "3.0.1")
  7558. (source (origin
  7559. (method url-fetch)
  7560. (uri (string-append "https://www.chocolate-doom.org/downloads/"
  7561. version
  7562. "/chocolate-doom-"
  7563. version
  7564. ".tar.gz"))
  7565. (sha256
  7566. (base32
  7567. "1iy8rx7kjvi1zjiw4zh77szzmd1sgpqajvbhprh1sj93fhbxcdfl"))))
  7568. (build-system gnu-build-system)
  7569. (arguments
  7570. `(#:configure-flags (list "CFLAGS=-fcommon")))
  7571. (inputs (list sdl2-net sdl2-mixer sdl2))
  7572. (native-inputs
  7573. (list pkg-config))
  7574. (synopsis "Doom source port preserving the look, feel, and bugs of vanilla
  7575. Doom")
  7576. (description
  7577. "Chocolate Doom takes a different approach to other source ports. Its
  7578. aim is to accurately reproduce the experience of playing Vanilla Doom. It is
  7579. a conservative, historically accurate Doom source port, which is compatible
  7580. with the thousands of mods and levels that were made before the Doom source
  7581. code was released. Rather than flashy new graphics, Chocolate Doom's main
  7582. features are its accurate reproduction of the game as it was played in the
  7583. 1990s. The project is developed around a carefully-considered philosophy that
  7584. intentionally restricts which features may be added (and rejects any that
  7585. affect gameplay).")
  7586. (home-page "https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom")
  7587. (license license:gpl2)))
  7588. (define-public crispy-doom
  7589. (package
  7590. (inherit chocolate-doom)
  7591. (name "crispy-doom")
  7592. (version "5.8.0")
  7593. (source (origin
  7594. (method git-fetch)
  7595. (uri (git-reference
  7596. (url "https://github.com/fabiangreffrath/crispy-doom")
  7597. (commit (string-append "crispy-doom-" version))))
  7598. (file-name (git-file-name name version))
  7599. (sha256
  7600. (base32 "1b6gn0dysv631jynh769whww9xcss1gms78sz3nrn855q1dsvcb4"))))
  7601. (native-inputs
  7602. (append
  7603. (package-native-inputs chocolate-doom)
  7604. `(("automake" ,automake)
  7605. ("autoreconf" ,autoconf))))
  7606. (arguments
  7607. `(#:configure-flags '("CFLAGS=-fcommon")
  7608. #:phases
  7609. (modify-phases %standard-phases
  7610. (replace 'bootstrap
  7611. ;; The bundled autogen.sh script unconditionally runs ./configure.
  7612. (lambda _ (invoke "autoreconf" "-vif"))))))
  7613. (synopsis "Limit-removing enhanced-resolution Doom source port based on
  7614. Chocolate Doom")
  7615. (description
  7616. "Crispy Doom is a friendly fork of Chocolate Doom that provides a higher
  7617. display resolution, removes the static limits of the Doom engine and offers
  7618. further optional visual, tactical and physical enhancements while remaining
  7619. entirely config file, savegame, netplay and demo compatible with the
  7620. original.")
  7621. (home-page "https://www.chocolate-doom.org/wiki/index.php/Crispy_Doom")))
  7622. (define xonotic-data
  7623. (package
  7624. (name "xonotic-data")
  7625. (version "0.8.5")
  7626. (source
  7627. (origin
  7628. (method url-fetch)
  7629. (uri (string-append "https://dl.xonotic.org/xonotic-"
  7630. version ".zip"))
  7631. (file-name (string-append name "-" version ".zip"))
  7632. (sha256
  7633. (base32 "1r9pdrrki7mkdw99zh9m7911fqldsfdnl0nrp5cv1bk2hcism4hg"))))
  7634. (build-system trivial-build-system)
  7635. (native-inputs (list unzip))
  7636. (arguments
  7637. (list #:modules '((guix build utils))
  7638. #:builder
  7639. #~(begin
  7640. (use-modules (guix build utils))
  7641. (let* ((out (assoc-ref %outputs "out"))
  7642. (xonotic (string-append out "/share/xonotic"))
  7643. (source (assoc-ref %build-inputs "source"))
  7644. (unzip (search-input-file %build-inputs "/bin/unzip")))
  7645. (invoke unzip source)
  7646. (chdir "Xonotic")
  7647. (install-file "key_0.d0pk" xonotic)
  7648. (copy-recursively "data"
  7649. (string-append xonotic "/data"))
  7650. (copy-recursively "server"
  7651. (string-append xonotic "/server"))))))
  7652. (home-page "https://xonotic.org")
  7653. (synopsis "Data files for Xonotic")
  7654. (description
  7655. "Xonotic-data provides the data files required by the game Xonotic.")
  7656. (license (list license:gpl2+
  7657. (license:x11-style "file://server/rcon.pl")))))
  7658. (define-public xonotic
  7659. (package
  7660. (name "xonotic")
  7661. (version "0.8.5")
  7662. (source
  7663. (origin
  7664. (method url-fetch)
  7665. (uri (string-append "https://dl.xonotic.org/xonotic-"
  7666. version "-source.zip"))
  7667. (file-name (string-append name "-" version ".zip"))
  7668. (sha256
  7669. (base32 "0pgahai0gk8bjmvkwx948bl50l9f9dhmjzwffl4vyldibajipa51"))))
  7670. (build-system gnu-build-system)
  7671. (arguments
  7672. (list #:configure-flags
  7673. #~(list (string-append "--prefix=" #$output)
  7674. "--disable-rijndael")
  7675. #:modules '((guix build gnu-build-system)
  7676. (guix build utils)
  7677. (srfi srfi-26))
  7678. #:phases
  7679. #~(modify-phases %standard-phases
  7680. (add-before 'configure 'build-darkplaces
  7681. (lambda* (#:key make-flags parallel-build? outputs
  7682. #:allow-other-keys)
  7683. (let* ((out (assoc-ref outputs "out"))
  7684. (share (string-append out "/share/xonotic/")))
  7685. (apply invoke "make"
  7686. "-C" "source/darkplaces"
  7687. "-f" "makefile"
  7688. "-j" (if parallel-build?
  7689. (number->string (parallel-job-count))
  7690. "1")
  7691. (string-append "CC=" #$(cc-for-target))
  7692. (string-append "DP_FS_BASEDIR=" share)
  7693. "DP_LINK_TO_LIBJPEG=1"
  7694. "DP_SOUND_API=ALSA"
  7695. "cl-release"
  7696. "sdl-release"
  7697. "sv-release"
  7698. make-flags))))
  7699. (add-before 'configure 'preconfigure
  7700. (lambda _
  7701. (chdir "source/d0_blind_id")
  7702. (invoke "sh" "autogen.sh")))
  7703. (add-after 'install 'symlink-data
  7704. (lambda* (#:key outputs inputs #:allow-other-keys)
  7705. (let* ((out (assoc-ref outputs "out"))
  7706. (data (assoc-ref inputs "xonotic-data")))
  7707. (symlink (string-append data "/share/xonotic")
  7708. (string-append out "/share/xonotic")))))
  7709. (add-after 'install 'install-desktop-entries
  7710. (lambda* (#:key outputs #:allow-other-keys)
  7711. (let* ((out (assoc-ref outputs "out"))
  7712. (app (string-append out "/share/applications")))
  7713. ;; Add .desktop files for the 2 variants and the symlink.
  7714. (for-each
  7715. (lambda (variant)
  7716. (let* ((file (if variant
  7717. (format #f "xonotic-~(~a~)" variant)
  7718. "xonotic"))
  7719. (name (if variant
  7720. (format #f "Xonotic (~a)" variant)
  7721. "Xonotic"))
  7722. (exec (string-append out "/bin/" file)))
  7723. (make-desktop-entry-file
  7724. (string-append app "/" file ".desktop")
  7725. #:name name
  7726. #:comment `((#f #$(package-synopsis this-package)))
  7727. #:exec exec
  7728. #:try-exec exec
  7729. #:icon "xonotic"
  7730. #:categories '("Game"))))
  7731. (list #f "GLX" "SDL")))))
  7732. (add-after 'install 'install-icons
  7733. (lambda* (#:key outputs #:allow-other-keys)
  7734. (let ((out (assoc-ref outputs "out")))
  7735. (for-each
  7736. (lambda (file)
  7737. (let* ((size (string-filter char-numeric? file))
  7738. (icons (string-append out "/share/icons/hicolor/"
  7739. size "x" size "/apps")))
  7740. (mkdir-p icons)
  7741. (copy-file file (string-append icons "/xonotic.png"))))
  7742. (find-files "../../misc/logos/icons_png"
  7743. "^xonotic_[0-9]+\\.png$")))))
  7744. (add-after 'install 'install-binaries
  7745. (lambda* (#:key outputs #:allow-other-keys)
  7746. (let* ((out (assoc-ref outputs "out"))
  7747. (bin (string-append out "/bin")))
  7748. (for-each
  7749. (lambda (variant)
  7750. (copy-file
  7751. (string-append "../darkplaces/darkplaces-" variant)
  7752. (string-append bin "/xonotic-" variant)))
  7753. (list "dedicated" "glx" "sdl")))))
  7754. (add-after 'install-binaries 'wrap-binaries
  7755. (lambda* (#:key outputs inputs #:allow-other-keys)
  7756. ;; All games must be wrapped to get sound and networking.
  7757. (let* ((out (assoc-ref outputs "out"))
  7758. (bin (string-append out "/bin"))
  7759. (curl (assoc-ref inputs "curl"))
  7760. (vorbis (assoc-ref inputs "libvorbis")))
  7761. (for-each (cut wrap-program <>
  7762. `("LD_LIBRARY_PATH" ":" prefix
  7763. (,(string-append curl "/lib:"
  7764. vorbis "/lib"))))
  7765. (find-files bin "^xonotic"))
  7766. ;; Provide a default xonotic executable, defaulting to SDL.
  7767. (symlink "xonotic-sdl" (string-append bin "/xonotic"))))))))
  7768. (native-inputs
  7769. (list autoconf
  7770. automake
  7771. gmp
  7772. libtool
  7773. pkg-config
  7774. unzip))
  7775. (inputs
  7776. (list alsa-lib
  7777. curl
  7778. libjpeg-turbo
  7779. libmodplug
  7780. libvorbis
  7781. libogg
  7782. libpng
  7783. libx11
  7784. libxpm
  7785. libxxf86dga
  7786. libxxf86vm
  7787. libxext
  7788. libxau
  7789. libxdmcp
  7790. mesa
  7791. glu
  7792. freetype
  7793. sdl2
  7794. hicolor-icon-theme
  7795. xonotic-data))
  7796. (home-page "https://xonotic.org")
  7797. (synopsis "Fast-paced first-person shooter game")
  7798. (description
  7799. "Xonotic is a free, fast-paced first-person shooter.
  7800. The project is geared towards providing addictive arena shooter
  7801. gameplay which is all spawned and driven by the community itself.
  7802. Xonotic is a direct successor of the Nexuiz project with years of
  7803. development between them, and it aims to become the best possible
  7804. open-source FPS of its kind.")
  7805. (license (list license:gpl2+
  7806. license:bsd-3 ; /source/d0_blind_id folder and others
  7807. (license:x11-style "" "See file rcon.pl.")))))
  7808. (define-public frotz
  7809. (package
  7810. (name "frotz")
  7811. (version "2.54")
  7812. (source (origin
  7813. (method url-fetch)
  7814. (uri (list (string-append
  7815. "http://www.ifarchive.org/if-archive/infocom/interpreters/"
  7816. "frotz/frotz-" version ".tar.gz")
  7817. (string-append
  7818. "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
  7819. "frotz/frotz-" version ".tar.gz")))
  7820. (sha256
  7821. (base32
  7822. "1vsfq9ryyb4nvzxpnnn40k423k9pdy8k67i8390qz5h0vmxw0fds"))))
  7823. (build-system gnu-build-system)
  7824. (arguments
  7825. (list #:tests? #f ; there are no tests
  7826. #:make-flags
  7827. #~(list (string-append "CC=" #$(cc-for-target)))
  7828. #:phases
  7829. #~(modify-phases %standard-phases
  7830. (delete 'configure) ; no configure-script
  7831. (replace 'install
  7832. (lambda* (#:key outputs #:allow-other-keys)
  7833. (let* ((out (assoc-ref outputs "out"))
  7834. (bin (string-append out "/bin"))
  7835. (man (string-append out "/share/man/man6")))
  7836. (install-file "frotz" bin)
  7837. (mkdir-p man)
  7838. (install-file "doc/frotz.6" man)))))))
  7839. (native-inputs (list pkg-config which))
  7840. (inputs (list ao libmodplug libsamplerate libsndfile libvorbis ncurses))
  7841. (synopsis "Portable Z-machine interpreter (ncurses version) for text adventure games")
  7842. (description "Frotz is an interpreter for Infocom games and other Z-machine
  7843. games in the text adventure/interactive fiction genre. This version of Frotz
  7844. complies with standard 1.0 of Graham Nelson's specification. It plays all
  7845. Z-code games V1-V8, including V6, with sound support through libao, and uses
  7846. ncurses for text display.")
  7847. (home-page "https://frotz.sourceforge.net")
  7848. (license license:gpl2+)))
  7849. (define-public naev
  7850. (package
  7851. (name "naev")
  7852. (version "0.10.4")
  7853. (source
  7854. (origin
  7855. (method git-fetch)
  7856. (uri (git-reference
  7857. (url "https://github.com/naev/naev")
  7858. (commit (string-append "v" version))
  7859. (recursive? #t))) ; for game data
  7860. (file-name (git-file-name name version))
  7861. (sha256
  7862. (base32 "0lg8cmzdzzpmqgmh9a1v190vv4d15hwa0inyzdwsq5x8lyc13hyr"))))
  7863. (build-system meson-build-system)
  7864. (arguments
  7865. ;; XXX: Do not add debugging symbols, which cause the build to fail.
  7866. `(#:configure-flags (list "--buildtype=release")
  7867. #:tests? #f)) ;sole test fails with a missing "/dev/dri" error
  7868. (native-inputs
  7869. (list gettext-minimal pkg-config))
  7870. (inputs
  7871. (list enet
  7872. freetype
  7873. glpk
  7874. libpng
  7875. libunibreak
  7876. libvorbis
  7877. libwebp
  7878. libxml2
  7879. luajit
  7880. openal
  7881. openblas
  7882. pcre2
  7883. physfs
  7884. python
  7885. python-pyyaml
  7886. (sdl-union (list sdl2 sdl2-image sdl2-mixer))
  7887. suitesparse))
  7888. (home-page "https://naev.org/")
  7889. (synopsis "Game about space exploration, trade and combat")
  7890. (description
  7891. "Naev is a 2d action/rpg space game that combines elements from
  7892. the action, RPG and simulation genres. You pilot a spaceship from
  7893. a top-down perspective, and are more or less free to do what you want.
  7894. As the genre name implies, you’re able to trade and engage in combat
  7895. at will. Beyond that, there’s an ever-growing number of story-line
  7896. missions, equipment, and ships; even the galaxy itself grows larger
  7897. with each release. For the literacy-inclined, there are large amounts
  7898. of lore accompanying everything from planets to equipment.")
  7899. (license (list license:gpl3
  7900. license:public-domain
  7901. license:expat ;edtaa3func.c
  7902. license:bsd-2 ;distance_field.c
  7903. license:bsd-3)))) ;perlin.c
  7904. (define-public frotz-dumb-terminal
  7905. (package
  7906. (name "frotz-dumb-terminal")
  7907. (version "2.44")
  7908. (source (origin
  7909. (method url-fetch)
  7910. (uri (list (string-append
  7911. "http://www.ifarchive.org/if-archive/infocom/interpreters/"
  7912. "frotz/frotz-" version ".tar.gz")
  7913. (string-append
  7914. "ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/"
  7915. "frotz/frotz-" version ".tar.gz")))
  7916. (sha256
  7917. (base32
  7918. "1v735xr3blznac8fnwa27s1vhllx4jpz7kw7qdw1bsfj6kq21v3k"))))
  7919. (build-system gnu-build-system)
  7920. (arguments
  7921. `(#:tests? #f ; there are no tests
  7922. #:phases
  7923. (modify-phases %standard-phases
  7924. (delete 'configure)
  7925. (replace 'build
  7926. (lambda _
  7927. (invoke "make" "dumb")))
  7928. (replace 'install
  7929. (lambda* (#:key outputs #:allow-other-keys)
  7930. (let* ((out (assoc-ref outputs "out"))
  7931. (bin (string-append out "/bin"))
  7932. (man (string-append out "/share/man/man6")))
  7933. (install-file "dfrotz" bin)
  7934. (mkdir-p man)
  7935. (install-file "doc/dfrotz.6" man)
  7936. #t))))))
  7937. (synopsis "Portable Z-machine dumb interpreter for text adventure games")
  7938. (description "Frotz is an interpreter for Infocom games and
  7939. other Z-machine games in the text adventure/interactive fiction genre.
  7940. dfrotz is the dumb interface version. You get no screen control; everything
  7941. is just printed to the terminal line by line. The terminal handles all the
  7942. scrolling. Maybe you'd like to experience what it's like to play Adventure on
  7943. a teletype. A much cooler use for compiling Frotz with the dumb interface is
  7944. that it can be wrapped in CGI scripting, PHP, and the like to allow people
  7945. to play games on webpages. It can also be made into a chat bot.")
  7946. (home-page "https://frotz.sourceforge.net")
  7947. (license license:gpl2+)))
  7948. (define-public frotz-sdl
  7949. (let* ((commit "4de8c34f2116fff554af6216c30ec9d41bf50b24"))
  7950. (package
  7951. (name "frotz-sdl")
  7952. (version "2.45pre")
  7953. (source (origin
  7954. (method git-fetch)
  7955. (uri (git-reference
  7956. (url "https://gitlab.com/DavidGriffith/frotz")
  7957. (commit commit)))
  7958. (sha256
  7959. (base32
  7960. "18ms21pcrl7ipcnyqnf8janamkryzx78frsgd9kfk67jvbj0z2k8"))
  7961. (file-name (git-file-name name version))))
  7962. (build-system gnu-build-system)
  7963. (arguments
  7964. `(#:tests? #f ; there are no tests
  7965. #:phases
  7966. (modify-phases %standard-phases
  7967. (delete 'configure)
  7968. (add-before 'build 'patch-makefile
  7969. (lambda _
  7970. (substitute* "Makefile"
  7971. (("lcurses") "lncurses")
  7972. (("^BUILD_DATE_TIME =.*$")
  7973. "BUILD_DATE_TIME = \"2.45pre-20180907.00000\"\n"))
  7974. #t))
  7975. (replace 'build
  7976. (lambda _
  7977. (invoke "make" "sdl")))
  7978. (replace 'install
  7979. (lambda* (#:key outputs #:allow-other-keys)
  7980. (let* ((out (assoc-ref outputs "out"))
  7981. (bin (string-append out "/bin"))
  7982. (man (string-append out "/share/man/man6")))
  7983. (install-file "sfrotz" bin)
  7984. (mkdir-p man)
  7985. (install-file "doc/sfrotz.6" man)
  7986. #t))))))
  7987. (native-inputs
  7988. (list pkg-config which perl))
  7989. (inputs (list sdl2
  7990. sdl2-mixer
  7991. libmodplug
  7992. libsamplerate
  7993. libsndfile
  7994. libvorbis
  7995. ncurses
  7996. freetype
  7997. libjpeg-turbo))
  7998. (synopsis "Portable Z-machine interpreter (SDL port) for text adventure games")
  7999. (description "Frotz is an interpreter for Infocom games and other Z-machine
  8000. games in the text adventure/interactive fiction genre. This version of Frotz
  8001. using SDL fully supports all these versions of the Z-Machine including the
  8002. graphical version 6. Graphics and sound are created through the use of the SDL
  8003. libraries. AIFF sound effects and music in MOD and OGG formats are supported
  8004. when packaged in Blorb container files or optionally from individual files.")
  8005. (home-page "https://frotz.sourceforge.net")
  8006. (license license:gpl2+))))
  8007. (define-public frozen-bubble
  8008. ;; Last official release is very outdated (2010). Use latest commit (2017).
  8009. (let ((commit "d6a029110ad6ab9e4960052e175addc98807fb7e")
  8010. (revision "1"))
  8011. (package
  8012. (name "frozen-bubble")
  8013. (version (git-version "2.2.1" revision commit))
  8014. (source
  8015. (origin
  8016. (method git-fetch)
  8017. (uri (git-reference
  8018. (url "https://github.com/kthakore/frozen-bubble")
  8019. (commit commit)))
  8020. (file-name (git-file-name name version))
  8021. (sha256
  8022. (base32 "1rfrcym5lf4qac2qdklikb1ywijyxypq298azzxahy461dadl6cx"))))
  8023. (build-system perl-build-system)
  8024. (arguments
  8025. `(#:phases
  8026. (modify-phases %standard-phases
  8027. ;; Build process needs to create files in the "server"
  8028. ;; directory.
  8029. (add-after 'unpack 'fix-permissions
  8030. (lambda _
  8031. (for-each make-file-writable
  8032. (find-files "server" "." #:directories? #t))))
  8033. ;; By default, build stops at warnings.
  8034. (add-after 'unpack 'prevent-build-error
  8035. (lambda _
  8036. (substitute* "inc/My/Builder.pm"
  8037. (("-Werror") ""))
  8038. #t))
  8039. (add-after 'install 'install-desktop-file-and-icons
  8040. (lambda* (#:key outputs #:allow-other-keys)
  8041. (let* ((share (string-append (assoc-ref outputs "out") "/share"))
  8042. (hicolor (string-append share "/icons/hicolor")))
  8043. ;; Create desktop entry.
  8044. (make-desktop-entry-file
  8045. (string-append share "/applications/" ,name ".desktop")
  8046. #:name "Frozen Bubble"
  8047. #:comment "Frozen Bubble arcade game"
  8048. #:exec ,name
  8049. #:icon ,name
  8050. #:categories '("Game" "ArcadeGame"))
  8051. ;; Add icons.
  8052. (with-directory-excursion "share/icons"
  8053. (for-each
  8054. (lambda (size)
  8055. (let* ((dim (string-append size "x" size))
  8056. (dir (string-append hicolor "/" dim "/apps")))
  8057. (mkdir-p dir)
  8058. (copy-file
  8059. (string-append "frozen-bubble-icon-" dim ".png")
  8060. (string-append dir "/frozen-bubble.png"))))
  8061. '("16" "32" "48" "64"))))
  8062. #t))
  8063. (add-after 'install 'wrap-perl-libs
  8064. (lambda* (#:key outputs #:allow-other-keys)
  8065. (let ((out (assoc-ref outputs "out"))
  8066. (perl5lib (getenv "PERL5LIB")))
  8067. (for-each (lambda (prog)
  8068. (wrap-program (string-append out "/" prog)
  8069. `("PERL5LIB" ":" prefix
  8070. (,(string-append perl5lib ":" out
  8071. "/lib/perl5/site_perl")))))
  8072. (find-files "bin" ".")))
  8073. #t)))))
  8074. (native-inputs
  8075. (list perl-alien-sdl perl-capture-tiny perl-locale-maketext-lexicon
  8076. perl-module-build pkg-config))
  8077. (inputs
  8078. `(("glib" ,glib)
  8079. ("perl-compress-bzip2" ,perl-compress-bzip2)
  8080. ("perl-file-sharedir" ,perl-file-sharedir)
  8081. ("perl-file-slurp" ,perl-file-slurp)
  8082. ("perl-file-which" ,perl-file-which)
  8083. ("perl-ipc-system-simple" ,perl-ipc-system-simple)
  8084. ("perl-sdl" ,perl-sdl)
  8085. ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-pango sdl-ttf)))))
  8086. (home-page "http://frozen-bubble.org/")
  8087. (synopsis "Puzzle with bubbles")
  8088. (description
  8089. "Frozen-Bubble is a clone of the popular Puzzle Bobble game, in which
  8090. you attempt to shoot bubbles into groups of the same color to cause them to
  8091. pop.
  8092. Players compete as penguins and must use the arrow keys to aim a colored
  8093. bubble at groups of bubbles. The objective is to clear all the bubbles off
  8094. the screen before a bubble passes below a line at the bottom.
  8095. It features 100 single-player levels, a two-player mode, music and striking
  8096. graphics. A level editor is also included to allow players to create and play
  8097. their own levels.")
  8098. (license license:gpl2))))
  8099. (define-public libmanette
  8100. (package
  8101. (name "libmanette")
  8102. (version "0.2.6")
  8103. (source (origin
  8104. (method url-fetch)
  8105. (uri (string-append "mirror://gnome/sources/libmanette/"
  8106. (version-major+minor version) "/"
  8107. "libmanette-" version ".tar.xz"))
  8108. (sha256
  8109. (base32
  8110. "1b3bcdkk5xd5asq797cch9id8692grsjxrc1ss87vv11m1ck4rb3"))))
  8111. (build-system meson-build-system)
  8112. (native-inputs
  8113. (list `(,glib "bin") ; for glib-compile-resources
  8114. gobject-introspection pkg-config vala))
  8115. (inputs
  8116. (list libevdev libgudev))
  8117. (home-page "https://wiki.gnome.org/Apps/Games")
  8118. (synopsis "Game controller library")
  8119. (description "Libmanette is a small GObject library giving you simple
  8120. access to game controllers. It supports the de-facto standard gamepads as
  8121. defined by the W3C standard Gamepad specification or as implemented by the SDL
  8122. GameController.")
  8123. (license license:lgpl2.1+)))
  8124. (define-public quadrapassel
  8125. (package
  8126. (name "quadrapassel")
  8127. (version "40.2")
  8128. (source (origin
  8129. (method url-fetch)
  8130. (uri (string-append "mirror://gnome/sources/quadrapassel/"
  8131. (version-major version) "/"
  8132. "quadrapassel-" version ".tar.xz"))
  8133. (sha256
  8134. (base32
  8135. "02n0khwy38pykw4xqpnkym6xvj2sv8izfjbaxlik3iq7890j5n0b"))))
  8136. (build-system meson-build-system)
  8137. (arguments
  8138. '(#:glib-or-gtk? #t
  8139. #:phases
  8140. (modify-phases %standard-phases
  8141. (add-after 'unpack 'skip-gtk-update-icon-cache
  8142. ;; Don't create 'icon-theme.cache'.
  8143. (lambda _
  8144. (substitute* "build-aux/meson_post_install.py"
  8145. (("gtk-update-icon-cache") (which "true"))))))))
  8146. (native-inputs
  8147. (list desktop-file-utils ; for desktop-file-validate
  8148. gettext-minimal
  8149. (list glib "bin") ; for glib-compile-resources
  8150. itstool
  8151. libxml2 ; for xmllint
  8152. pkg-config
  8153. vala))
  8154. (inputs
  8155. (list clutter
  8156. clutter-gtk
  8157. gsound
  8158. gtk+
  8159. libcanberra
  8160. libmanette
  8161. librsvg))
  8162. (home-page "https://wiki.gnome.org/Apps/Quadrapassel")
  8163. (synopsis "GNOME version of Tetris")
  8164. (description "Quadrapassel comes from the classic falling-block game,
  8165. Tetris. The goal of the game is to create complete horizontal lines of
  8166. blocks, which will disappear. The blocks come in seven different shapes made
  8167. from four blocks each: one straight, two L-shaped, one square, and two
  8168. S-shaped. The blocks fall from the top center of the screen in a random
  8169. order. You rotate the blocks and move them across the screen to drop them in
  8170. complete lines. You score by dropping blocks fast and completing lines. As
  8171. your score gets higher, you level up and the blocks fall faster.")
  8172. (license license:gpl2+)))
  8173. (define-public endless-sky
  8174. (package
  8175. (name "endless-sky")
  8176. (version "0.10.0")
  8177. (source
  8178. (origin
  8179. (method git-fetch)
  8180. (uri (git-reference
  8181. (url "https://github.com/endless-sky/endless-sky")
  8182. (commit (string-append "v" version))))
  8183. (file-name (git-file-name name version))
  8184. (sha256
  8185. (base32 "1zbizmigxdwpi3m7sxv9hhf3aa18kbhsfrp48zy3iw2v64pw9l3r"))))
  8186. (build-system cmake-build-system)
  8187. (arguments
  8188. (list #:configure-flags #~(list "-DES_USE_VCPKG=0"
  8189. "-DES_USE_SYSTEM_LIBRARIES=1")
  8190. #:make-flags #~(list (string-append "PREFIX=" #$output))
  8191. #:build-type "Release"
  8192. #:phases
  8193. #~(modify-phases %standard-phases
  8194. (add-after 'unpack 'fix-paths
  8195. (lambda _
  8196. ;; Look for resources in the store directory.
  8197. (substitute* "source/Files.cpp"
  8198. (("/usr/local") #$output))
  8199. ;; Install game binary into %out/bin.
  8200. (substitute* "CMakeLists.txt"
  8201. (("games\\)") "bin)")))))))
  8202. (inputs
  8203. (list glew
  8204. libjpeg-turbo
  8205. libmad
  8206. libpng
  8207. openal
  8208. sdl2
  8209. `(,util-linux "lib"))) ; for libuuid
  8210. (home-page "https://endless-sky.github.io/")
  8211. (synopsis "2D space trading and combat game")
  8212. (description "Endless Sky is a 2D space trading and combat game. Explore
  8213. other star systems. Earn money by trading, carrying passengers, or completing
  8214. missions. Use your earnings to buy a better ship or to upgrade the weapons and
  8215. engines on your current one. Blow up pirates. Take sides in a civil war. Or
  8216. leave human space behind and hope to find friendly aliens whose culture is more
  8217. civilized than your own.")
  8218. (license (list license:gpl3+
  8219. license:cc-by-sa3.0
  8220. license:cc-by-sa4.0
  8221. license:public-domain))))
  8222. (define-public stepmania
  8223. (package
  8224. (name "stepmania")
  8225. (version "5.1.0-b2")
  8226. (source
  8227. (origin
  8228. (method git-fetch)
  8229. (uri (git-reference
  8230. (url "https://github.com/stepmania/stepmania")
  8231. (commit (string-append "v" version))))
  8232. (file-name (git-file-name name version))
  8233. (sha256
  8234. (base32
  8235. "0a7y9l7xm510vgnpmj1is7p9m6d6yd0fcaxrjcickz295k5w3rdn"))
  8236. (modules '((guix build utils)))
  8237. (snippet
  8238. '(begin
  8239. ;; Remove song files, which are licensed under a non-commercial
  8240. ;; clause, and a course pointing to them.
  8241. (for-each delete-file-recursively
  8242. '("Songs/StepMania 5/Goin' Under"
  8243. "Songs/StepMania 5/MechaTribe Assault"
  8244. "Songs/StepMania 5/Springtime"))
  8245. (for-each delete-file '("Courses/Default/Jupiter.crs"
  8246. "Courses/Default/Jupiter.png"))
  8247. ;; Unbundle libpng.
  8248. (substitute* "extern/CMakeLists.txt"
  8249. (("include\\(CMakeProject-png.cmake\\)") ""))
  8250. (delete-file-recursively "extern/libpng")
  8251. #t))))
  8252. (build-system cmake-build-system)
  8253. (arguments
  8254. `(#:tests? #f ;FIXME: couldn't find how to run tests
  8255. #:build-type "Release"
  8256. #:out-of-source? #f ;for the 'install-desktop' phase
  8257. #:configure-flags
  8258. (list "-DWITH_SYSTEM_FFMPEG=1"
  8259. ;; SSE instructions are available on Intel systems only.
  8260. ,@(if (any (cute string-prefix? <> (or (%current-target-system)
  8261. (%current-system)))
  8262. '("x86_64" "i686"))
  8263. '()
  8264. '("-DWITH_SSE2=NO"))
  8265. ;; Configuration cannot find GTK2 without the two following
  8266. ;; flags.
  8267. (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
  8268. (assoc-ref %build-inputs "gtk+")
  8269. "/lib/gtk-2.0/include")
  8270. (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
  8271. (assoc-ref %build-inputs "glib")
  8272. "/lib/glib-2.0/include"))
  8273. #:phases
  8274. (modify-phases %standard-phases
  8275. (add-after 'unpack 'ensure-application-files-can-be-found
  8276. (lambda* (#:key outputs #:allow-other-keys)
  8277. (let ((out (assoc-ref outputs "out")))
  8278. (substitute* "src/arch/LoadingWindow/LoadingWindow_Gtk.cpp"
  8279. (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\" \\+ \"GtkModule.so\"")
  8280. (string-append "\"" out
  8281. "/share/stepmania/GtkModule.so\"")))
  8282. (substitute* "src/arch/ArchHooks/ArchHooks_Unix.cpp"
  8283. (("Root = sDirOfExecutable")
  8284. (string-append "Root = \"" out "/share/stepmania/\""))
  8285. (("sDirOfExecutable \\+ \"/(Packages|Songs)\"" _ dir)
  8286. (string-append "\"" out "/share/stepmania/" dir "\"")))
  8287. (substitute* "src/RageFileManager.cpp"
  8288. (("RageFileManagerUtil::sDirOfExecutable \\+ \"/\"")
  8289. (string-append "\"" out "/share/stepmania/\""))))
  8290. #t))
  8291. (add-after 'unpack 'fix-install-subdir
  8292. ;; Installation would be done in "%out/stepmania-X.Y", but we
  8293. ;; prefer the more common layout "%out/share/stepmania".
  8294. (lambda _
  8295. (substitute* "src/CMakeLists.txt"
  8296. (("\"stepmania-.*?\"") "\"share/stepmania\""))
  8297. #t))
  8298. (add-after 'unpack 'unbundle-libpng
  8299. (lambda* (#:key inputs #:allow-other-keys)
  8300. (substitute* "src/CMakeLists.txt"
  8301. (("\\$\\{SM_EXTERN_DIR\\}/libpng/include")
  8302. (string-append (assoc-ref inputs "libpng") "/include")))
  8303. #t))
  8304. (add-after 'install 'install-executable
  8305. (lambda* (#:key outputs #:allow-other-keys)
  8306. (let* ((out (assoc-ref outputs "out"))
  8307. (bin (string-append out "/bin"))
  8308. (exe (string-append out "/share/stepmania/stepmania")))
  8309. (mkdir-p bin)
  8310. (symlink exe (string-append bin "/stepmania"))
  8311. #t)))
  8312. (add-after 'install-executable 'install-desktop
  8313. (lambda* (#:key outputs #:allow-other-keys)
  8314. (let* ((out (assoc-ref outputs "out"))
  8315. (share (string-append out "/share"))
  8316. (applications (string-append share "/applications"))
  8317. (icons (string-append share "/icons")))
  8318. (install-file "stepmania.desktop" applications)
  8319. (mkdir-p icons)
  8320. (copy-recursively "icons" icons)
  8321. #t)))
  8322. ;; Move documentation in a more usual place, i.e.,
  8323. ;; "%out/share/doc/stepmania/".
  8324. (add-after 'install-desktop 'install-doc
  8325. (lambda* (#:key outputs #:allow-other-keys)
  8326. (let* ((out (assoc-ref outputs "out"))
  8327. (share (string-append out "/share")))
  8328. (with-directory-excursion share
  8329. (mkdir-p "doc")
  8330. (symlink "../stepmania/Docs" "doc/stepmania"))
  8331. #t))))))
  8332. (native-inputs
  8333. (list pkg-config yasm))
  8334. (inputs
  8335. `(("alsa-lib" ,alsa-lib)
  8336. ;; Per upstream, StepMania is only guaranteed to work with a very
  8337. ;; specific FFmpeg version, which is included in the repository as
  8338. ;; a Git submodule. This particular version requirement usually
  8339. ;; changes every few years.
  8340. ("ffmpeg" ,ffmpeg-for-stepmania)
  8341. ("glib" ,glib)
  8342. ("glew" ,glew)
  8343. ("gtk+" ,gtk+-2)
  8344. ("jsoncpp" ,jsoncpp)
  8345. ("libpng" ,libpng)
  8346. ("libjpeg" ,libjpeg-turbo)
  8347. ("libmad" ,libmad)
  8348. ("libogg" ,libogg)
  8349. ("libva" ,libva)
  8350. ("libvorbis" ,libvorbis)
  8351. ("libxinerama" ,libxinerama)
  8352. ("libxrandr" ,libxrandr)
  8353. ("mesa" ,mesa)
  8354. ("pcre" ,pcre)
  8355. ("pulseaudio" ,pulseaudio)
  8356. ("sdl" ,sdl2)
  8357. ("udev" ,eudev)
  8358. ("zlib" ,zlib)))
  8359. (synopsis "Advanced rhythm game designed for both home and arcade use")
  8360. (description "StepMania is a dance and rhythm game. It features 3D
  8361. graphics, keyboard and dance pad support, and an editor for creating your own
  8362. steps.
  8363. This package provides the core application, but no song is shipped. You need
  8364. to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.")
  8365. (home-page "https://www.stepmania.com")
  8366. (license license:expat)))
  8367. (define-public oshu
  8368. (package
  8369. (name "oshu")
  8370. (version "2.0.1")
  8371. (source
  8372. (origin
  8373. (method git-fetch)
  8374. (uri (git-reference
  8375. (url "https://github.com/fmang/oshu")
  8376. (commit version)))
  8377. (file-name (git-file-name name version))
  8378. (sha256
  8379. (base32
  8380. "1g598incc6zlls876slgwqblwiwiszkmqa4xpzw0z7mbjmmzsizz"))))
  8381. (build-system cmake-build-system)
  8382. (arguments
  8383. `(#:phases
  8384. (modify-phases %standard-phases
  8385. (add-before 'check 'pre-check
  8386. ;; `make test' doesn't actually build the test executable
  8387. (lambda _ (invoke "make" "zerotokei"))))))
  8388. (native-inputs
  8389. (list pkg-config))
  8390. (inputs
  8391. (list cairo ffmpeg-4 pango sdl2 sdl2-image))
  8392. (home-page "https://github.com/fmang/oshu/")
  8393. (synopsis "Rhythm game in which you click on circles")
  8394. (description "@i{oshu!} is a minimalist variant of the @i{osu!} rhythm game,
  8395. which is played by pressing buttons and following along sliders as they appear
  8396. on screen. Its aim is to be able to play any beatmap even on low-end hardware.
  8397. This package provides the core application, but no beatmaps. You need to
  8398. download and unpack them separately.")
  8399. (license license:gpl3+)))
  8400. (define-public btanks
  8401. (package
  8402. (name "btanks")
  8403. (version "0.9.8083")
  8404. (source
  8405. (origin
  8406. (method url-fetch)
  8407. (uri (string-append "mirror://sourceforge/btanks/btanks-source/"
  8408. "btanks-" version ".tar.bz2"))
  8409. (sha256
  8410. (base32
  8411. "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"))))
  8412. (build-system scons-build-system)
  8413. (arguments
  8414. `(#:tests? #f ; there are none
  8415. #:scons ,scons-python2
  8416. #:scons-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
  8417. #:phases
  8418. (modify-phases %standard-phases
  8419. (add-after 'unpack 'replace-removed-scons-syntax
  8420. (lambda _
  8421. (substitute* "SConstruct"
  8422. (("Options") "Variables")
  8423. (("opts.Add\\(BoolOption.*") "opts.Add('gcc_visibility', 'gcc visibility', 'true')")
  8424. (("opts.Add\\(EnumOption.*") "opts.Add('mode', 'build mode', 'release')"))
  8425. #t))
  8426. (add-after 'set-paths 'set-sdl-paths
  8427. (lambda* (#:key inputs #:allow-other-keys)
  8428. (setenv "CPATH"
  8429. (string-append
  8430. (search-input-directory inputs "/include/SDL")
  8431. ":" (or (getenv "CPATH") "")))))
  8432. (add-after 'unpack 'fix-compilation-errors
  8433. (lambda _
  8434. (substitute* "mrt/base_file.h"
  8435. (("#include <string>" m)
  8436. (string-append m "\n#include <sys/types.h>")))
  8437. (substitute* '("engine/sl08/sl08.h"
  8438. "engine/sl08/sl08.py")
  8439. (("signal = NULL") "signal = 0")
  8440. (("object\\(NULL\\)") "object(0)")
  8441. (("func\\(NULL\\)") "func(0)")
  8442. ((" connect\\(signal_ref\\)")
  8443. " this->connect(signal_ref)"))
  8444. (substitute* "math/range_list.h"
  8445. ((" lower_bound\\(value\\)")
  8446. " this->lower_bound(value)")
  8447. ((" erase\\(i\\)")
  8448. " this->erase(i)"))
  8449. (substitute* "clunk/source.cpp"
  8450. (("using namespace clunk" m)
  8451. (string-append "# define pow10f(x) exp10f(x)\n" m)))
  8452. #t))
  8453. (add-after 'unpack 'find-lua
  8454. (lambda _
  8455. (substitute* "engine/SConscript"
  8456. (("lua5.1") "lua-5.1")
  8457. (("bt_libs.append\\(lua\\)")
  8458. "bt_libs.append(\"lua\")"))
  8459. #t)))))
  8460. (inputs
  8461. `(("expat" ,expat)
  8462. ("glu" ,glu)
  8463. ("libsmpeg" ,libsmpeg-with-sdl1)
  8464. ("libvorbis" ,libvorbis)
  8465. ("lua51" ,lua-5.1)
  8466. ("sdl" ,(sdl-union (list sdl
  8467. sdl-mixer
  8468. sdl-image
  8469. sdl-ttf)))
  8470. ("zlib" ,zlib)))
  8471. (native-inputs
  8472. (list pkg-config zip))
  8473. (home-page "https://btanks.sourceforge.net")
  8474. (synopsis "Multiplayer tank battle game")
  8475. (description "Battle Tanks (also known as \"btanks\") is a funny battle
  8476. game, where you can choose one of three vehicles and eliminate your enemy
  8477. using the whole arsenal of weapons. It has original cartoon-like graphics and
  8478. cool music, it’s fun and dynamic, it has several network modes for deathmatch
  8479. and cooperative.")
  8480. ;; Some parts (e.g. mrt/b64.cpp) are LGPLv2.1+, but the whole package is
  8481. ;; released under GPLv2 or later. It comes with extra exceptions for the
  8482. ;; developers.
  8483. (license (list license:gpl2+ license:lgpl2.1+))))
  8484. (define-public slimevolley
  8485. (package
  8486. (name "slimevolley")
  8487. (version "2.4.2")
  8488. (source
  8489. (origin
  8490. (method url-fetch)
  8491. (uri (string-append "https://download.tuxfamily.org/slime/"
  8492. "slimevolley_" version ".tar.gz"))
  8493. (sha256
  8494. (base32 "1pi60zjpx95mfdkrbwf4cbzy5lv4v5qrljvgck46qca78i9g9g46"))))
  8495. (build-system cmake-build-system)
  8496. (arguments
  8497. `(#:tests? #f ;no test
  8498. ;; Work around build failure: "error adding symbols: DSO
  8499. ;; missing from command line".
  8500. #:configure-flags (list "-DCMAKE_EXE_LINKER_FLAGS=-lm")))
  8501. (native-inputs
  8502. `(("gcc-7" ,gcc-7)
  8503. ("gettext" ,gettext-minimal)))
  8504. (inputs
  8505. `(("sdl" ,(sdl-union (list sdl sdl-image sdl-net sdl-ttf)))))
  8506. (home-page "https://slime.tuxfamily.org/")
  8507. (synopsis "Unrealistic 2D volleyball simulation")
  8508. (description
  8509. "Slime Volley is a 2D arcade-oriented volleyball simulation, in
  8510. the spirit of some Java games of the same name.
  8511. Two teams, 1-3 players each, try to be the first to get 10 points.
  8512. This happens when the one ball touches the floor on the other side of
  8513. the net. There can be 1 to 8 balls in game. Once one ball touches
  8514. the ground, the set ends and all balls are served again.")
  8515. (license license:gpl3+)))
  8516. (define-public 4dtris
  8517. (package
  8518. (name "4dtris")
  8519. (version "0.4.3")
  8520. (source
  8521. (origin
  8522. (method url-fetch)
  8523. (uri (string-append "https://launchpad.net/4dtris/"
  8524. (version-major+minor version)
  8525. "/" version "/+download/4dtris_"
  8526. version ".orig.tar.gz"))
  8527. (sha256
  8528. (base32
  8529. "1nfkhcm0l89jyw8yr65na97g4l385zhjf7whkyg47c3v5sdqq2g7"))))
  8530. (build-system gnu-build-system)
  8531. (arguments
  8532. `(#:configure-flags '("CFLAGS=-fcommon")
  8533. #:phases
  8534. (modify-phases %standard-phases
  8535. (add-after 'unpack 'fix-install-directories
  8536. (lambda* (#:key outputs #:allow-other-keys)
  8537. (let ((out (assoc-ref outputs "out")))
  8538. (substitute* "Makefile.in"
  8539. (("bindir = /usr/games")
  8540. (string-append "bindir = " out "/bin"))
  8541. (("/usr/share/applications")
  8542. (string-append out "/share/applications"))
  8543. (("/usr/share/games/4dtris")
  8544. (string-append out "/share/4dtris"))))
  8545. #t))
  8546. (add-after 'set-paths 'set-sdl-paths
  8547. (lambda* (#:key inputs #:allow-other-keys)
  8548. (setenv "CPATH"
  8549. (string-append
  8550. (search-input-directory inputs "/include/SDL")
  8551. ":" (or (getenv "CPATH") ""))))))))
  8552. (inputs
  8553. `(("fontconfig" ,fontconfig)
  8554. ("freeglut" ,freeglut)
  8555. ("sdl" ,(sdl-union (list sdl sdl-ttf)))))
  8556. (home-page "https://launchpad.net/4dtris/")
  8557. (synopsis "4D Tetris")
  8558. (description "4D-TRIS is an alteration of the well-known Tetris game. The
  8559. game field is extended to 4D space, which has to filled up by the gamer with
  8560. 4D hyper cubes.")
  8561. (license license:gpl3)))
  8562. (define-public arx-libertatis
  8563. (package
  8564. (name "arx-libertatis")
  8565. (version "1.2.1")
  8566. (source
  8567. (origin
  8568. (method url-fetch)
  8569. (uri (string-append "http://arx-libertatis.org/files/arx-libertatis-"
  8570. version ".tar.xz"))
  8571. (sha256
  8572. (base32 "1pxf86sgwvy3785sq2wb4jvz6bdxm81ilrxd8xv7s61dxqqqizda"))))
  8573. (build-system cmake-build-system)
  8574. (outputs '("out" "installer"))
  8575. (arguments
  8576. '(#:tests? #f ; No tests.
  8577. #:phases
  8578. (modify-phases %standard-phases
  8579. (add-after 'unpack 'fix-install-helper-paths
  8580. (lambda* (#:key inputs #:allow-other-keys)
  8581. (let ((p7zip (assoc-ref inputs "p7zip"))
  8582. (innoextract (assoc-ref inputs "innoextract"))
  8583. (wget (assoc-ref inputs "wget"))
  8584. (zenity (assoc-ref inputs "zenity")))
  8585. (substitute* "scripts/arx-install-data"
  8586. (("have innoextract")
  8587. (string-append "have " innoextract "/bin/innoextract"))
  8588. (("then innoextract")
  8589. (string-append "then " innoextract "/bin/innoextract"))
  8590. (("else innoextract")
  8591. (string-append "else " innoextract "/bin/innoextract"))
  8592. (("for _extract_zip_sz in 7za 7z")
  8593. (string-append "for _extract_zip_sz in " p7zip "/bin/7za"))
  8594. (("else if have 7z")
  8595. (string-append "else if have " p7zip "/bin/7za"))
  8596. (("7z x -tiso")
  8597. (string-append p7zip "/bin/7z x -tiso"))
  8598. (("if have wget")
  8599. (string-append "if have " wget "/bin/wget"))
  8600. (("wget -O")
  8601. (string-append wget "/bin/wget -O"))
  8602. (("for backend in \\$preferred zenity")
  8603. (string-append "for backend in $preferred " zenity "/bin/zenity"))
  8604. (("zenity +--title")
  8605. (string-append zenity "/bin/zenity --title"))
  8606. (("^zenity\\)")
  8607. (string-append zenity "/bin/zenity)"))))
  8608. #t))
  8609. (add-after 'install 'move-installer
  8610. (lambda* (#:key outputs #:allow-other-keys)
  8611. (let ((out (assoc-ref outputs "out"))
  8612. (installer (assoc-ref outputs "installer")))
  8613. (mkdir-p (string-append installer "/bin"))
  8614. (rename-file (string-append out "/bin/arx-install-data")
  8615. (string-append installer "/bin/arx-install-data"))))))))
  8616. (inputs
  8617. (list sdl2
  8618. libepoxy
  8619. glew
  8620. openal
  8621. zlib
  8622. boost
  8623. glm
  8624. freetype
  8625. ;; The following are only needed by the arx-install-data script.
  8626. p7zip ; Install-helper uses it to extract ISO and .cab archives.
  8627. zenity ; GUI for install-helper.
  8628. wget ; Used by the install-helper to download the patch.
  8629. ;; The install-helper needs it to extract the patch.
  8630. innoextract))
  8631. (home-page "https://arx-libertatis.org/")
  8632. (synopsis "Port of Arx Fatalis, a first-person role-playing game")
  8633. (description "Arx Libertatis is a cross-platform port of Arx Fatalis, a 2002
  8634. first-person role-playing game / dungeon crawler developed by Arkane Studios.
  8635. This port however does not include the game data, so you need to obtain a copy
  8636. of the original Arx Fatalis or its demo to play Arx Libertatis. Arx Fatalis
  8637. features crafting, melee and ranged combat, as well as a unique casting system
  8638. where the player draws runes in real time to effect the desired spell.")
  8639. (license license:gpl3+)))
  8640. (define-public edgar
  8641. (package
  8642. (name "edgar")
  8643. (version "1.36")
  8644. (source
  8645. (origin
  8646. (method url-fetch)
  8647. (uri
  8648. (string-append "https://github.com/riksweeney/edgar/releases/download/"
  8649. version "/edgar-" version "-1.tar.gz"))
  8650. (sha256
  8651. (base32 "0fcsmwwfdwap5v6qdijw91kqnnc2i91yzgwfi7vpwvasw70qvna1"))))
  8652. (build-system gnu-build-system)
  8653. (arguments '(#:tests? #f ; there are no tests
  8654. #:make-flags
  8655. (list "CC=gcc"
  8656. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  8657. (string-append "BIN_DIR=" (assoc-ref %outputs "out") "/bin/"))
  8658. #:phases
  8659. (modify-phases %standard-phases
  8660. (delete 'configure)
  8661. (add-before 'build 'fix-env
  8662. (lambda* (#:key inputs #:allow-other-keys)
  8663. (setenv "CPATH"
  8664. (string-append
  8665. (search-input-directory inputs "/include/SDL2")
  8666. ":" (or (getenv "CPATH") ""))))))))
  8667. (inputs
  8668. (list (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
  8669. zlib))
  8670. (native-inputs
  8671. (list pkg-config
  8672. autoconf
  8673. automake
  8674. gettext-minimal
  8675. libtool
  8676. which))
  8677. (synopsis "2d action platformer game")
  8678. (description "The Legend of Edgar is a 2D platform game with a persistent world.
  8679. When Edgar's father fails to return home after venturing out one dark and stormy night,
  8680. Edgar fears the worst: he has been captured by the evil sorcerer who lives in
  8681. a fortress beyond the forbidden swamp.")
  8682. (home-page "https://www.parallelrealities.co.uk/games/edgar/")
  8683. (license license:gpl2+)))
  8684. (define-public openclonk
  8685. (package
  8686. (name "openclonk")
  8687. (version "8.1")
  8688. (source (origin
  8689. (method url-fetch)
  8690. (uri (string-append
  8691. "https://www.openclonk.org/builds/release/" version "/"
  8692. "openclonk-" version "-src.tar.bz2"))
  8693. (sha256
  8694. (base32
  8695. "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))))
  8696. (build-system cmake-build-system)
  8697. (arguments
  8698. `(#:configure-flags '("-DAudio_TK=OpenAL")
  8699. #:test-target "tests"
  8700. #:phases
  8701. (modify-phases %standard-phases
  8702. (add-after 'unpack 'prepare-gmock
  8703. (lambda* (#:key inputs #:allow-other-keys)
  8704. (mkdir "gmock")
  8705. (copy-recursively (assoc-ref inputs "googlemock") "gmock")
  8706. (substitute* "tests/CMakeLists.txt"
  8707. (("/usr/src/gmock")
  8708. (string-append (getcwd) "/gmock/googlemock"))
  8709. (("/usr/src/gtest")
  8710. (string-append (getcwd) "/gmock/googletest"))
  8711. (("PATH_SUFFIXES \"src\" \"gtest\"")
  8712. "PATH_SUFFIXES \"src\""))
  8713. #t))
  8714. (add-after 'unpack 'adjust-backward-cpp-includes
  8715. (lambda _
  8716. ;; XXX: The bundled backward-cpp exports a CMake "interface"
  8717. ;; that includes external libraries such as libdl from glibc.
  8718. ;; By default, CMake interface includes are treated as "system
  8719. ;; headers", and GCC behaves poorly when glibc is passed as a
  8720. ;; system header (causing #include_next failures).
  8721. ;; Here we prevent targets that consume the Backward::Backward
  8722. ;; interface from treating it as "system includes".
  8723. (substitute* "CMakeLists.txt"
  8724. (("target_link_libraries\\((.+) Backward::Backward\\)" all target)
  8725. (string-append "set_property(TARGET " target " PROPERTY "
  8726. "NO_SYSTEM_FROM_IMPORTED true)\n"
  8727. all)))
  8728. #t))
  8729. (add-after 'unpack 'add-libiberty
  8730. ;; Build fails upon linking executables without this.
  8731. (lambda _
  8732. (substitute* "thirdparty/backward-cpp/BackwardConfig.cmake"
  8733. (("set\\(LIBBFD_LIBRARIES (.*?)\\)" _ libraries)
  8734. (string-append "set(LIBBFD_LIBRARIES " libraries " iberty)")))
  8735. #t))
  8736. (add-after 'add-libiberty 'lax-freealut-requirement
  8737. ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
  8738. ;; it as 1.0.1. Force minimal version.
  8739. (lambda _
  8740. (substitute* "cmake/FindAudio.cmake"
  8741. (("freealut>=1.1.0") "freealut>=1.0.1"))
  8742. #t))
  8743. (add-after 'lax-freealut-requirement 'fix-directories
  8744. ;; Prefer "$out/share/openclonk" over
  8745. ;; "$out/share/games/openclonk". Also install "openclonk"
  8746. ;; binary in "bin/", not "games/".
  8747. (lambda _
  8748. (substitute* "CMakeLists.txt"
  8749. (("share/games/openclonk") "share/openclonk")
  8750. (("TARGETS openclonk DESTINATION games")
  8751. "TARGETS openclonk DESTINATION bin"))
  8752. #t)))))
  8753. (native-inputs
  8754. `(("googlemock" ,(package-source googletest))
  8755. ("googletest" ,googletest)
  8756. ("pkg-config" ,pkg-config)))
  8757. (inputs
  8758. `(("freealut" ,freealut)
  8759. ("freetype" ,freetype)
  8760. ("glew" ,glew)
  8761. ("libiberty" ,libiberty)
  8762. ("libjpeg" ,libjpeg-turbo)
  8763. ("libogg" ,libogg)
  8764. ("libpng" ,libpng)
  8765. ("libvorbis" ,libvorbis)
  8766. ("libxrandr" ,libxrandr)
  8767. ("mesa" ,mesa)
  8768. ("miniupnpc" ,miniupnpc)
  8769. ("openal" ,openal)
  8770. ("qtbase" ,qtbase-5)
  8771. ("readline" ,readline)
  8772. ("sdl" ,sdl2)
  8773. ("tinyxml" ,tinyxml)
  8774. ("zlib" ,zlib)))
  8775. (home-page "https://www.openclonk.org/")
  8776. (synopsis
  8777. "Multiplayer action game where you control small and nimble humanoids")
  8778. (description "OpenClonk is a multiplayer action/tactics/skill game. It is
  8779. often referred to as a mixture of The Settlers and Worms. In a simple 2D
  8780. antfarm-style landscape, the player controls a crew of Clonks, small but
  8781. robust humanoid beings. The game encourages free play but the normal goal is
  8782. to either exploit valuable resources from the earth by building a mine or
  8783. fight each other on an arena-like map.")
  8784. ;; Software as a whole is licensed under ISC, artwork under CC-BY.
  8785. (license (list license:isc license:cc-by3.0))))
  8786. (define-public flare-engine
  8787. (package
  8788. (name "flare-engine")
  8789. (version "1.14")
  8790. (source (origin
  8791. (method git-fetch)
  8792. (uri (git-reference
  8793. (url "https://github.com/flareteam/flare-engine")
  8794. (commit (string-append "v" version))))
  8795. (file-name (git-file-name name version))
  8796. (sha256
  8797. (base32
  8798. "1gyaxr6zykwg5kg9xc3vlb5a6fas4z3zbk53y0zlfl35n4vqlh84"))))
  8799. (build-system cmake-build-system)
  8800. (arguments
  8801. (list
  8802. #:tests? #f ;no test
  8803. #:configure-flags #~(list "-DBINDIR=bin" "-DDATADIR=share/flare")))
  8804. (inputs
  8805. (list hicolor-icon-theme
  8806. python-wrapper
  8807. (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
  8808. (home-page "https://www.flarerpg.org/")
  8809. (synopsis "Action Roleplaying Engine")
  8810. (description "Flare (Free Libre Action Roleplaying Engine) is a simple
  8811. game engine built to handle a very specific kind of game: single-player 2D
  8812. action RPGs.")
  8813. (license license:gpl3+)))
  8814. (define-public flare-game
  8815. (package
  8816. (name "flare-game")
  8817. (version "1.14")
  8818. (source (origin
  8819. (method git-fetch)
  8820. (uri (git-reference
  8821. (url "https://github.com/flareteam/flare-game")
  8822. (commit (string-append "v" version))))
  8823. (file-name (git-file-name name version))
  8824. (sha256
  8825. (base32
  8826. "1as9dsg0ddz14jjk4y5nj0ml20cwncrcnbdk10r1jaa2vss9bbn3"))))
  8827. (build-system cmake-build-system)
  8828. (arguments
  8829. (list
  8830. #:tests? #f ;no test
  8831. #:configure-flags #~(list "-DDATADIR=share/flare")
  8832. #:phases
  8833. #~(modify-phases %standard-phases
  8834. ;; Flare expects the mods to be located in the same folder.
  8835. ;; Yet, "default" mod is in the engine, whereas the others
  8836. ;; are in the current package. Merge everything here with
  8837. ;; a symlink.
  8838. (add-after 'install 'add-default-mod
  8839. (lambda* (#:key inputs #:allow-other-keys)
  8840. (let ((mods (string-append #$output "/share/flare/mods")))
  8841. (with-directory-excursion mods
  8842. (symlink (search-input-directory inputs
  8843. "/share/flare/mods/default")
  8844. "default")
  8845. (symlink (search-input-file inputs
  8846. "/share/flare/mods/mods.txt")
  8847. "mods.txt")))))
  8848. (add-after 'install 'install-executable
  8849. ;; The package only provides assets for the game, the
  8850. ;; executable coming from "flare-engine". Since more than
  8851. ;; one game may use the engine, we create a new executable,
  8852. ;; "flare-game", which launches the engine with appropriate
  8853. ;; parameters.
  8854. (lambda* (#:key inputs #:allow-other-keys)
  8855. (let ((bash (search-input-file inputs "/bin/bash"))
  8856. (flare (search-input-file inputs "/bin/flare"))
  8857. (script (string-append #$output "/bin/flare-game")))
  8858. (mkdir-p (dirname script))
  8859. (call-with-output-file script
  8860. (lambda (port)
  8861. (format port
  8862. "#!~a
  8863. exec ~a --data-path=~a/share/flare --mods=empyrean_campaign~%"
  8864. bash
  8865. flare
  8866. #$output)))
  8867. (chmod script #o755)))))))
  8868. (inputs
  8869. (list flare-engine))
  8870. (home-page "https://flarerpg.org/")
  8871. (synopsis "Fantasy action RPG using the FLARE engine")
  8872. (description "Flare is a single-player 2D action RPG with
  8873. fast-paced action and a dark fantasy style.")
  8874. (license license:cc-by-sa3.0)))
  8875. (define-public meritous
  8876. (package
  8877. (name "meritous")
  8878. (version "1.5")
  8879. (source (origin
  8880. (method git-fetch)
  8881. (uri (git-reference
  8882. (url "https://gitlab.com/meritous/meritous.git")
  8883. (commit (string-append "v" version))))
  8884. (file-name (git-file-name name version))
  8885. (sha256
  8886. (base32
  8887. "0n5jm4g0arjllgqmd2crv8h02i6hs3hlh1zyc7ng7yfpg1mbd8p8"))))
  8888. (build-system gnu-build-system)
  8889. (arguments
  8890. `(#:tests? #f ;no test
  8891. #:make-flags
  8892. (list "CC=gcc"
  8893. (string-append "prefix=" (assoc-ref %outputs "out")))
  8894. #:phases
  8895. (modify-phases %standard-phases
  8896. (delete 'configure)
  8897. (add-after 'unpack 'fix-sdl-path
  8898. ;; XXX: For some reason, `sdl-config' reports stand-alone SDL
  8899. ;; directory, not SDL-union provided as an input to the package.
  8900. ;; We force the latter with "--prefix=" option.
  8901. (lambda* (#:key inputs #:allow-other-keys)
  8902. (substitute* "Makefile"
  8903. (("sdl-config" command)
  8904. (string-append command " --prefix=" (assoc-ref inputs "sdl"))))
  8905. #t))
  8906. (add-after 'unpack 'fix-crash
  8907. ;; XXX: Songs are not present in the repository, due to licensing
  8908. ;; issues. Yet, the game tries to load them, and, since it cannot
  8909. ;; find them, crashes. Users cannot add them back, the store being
  8910. ;; read-only, so we turn off background music altogether.
  8911. (lambda _
  8912. (substitute* "src/audio.c"
  8913. (("PlayBackgroundMusic\\(new_track\\);" all)
  8914. (string-append "// " all)))
  8915. #t)))))
  8916. (native-inputs
  8917. (list intltool))
  8918. (inputs
  8919. `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
  8920. ("zlib" ,zlib)))
  8921. (home-page "https://gitlab.com/meritous/meritous")
  8922. (synopsis "Action-adventure dungeon crawl game")
  8923. (description "Far below the surface of the planet is a place of limitless
  8924. power. Those that seek to control such a utopia will soon bring an end to
  8925. themselves. Seeking an end to the troubles that plague him, PSI user Merit
  8926. journeys into the hallowed Orcus Dome in search of answers.
  8927. Meritous is a action-adventure game with simple controls but a challenge to
  8928. find a balance of power versus recovery time during real-time battles. Set in
  8929. a procedurally generated world, the player can explore thousands of rooms in
  8930. search of powerful artifacts, tools to help them, and to eventually free the
  8931. Orcus Dome from evil.")
  8932. (license license:gpl3+)))
  8933. (define-public marble-marcher
  8934. (let ((commit "e580460a0c3826f9b28ab404607942a8ecb625d7")
  8935. (revision "1"))
  8936. (package
  8937. (name "marble-marcher")
  8938. (version (git-version "0" revision commit))
  8939. (source (origin
  8940. (method git-fetch)
  8941. (uri (git-reference
  8942. (url "https://github.com/HackerPoet/MarbleMarcher")
  8943. (commit commit)))
  8944. (file-name (git-file-name name version))
  8945. (sha256
  8946. (base32
  8947. "0jjv832hl1v170n6gryp2sr3lgqndi9ab841qvgqk68bks8701mx"))))
  8948. (build-system cmake-build-system)
  8949. (arguments
  8950. `(#:tests? #f ; there are none
  8951. #:phases
  8952. (modify-phases %standard-phases
  8953. (add-after 'unpack 'embed-asset-directory
  8954. (lambda* (#:key outputs #:allow-other-keys)
  8955. (let ((assets (string-append (assoc-ref outputs "out")
  8956. "/share/marble-marcher/assets/")))
  8957. ;; Some of the files we're patching are
  8958. ;; ISO-8859-1-encoded, so choose it as the default
  8959. ;; encoding so the byte encoding is preserved.
  8960. (with-fluids ((%default-port-encoding #f))
  8961. (substitute* "src/Resource.rc"
  8962. (("../assets/icon.ico")
  8963. (string-append assets "icon.ico")))
  8964. (substitute* "src/Res.h"
  8965. (("assets/") assets))))
  8966. #t))
  8967. (replace 'install
  8968. (lambda* (#:key outputs #:allow-other-keys)
  8969. (let* ((out (assoc-ref outputs "out"))
  8970. (assets (string-append out "/share/marble-marcher/assets"))
  8971. (bin (string-append out "/bin/")))
  8972. (mkdir-p bin)
  8973. (mkdir-p assets)
  8974. (copy-recursively "../source/assets" assets)
  8975. (install-file "MarbleMarcher" bin))
  8976. #t)))))
  8977. (inputs
  8978. (list eigen mesa sfml))
  8979. (native-inputs
  8980. (list pkg-config))
  8981. (home-page "https://codeparade.itch.io/marblemarcher")
  8982. (synopsis "Guide a marble across fractal landscapes")
  8983. (description "Marble Marcher is a video game that uses a fractal physics
  8984. engine and fully procedural rendering to produce beautiful and unique
  8985. gameplay. The game is played on the surface of evolving fractals. The goal
  8986. of the game is to get your marble to the flag as quickly as possible. But be
  8987. careful not to fall off the level or get crushed by the fractal! There are 24
  8988. levels to unlock.")
  8989. ;; Code is under GPLv2+, assets are under CC-BY-SA 3.0 and OFL 1.1.
  8990. (license (list license:gpl2+
  8991. license:silofl1.1
  8992. license:cc-by-sa3.0)))))
  8993. ;; This must be updated together with flightgear.
  8994. (define simgear
  8995. (package
  8996. (name "simgear")
  8997. (version "2020.3.18")
  8998. (source
  8999. (origin
  9000. (method url-fetch)
  9001. (uri (string-append "mirror://sourceforge/flightgear/release-"
  9002. (version-major+minor version) "/"
  9003. "simgear-" version ".tar.bz2"))
  9004. (sha256
  9005. (base32 "1jin6rbz4s83x4k91lbdw5gb0vrc8frbmwpc55wl0wmiaqjwzhbc"))
  9006. (modules '((guix build utils)))
  9007. (snippet
  9008. '(begin
  9009. ;; There are some bundled libraries.
  9010. (for-each delete-file-recursively
  9011. '("3rdparty/expat/"))
  9012. #t))))
  9013. (build-system cmake-build-system)
  9014. (arguments
  9015. `(#:configure-flags (list "-DSYSTEM_EXPAT=ON")
  9016. #:phases
  9017. (modify-phases %standard-phases
  9018. (replace 'check
  9019. (lambda* (#:key tests? #:allow-other-keys)
  9020. (when tests?
  9021. ;; Skip tests that require internet access.
  9022. (invoke "ctest" "-E" "(http|dns)")))))))
  9023. (inputs
  9024. `(("boost" ,boost)
  9025. ("curl" ,curl)
  9026. ("expat" ,expat)
  9027. ("mesa" ,mesa)
  9028. ("openal" ,openal)
  9029. ("openscenegraph" ,openscenegraph)
  9030. ("zlib" ,zlib)))
  9031. (home-page "https://home.flightgear.org/")
  9032. (synopsis "Libraries for 3D simulations and games")
  9033. (description "SimGear is a set of libraries designed to be used as
  9034. building blocks for quickly assembling 3D simulations, games, and
  9035. visualization applications. SimGear is developed by the FlightGear project
  9036. and also provides the base for the FlightGear Flight Simulator.")
  9037. (license license:lgpl2.0+)))
  9038. (define-public flightgear
  9039. (package
  9040. (name "flightgear")
  9041. (version (package-version simgear))
  9042. (source
  9043. (origin
  9044. (method url-fetch)
  9045. (uri (string-append "mirror://sourceforge/flightgear/release-"
  9046. (version-major+minor version) "/"
  9047. "flightgear-" version ".tar.bz2"))
  9048. (sha256
  9049. (base32 "0dyyi1v97w3mdwsv9kdd194inz1461wqv3zy3wyai0n17wdf7a1r"))
  9050. (modules '((guix build utils)))
  9051. (snippet
  9052. '(begin
  9053. ;; There are some bundled libraries.
  9054. (for-each delete-file-recursively
  9055. '("3rdparty/sqlite3/"
  9056. "3rdparty/cppunit/"))))))
  9057. (build-system qt-build-system)
  9058. (arguments
  9059. (list #:configure-flags
  9060. #~(list "-DSYSTEM_SQLITE=ON"
  9061. "-DSYSTEM_CPPUNIT=ON"
  9062. (string-append "-DFG_DATA_DIR=" #$output "/share/flightgear"))
  9063. ;; TODO: test suite segfaults.
  9064. #:tests? #f
  9065. #:phases
  9066. #~(modify-phases %standard-phases
  9067. (add-after 'unpack 'skip-some-tests
  9068. (lambda _
  9069. (substitute*
  9070. "test_suite/unit_tests/Instrumentation/test_gps.hxx"
  9071. (("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
  9072. (string-append "// " all))
  9073. (("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
  9074. (string-append "// " all)))))
  9075. (add-after 'build 'build-test-suite
  9076. (lambda* args
  9077. ((assoc-ref %standard-phases 'build)
  9078. #:make-flags (list "fgfs_test_suite"))))
  9079. ;; Test suite needs access to FGData so run it after 'install.
  9080. (delete 'check)
  9081. (add-after 'install-data 'check
  9082. (assoc-ref %standard-phases 'check))
  9083. (add-after 'install 'install-data
  9084. (lambda _
  9085. (let ((share (string-append #$output "/share/flightgear")))
  9086. (mkdir-p share)
  9087. (with-directory-excursion share
  9088. (invoke "tar" "xf"
  9089. #$(this-package-native-input "flightgear-data")
  9090. "--strip-components=1"))))))))
  9091. (inputs
  9092. (list boost
  9093. dbus
  9094. eudev
  9095. freeglut
  9096. freetype
  9097. glew
  9098. libpng
  9099. openal
  9100. openscenegraph
  9101. plib
  9102. qtbase-5
  9103. qtdeclarative-5
  9104. qtsvg-5
  9105. simgear
  9106. speexdsp
  9107. sqlite
  9108. zlib))
  9109. (native-inputs
  9110. `(("cppunit" ,cppunit)
  9111. ("pkg-config" ,pkg-config)
  9112. ("qttools" ,qttools-5)
  9113. ("flightgear-data"
  9114. ,(origin
  9115. (method url-fetch)
  9116. (uri (string-append "mirror://sourceforge/flightgear/release-"
  9117. (version-major+minor version) "/"
  9118. "FlightGear-" version "-data.txz"))
  9119. (sha256
  9120. (base32
  9121. "0f2jn2br27ahf5gggx70zcp80wrylahw7nbqdcx7ml9qphg6rjak"))))))
  9122. (home-page "https://www.flightgear.org/")
  9123. (synopsis "Flight simulator")
  9124. (description "The goal of the FlightGear project is to create a
  9125. sophisticated flight simulator framework for use in research or academic
  9126. environments, pilot training, as an industry engineering tool, for DIY-ers to
  9127. pursue their favorite interesting flight simulation idea, and last but
  9128. certainly not least as a fun, realistic, and challenging desktop flight
  9129. simulator.")
  9130. (license license:gpl2+)))
  9131. (define-public jumpnbump
  9132. (package
  9133. (name "jumpnbump")
  9134. (version "1.61")
  9135. (source (origin
  9136. (method git-fetch)
  9137. (uri (git-reference
  9138. (url "https://gitlab.com/LibreGames/jumpnbump.git")
  9139. (commit version)))
  9140. (file-name (git-file-name name version))
  9141. (sha256
  9142. (base32
  9143. "12lwl5sl5n009nb83r8l4lakb9286csqdf1ynpmwwydy17giqsdp"))))
  9144. (build-system gnu-build-system)
  9145. (arguments
  9146. `(#:make-flags
  9147. (list "CC=gcc"
  9148. (string-append "PREFIX=" (assoc-ref %outputs "out")))
  9149. #:tests? #f ;no test
  9150. #:phases
  9151. (modify-phases %standard-phases
  9152. ;; There is no configure script
  9153. (replace 'configure
  9154. (lambda _
  9155. (substitute* "Makefile"
  9156. (("-funroll-loops")
  9157. "-funroll-loops -fcommon")
  9158. (("SDL_CFLAGS =")
  9159. "SDL_CFLAGS = -fcommon"))))
  9160. (add-after 'unpack 'fix-sdl-path
  9161. ;; XXX: For some reason, `sdl2-config' reports stand-alone SDL
  9162. ;; directory, not SDL-union provided as an input to the package.
  9163. ;; We force the latter with "--prefix=" option.
  9164. (lambda* (#:key inputs #:allow-other-keys)
  9165. (substitute* "Makefile"
  9166. (("sdl2-config" command)
  9167. (string-append command " --prefix=" (assoc-ref inputs "sdl")))))))))
  9168. (inputs
  9169. `(("bzip2" ,bzip2)
  9170. ("sdl" ,(sdl-union (list sdl2 sdl2-mixer sdl2-net)))
  9171. ("zlib" ,zlib)))
  9172. (native-inputs
  9173. `(("gettext" ,gettext-minimal))) ;for msgfmt
  9174. (home-page "https://gitlab.com/LibreGames/jumpnbump")
  9175. (synopsis "Multiplayer platform game with bunnies")
  9176. (description "You, as a bunny, have to jump on your opponents to make them
  9177. explode. It is a true multiplayer game; you cannot play this alone. You can
  9178. play with up to four players simultaneously. It has network support.")
  9179. (license license:gpl2+)))
  9180. (define-public hedgewars
  9181. (package
  9182. (name "hedgewars")
  9183. (version "1.0.2")
  9184. (source (origin
  9185. (method url-fetch)
  9186. (uri (string-append "https://www.hedgewars.org/download/releases/"
  9187. "hedgewars-src-" version ".tar.bz2"))
  9188. (sha256
  9189. (base32
  9190. "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0"))))
  9191. (build-system cmake-build-system)
  9192. (arguments
  9193. (list
  9194. ;; XXX: Engine is built as Pascal source code, requiring Free Pascal
  9195. ;; Compiler, which we haven't packaged yet. With the flag below, we use
  9196. ;; a Pascal to C translator and Clang instead.
  9197. #:configure-flags #~(list "-DBUILD_ENGINE_C=ON"
  9198. "-Dhaskell_flags=-dynamic;-fPIC")
  9199. #:phases
  9200. #~(modify-phases %standard-phases
  9201. (replace 'check
  9202. (lambda* (#:key tests? #:allow-other-keys)
  9203. (when tests?
  9204. (invoke "ctest"))))
  9205. (add-after 'install 'install-icon
  9206. (lambda _
  9207. ;; Install icon for the desktop file.
  9208. (let ((icons (string-append #$output
  9209. "/share/icons/hicolor/512x512/apps")))
  9210. (with-directory-excursion
  9211. (string-append "../hedgewars-src-" #$version)
  9212. (install-file "misc/hedgewars.png" icons))))))))
  9213. (inputs
  9214. (list ffmpeg-4
  9215. freeglut
  9216. ghc-entropy
  9217. ghc-hslogger
  9218. ghc-network
  9219. ghc-random
  9220. ghc-regex-tdfa
  9221. ghc-sandi
  9222. ghc-sha
  9223. ghc-utf8-string
  9224. ghc-vector
  9225. ghc-zlib
  9226. glew
  9227. libpng
  9228. lua-5.1
  9229. physfs
  9230. qtbase-5
  9231. (sdl-union
  9232. (list sdl2 sdl2-mixer sdl2-net sdl2-ttf sdl2-image))))
  9233. (native-inputs
  9234. (list clang-9 ghc pkg-config qttools-5))
  9235. (home-page "https://hedgewars.org/")
  9236. (synopsis "Turn-based artillery game featuring fighting hedgehogs")
  9237. (description
  9238. "Hedgewars is a turn based strategy, artillery, action and comedy game,
  9239. featuring the antics of pink hedgehogs with attitude as they battle from the
  9240. depths of hell to the depths of space.
  9241. As commander, it's your job to assemble your crack team of hedgehog soldiers
  9242. and bring the war to your enemy.")
  9243. ;; Software as a whole is licensed under GPL-2 terms. Artwork and
  9244. ;; scripts are distributed under various terms.
  9245. (license (list license:gpl2
  9246. license:bsd-2 license:bsd-3 license:cc-by3.0 license:cc0
  9247. license:expat license:fdl1.3+ license:public-domain
  9248. license:zlib))))
  9249. (define-public go-github-com-anaseto-gruid
  9250. (package
  9251. (name "go-github-com-anaseto-gruid")
  9252. (version "0.21.1")
  9253. (source
  9254. (origin
  9255. (method git-fetch)
  9256. (uri (git-reference
  9257. (url "https://github.com/anaseto/gruid")
  9258. (commit (string-append "v" version))))
  9259. (file-name (git-file-name name version))
  9260. (sha256
  9261. (base32
  9262. "0rvsavkvg2hziwdh8sjk3n5v92m5mfjb8v9m7ch22maxfwq5kv6y"))))
  9263. (build-system go-build-system)
  9264. (arguments
  9265. '(#:import-path "github.com/anaseto/gruid"))
  9266. (propagated-inputs
  9267. (list go-golang-org-x-image))
  9268. (home-page "https://github.com/anaseto/gruid")
  9269. (synopsis "Cross-platform grid-based UI and game framework")
  9270. (description "The gruid module provides packages for easily building
  9271. grid-based applications in Go. The library abstracts rendering and input for
  9272. different platforms. There are drivers available for terminal apps, native
  9273. graphical apps and browser apps. The original application for the library was
  9274. creating grid-based games, but it's also well suited for any grid-based
  9275. application.")
  9276. (license license:isc)))
  9277. (define-public go-github-com-anaseto-gruid-tcell
  9278. (package
  9279. (name "go-github-com-anaseto-gruid-tcell")
  9280. (version "0.1.1")
  9281. (source
  9282. (origin
  9283. (method git-fetch)
  9284. (uri (git-reference
  9285. (url "https://github.com/anaseto/gruid-tcell")
  9286. (commit (string-append "v" version))))
  9287. (file-name (git-file-name name version))
  9288. (sha256
  9289. (base32
  9290. "09ajr9mbldjfc44qprplbf8dr8yhlbn2nfnas2z62m9wmklc0qiv"))))
  9291. (build-system go-build-system)
  9292. (arguments
  9293. '(#:import-path "github.com/anaseto/gruid-tcell"))
  9294. (propagated-inputs
  9295. `(("go-github-com-gdamore-tcell-v2" ,go-github-com-gdamore-tcell-v2)
  9296. ("go-github-com-anaseto-gruid" ,go-github-com-anaseto-gruid)))
  9297. (home-page "https://github.com/anaseto/gruid-tcell")
  9298. (synopsis "Gruid driver using the tcell library")
  9299. (description "The gruid-tcell module provides a Gruid driver for building
  9300. terminal full-window applications.")
  9301. (license license:isc)))
  9302. (define-public harmonist
  9303. (package
  9304. (name "harmonist")
  9305. (version "0.4.1")
  9306. (source (origin
  9307. (method git-fetch)
  9308. (uri (git-reference
  9309. (url "https://git.tuxfamily.org/harmonist/harmonist.git")
  9310. (commit (string-append "v" version))))
  9311. (file-name (git-file-name name version))
  9312. (sha256
  9313. (base32
  9314. "17ai39pw9xq4asfvhs0whx07hljlivygazbwrxjrnxwrn06483hr"))))
  9315. (build-system go-build-system)
  9316. (arguments
  9317. '(#:import-path "git.tuxfamily.org/harmonist/harmonist"))
  9318. (inputs
  9319. `(("go-github-com-gdamore-tcell-v2" ,go-github-com-gdamore-tcell-v2)
  9320. ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)
  9321. ("go-github-com-anaseto-gruid" ,go-github-com-anaseto-gruid)
  9322. ("go-github-com-anaseto-gruid-tcell" ,go-github-com-anaseto-gruid-tcell)))
  9323. (home-page "https://harmonist.tuxfamily.org/")
  9324. (synopsis "Stealth coffee-break roguelike game")
  9325. (description "Harmonist: Dayoriah Clan Infiltration is a stealth
  9326. coffee-break roguelike game. The game has a heavy focus on tactical
  9327. positioning, light and noise mechanisms, making use of various terrain types
  9328. and cones of view for monsters. Aiming for a replayable streamlined experience,
  9329. the game avoids complex inventory management and character building, relying
  9330. on items and player adaptability for character progression.")
  9331. (license license:isc)))
  9332. (define-public drascula
  9333. (package
  9334. (name "drascula")
  9335. (version "1.0")
  9336. (source (origin
  9337. (method url-fetch)
  9338. (uri (string-append "mirror://sourceforge/scummvm/extras/"
  9339. "Drascula_%20The%20Vampire%20Strikes%20Back/"
  9340. "drascula-" version ".zip"))
  9341. (sha256
  9342. (base32
  9343. "1pj29rpb754sn6a56f8brfv6f2m1p5qgaqik7d68pfi2bb5zccdp"))))
  9344. (build-system trivial-build-system)
  9345. (arguments
  9346. `(#:modules ((guix build utils))
  9347. #:builder
  9348. (begin
  9349. (use-modules (guix build utils)
  9350. (ice-9 match))
  9351. (let* ((out (assoc-ref %outputs "out"))
  9352. (share (string-append out "/share/drascula"))
  9353. (scummvm (assoc-ref %build-inputs "scummvm")))
  9354. ;; Install data.
  9355. (let ((unzip (search-input-file %build-inputs "/bin/unzip"))
  9356. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  9357. (for-each
  9358. (lambda (input)
  9359. (invoke unzip
  9360. "-j"
  9361. (assoc-ref %build-inputs input)
  9362. "-x" "__MACOSX")
  9363. ;; Every input provides "readme.txt", and we want to
  9364. ;; preserve them all. Therefore we rename them first.
  9365. (match input
  9366. ("drascula-int"
  9367. (rename-file "readme.txt" "readme-international.txt"))
  9368. ("drascula-audio"
  9369. (rename-file "readme.txt" "readme-audio.txt"))
  9370. (_ #f))
  9371. ;; Install documentation.
  9372. (for-each (lambda (f) (install-file f doc))
  9373. (find-files "." "\\.(txt|doc)$"))
  9374. ;; Install data.
  9375. (for-each (lambda (f) (install-file f share))
  9376. (find-files "." "\\.(ogg|00[0-9])$")))
  9377. '("drascula-audio" "drascula-int" "source")))
  9378. ;; Create standalone executable.
  9379. (let* ((bin (string-append out "/bin"))
  9380. (executable (string-append bin "/drascula"))
  9381. (bash (search-input-file %build-inputs "/bin/bash")))
  9382. (mkdir-p bin)
  9383. (with-output-to-file executable
  9384. (lambda ()
  9385. (format #t "#!~a~%" bash)
  9386. (format #t
  9387. "exec ~a/bin/scummvm --path=~a drascula~%"
  9388. scummvm share)))
  9389. (chmod executable #o755))
  9390. ;; Create desktop file. There is no dedicated icon for the
  9391. ;; game, so we borrow SCUMMVM's.
  9392. (let ((apps (string-append out "/share/applications")))
  9393. (mkdir-p apps)
  9394. (make-desktop-entry-file
  9395. (string-append apps "/drascula.desktop")
  9396. #:name "Drascula: The Vampire Strikes Back"
  9397. #:generic-name "Drascula"
  9398. #:exec (string-append out "/bin/drascula")
  9399. #:icon (string-append scummvm "/share/icons/hicolor/scalable/apps/scummvm.svg")
  9400. #:categories '("AdventureGame" "Game" "RolePlaying")
  9401. #:keywords '("game" "adventure" "roleplaying" "2D" "fantasy")
  9402. #:comment '((#f "Classic 2D point and click adventure game")
  9403. ("de" "Klassisches 2D-Abenteuerspiel in Zeigen-und-Klicken-Manier")
  9404. ("fr" "Jeu classique d'aventure pointer-et-cliquer en 2D")
  9405. ("it" "Gioco classico di avventura punta e clicca 2D"))))
  9406. #t))))
  9407. (native-inputs
  9408. (list bash unzip))
  9409. (inputs
  9410. `(("scummvm" ,scummvm)
  9411. ("drascula-int"
  9412. ,(let ((version "1.1"))
  9413. (origin
  9414. (method url-fetch)
  9415. (uri (string-append "mirror://sourceforge/scummvm/extras/"
  9416. "Drascula_%20The%20Vampire%20Strikes%20Back/"
  9417. "drascula-int-" version ".zip"))
  9418. (sha256
  9419. (base32
  9420. "12236i7blamal92p1i8dgp3nhp2yicics4whsl63v682bj999n14")))))
  9421. ("drascula-audio"
  9422. ,(let ((version "2.0"))
  9423. (origin
  9424. (method url-fetch)
  9425. (uri (string-append "mirror://sourceforge/scummvm/extras/"
  9426. "Drascula_%20The%20Vampire%20Strikes%20Back/"
  9427. "drascula-audio-" version ".zip"))
  9428. (sha256
  9429. (base32
  9430. "00g4izmsqzxb8ry1vhfx6jrygl58lvlij09nw01ds4zddsiznsky")))))))
  9431. (home-page "https://www.scummvm.org")
  9432. (synopsis "Classic 2D point and click adventure game")
  9433. (description "Drascula: The Vampire Strikes Back is a classic humorous 2D
  9434. point and click adventure game.
  9435. In Drascula you play the role of John Hacker, a British estate agent, that
  9436. gets to meet a gorgeous blond girl who is kidnapped by the notorious vampire
  9437. Count Drascula and embark on a fun yet dangerous quest to rescue her.
  9438. Unfortunately, Hacker is not aware of Drascula's real ambitions: DOMINATING
  9439. the World and demonstrating that he is even more evil than his brother Vlad.")
  9440. ;; Drascula uses a BSD-like license.
  9441. (license (license:non-copyleft "file:///readme.txt"))))
  9442. (define (make-lure-package name language hash)
  9443. (package
  9444. (name name)
  9445. (version "1.1")
  9446. (source
  9447. (origin
  9448. (method url-fetch)
  9449. (uri (string-append
  9450. "mirror://sourceforge/scummvm/extras/"
  9451. "Lure%20of%20the%20Temptress/"
  9452. name "-" version ".zip"))
  9453. (sha256
  9454. (base32 hash))))
  9455. (build-system trivial-build-system)
  9456. (arguments
  9457. `(#:modules ((guix build utils))
  9458. #:builder
  9459. (begin
  9460. (use-modules (guix build utils))
  9461. (let* ((out (assoc-ref %outputs "out"))
  9462. (share (string-append out "/share"))
  9463. (data (string-append share "/" ,name "/" ,language))
  9464. (apps (string-append share "/applications"))
  9465. (bin (string-append out "/bin"))
  9466. (executable (string-append bin "/" ,name))
  9467. (scummvm (assoc-ref %build-inputs "scummvm")))
  9468. (let ((unzip (search-input-file %build-inputs "/bin/unzip")))
  9469. (invoke unzip "-j" (assoc-ref %build-inputs "source")))
  9470. (let ((doc (string-append share "/doc/" ,name "-" ,version)))
  9471. (for-each (lambda (f) (install-file f doc))
  9472. (find-files "." "\\.(txt|PDF|pdf)$")))
  9473. (for-each (lambda (f) (install-file f data))
  9474. (find-files "." "\\.(vga|VGA)$"))
  9475. ;; Build the executable.
  9476. (mkdir-p bin)
  9477. (let ((bash (assoc-ref %build-inputs "bash")))
  9478. (with-output-to-file executable
  9479. (lambda ()
  9480. (format #t "#!~a/bin/bash~%" bash)
  9481. (format #t "exec ~a/bin/scummvm -q ~a -p ~a lure~%"
  9482. scummvm ,language data))))
  9483. (chmod executable #o755)
  9484. ;; Create desktop file. There is no dedicated
  9485. ;; icon for the game, so we borrow SCUMMVM's.
  9486. (mkdir-p apps)
  9487. (with-output-to-file (string-append apps "/" ,name ".desktop")
  9488. (lambda _
  9489. (format #t
  9490. "[Desktop Entry]~@
  9491. Name=Lure of the Temptress~@
  9492. GenericName=Lure~@
  9493. Exec=~a~@
  9494. Icon=~a/share/icons/hicolor/scalable/apps/scummvm.svg~@
  9495. Categories=AdventureGame;Game;RolePlaying;~@
  9496. Keywords=game;adventure;roleplaying;2D,fantasy;~@
  9497. Comment=Classic 2D point and click adventure game~@
  9498. Comment[de]=klassisches 2D-Abenteuerspiel in Zeigen-und-Klicken-Manier~@
  9499. Comment[fr]=Jeu classique d'aventure pointer-et-cliquer en 2D~@
  9500. Comment[it]=Gioco classico di avventura punta e clicca 2D~@
  9501. Type=Application~%"
  9502. executable scummvm)))
  9503. #t))))
  9504. (native-inputs
  9505. (list unzip))
  9506. (inputs
  9507. (list bash scummvm))
  9508. (home-page "https://www.scummvm.org")
  9509. (synopsis "2D point and click fantasy adventure game")
  9510. (description
  9511. "Lure of the Temptress is a classic 2D point and click adventure game.
  9512. You are Diermot, an unwilling hero who'd prefer a quiet life, and are, to all
  9513. intents and purposes, a good man. After decades of unrest the King has united
  9514. the warring factions in his kingdom and all his lands are at peace, except
  9515. a remote region around a town called Turnvale. A revolt has recently taken
  9516. place in Turnvale, a revolt orchestrated by an apprentice sorceress called
  9517. Selena, the titular temptress. The king calls together his finest horsemen
  9518. and heads off (with you in tow) to Turnvale just to witness how hellish
  9519. mercenary monsters called Skorl are invading the town.
  9520. The king's men are defeated, the king is killed and you fall of your horse and
  9521. bang your head heavily on the ground. You have been *unconscious for a while
  9522. when you realize that you are in a dingy cell guarded by a not so friendly
  9523. Skorl. Maybe it would be an idea to try and escape...")
  9524. (license (license:non-copyleft "file:///README"))))
  9525. (define-public lure
  9526. (make-lure-package
  9527. "lure" "en" "0201i70qcs1m797kvxjx3ygkhg6kcl5yf49sihba2ga8l52q45zk"))
  9528. (define-public lure-de
  9529. (make-lure-package
  9530. "lure-de" "de" "0sqq7h5llml6rv85x0bfv4bgzwhs4c82p4w4zmfcaab6cjlad0sy"))
  9531. (define-public lure-es
  9532. (make-lure-package
  9533. "lure-es" "es" "1dvv5znvlsakw6w5r16calv9jkgw27aymgybsf4q22lcmpxbj1lk"))
  9534. (define-public lure-fr
  9535. (make-lure-package
  9536. "lure-fr" "fr" "1y51jjb7f8023832g44vd1jsb6ni85586pi2n5hjg9qjk6gi90r9"))
  9537. (define-public lure-it
  9538. (make-lure-package
  9539. "lure-it" "it" "1ks6n39r1cllisrrh6pcr39swsdv7ng3gx5c47vaw71zzfr70hjj"))
  9540. (define (make-queen-package name file-prefix release language hash)
  9541. (package
  9542. (name name)
  9543. (version release)
  9544. (source
  9545. (origin
  9546. (method url-fetch)
  9547. (uri (string-append "mirror://sourceforge/scummvm/extras/"
  9548. "Flight%20of%20the%20Amazon%20Queen/"
  9549. file-prefix release ".zip"))
  9550. (sha256
  9551. (base32 hash))))
  9552. (build-system copy-build-system)
  9553. (arguments
  9554. (list
  9555. #:install-plan
  9556. #~'(("queen.1c" #$(string-append "share/" name "/"))
  9557. (#$name "bin/")
  9558. (#$(string-append name ".desktop") "share/applications/")
  9559. ("." #$(string-append "share/doc/" name "-" version)
  9560. #:include-regexp ("README" "readme")))
  9561. #:phases
  9562. #~(modify-phases %standard-phases
  9563. (add-before 'install 'build
  9564. (lambda* (#:key inputs outputs #:allow-other-keys)
  9565. (with-output-to-file #$name
  9566. (lambda ()
  9567. (format #t "#!~a~%" (search-input-file inputs "bin/sh"))
  9568. (format #t "exec ~a -q ~a -p ~a queen~%"
  9569. (search-input-file inputs "bin/scummvm")
  9570. #$language
  9571. (string-append (assoc-ref outputs "out")
  9572. "/share/" #$name))))
  9573. (chmod #$name #o755)
  9574. (with-output-to-file #$(string-append name ".desktop")
  9575. (lambda ()
  9576. (format
  9577. #t
  9578. "[Desktop Entry]~@
  9579. Name=Flight of the Amazon Queen~@
  9580. GenericName=Queen~@
  9581. Comment=Embark on a quest to rescue a kidnapped princess~
  9582. and in the process, discover the true sinister intentions~
  9583. of a suspiciously located Lederhosen company~@
  9584. Comment[de]=Begib dich auf ein Abenteuer, um eine entführte~
  9585. Prinzessin zu retten und entdecke die wahren, finsteren~
  9586. Absichten eines verdächtig erscheinenden~
  9587. Lederhosen-Unternehmens~@
  9588. Type=Application~@
  9589. Exec=~a~@
  9590. Icon=~a/share/icons/hicolor/scalable/apps/scummvm.svg~@
  9591. Categories=AdventureGame;Game;RolePlaying;~@
  9592. Keywords=adventure;game;roleplaying;fantasy;~%"
  9593. (string-append (assoc-ref outputs "out") "/bin/" #$name)
  9594. (search-input-file inputs "bin/scummvm")))))))))
  9595. (native-inputs (list unzip))
  9596. (inputs (list bash scummvm))
  9597. (home-page "https://www.scummvm.org/")
  9598. (synopsis "Classic 2D point and click adventure game")
  9599. (description "Flight of the Amazon Queen is a 2D point-and-click
  9600. adventure game set in the 1940s.
  9601. You assume the role of Joe King, a pilot for hire who is given the job
  9602. of flying Faye Russell (a famous movie star) into the Amazon jungle
  9603. for a photo shoot. Of course, things never go according to plans.
  9604. After an unfortunate turn of events they find themselves stranded in
  9605. the heart of the Amazon jungle, where Joe will embark on a quest to
  9606. rescue a kidnapped princess and in the process, discover the true
  9607. sinister intentions of a suspiciously located Lederhosen company. In
  9608. a rich 2D environment, Joe will cross paths with a variety of unlikely
  9609. jungle inhabitants including, but not limited to, a tribe of Amazon
  9610. women and 6-foot-tall pygmies.")
  9611. (license (license:non-copyleft "file:///readme.txt"))))
  9612. (define-public queen
  9613. (make-queen-package
  9614. "queen" "FOTAQ_Talkie-" "1.1" "en"
  9615. "1a6q71q1dl9vvw2qqsxk5h1sv0gaqy6236zr5905w2is01gdsp52"))
  9616. (define-public queen-de
  9617. (make-queen-package
  9618. "queen-de" "FOTAQ_Ger_talkie-" "1.0" "de"
  9619. "13vn43x7214vyprlpqabvv71k890nff3d6fjscflr1ll7acjca3f"))
  9620. (define-public queen-fr
  9621. (make-queen-package
  9622. "queen-fr" "FOTAQ_Fr_Talkie_" "1.0" "fr"
  9623. "0hq5g4qrkcwm2kn5i4kv4hijs9hi7bw9xl1vrwd1l69qqn30crwy"))
  9624. (define-public queen-it
  9625. (make-queen-package
  9626. "queen-it" "FOTAQ_It_Talkie_" "1.0" "it"
  9627. "1h76y70lrpzfjkm53n4nr364nhyka54vbz9r7sadzyzl7c7ilv4d"))
  9628. (define-public sky
  9629. (package
  9630. (name "sky")
  9631. (version "1.2") ;1.3 is floppy version
  9632. (source
  9633. (origin
  9634. (method url-fetch)
  9635. (uri (string-append "mirror://sourceforge/scummvm/extras/"
  9636. "Beneath%20a%20Steel%20Sky/"
  9637. "bass-cd-" version ".zip"))
  9638. (sha256
  9639. (base32 "14s5jz67kavm8l15gfm5xb7pbpn8azrv460mlxzzvdpa02a9n82k"))))
  9640. (build-system trivial-build-system)
  9641. (arguments
  9642. `(#:modules ((guix build utils))
  9643. #:builder
  9644. (begin
  9645. (use-modules (guix build utils))
  9646. (let* ((out (assoc-ref %outputs "out"))
  9647. (share (string-append out "/share"))
  9648. (data (string-append share "/" ,name))
  9649. (apps (string-append share "/applications"))
  9650. (bin (string-append out "/bin"))
  9651. (executable (string-append bin "/" ,name))
  9652. (scummvm (assoc-ref %build-inputs "scummvm")))
  9653. (let ((unzip (search-input-file %build-inputs "/bin/unzip")))
  9654. (invoke unzip "-j" (assoc-ref %build-inputs "source")))
  9655. (let ((doc (string-append share "/doc/bass-" ,version)))
  9656. (install-file "readme.txt" doc))
  9657. (for-each (lambda (f) (install-file f data))
  9658. (find-files "." "^sky\\."))
  9659. ;; Build the executable.
  9660. (mkdir-p bin)
  9661. (let ((bash (assoc-ref %build-inputs "bash")))
  9662. (with-output-to-file executable
  9663. (lambda ()
  9664. (format #t "#!~a/bin/bash~%" bash)
  9665. (format #t "exec ~a/bin/scummvm -p ~a sky~%" scummvm data))))
  9666. (chmod executable #o755)
  9667. ;; Create desktop file. There is no dedicated
  9668. ;; icon for the game, so we borrow SCUMMVM's.
  9669. (mkdir-p apps)
  9670. (with-output-to-file (string-append apps "/" ,name ".desktop")
  9671. (lambda _
  9672. (format #t
  9673. "[Desktop Entry]~@
  9674. Name=Beneath a Steel Sky~@
  9675. GenericName=Bass~@
  9676. Exec=~a~@
  9677. Icon=~a/share/icons/hicolor/scalable/apps/scummvm.svg~@
  9678. Categories=AdventureGame;Game;RolePlaying;~@
  9679. Keywords=adventure;game;roleplaying;cyberpunk;~@
  9680. Comment=A science-fiction adventure game set in a bleak post-apocalyptic vision of the future~@
  9681. Comment[de]=Ein Science-Fiction-Abenteuerspiel \
  9682. angesiedelt in einer düsteren, postapokalyptischen Vision der Zukunft~@
  9683. Type=Application~%"
  9684. executable scummvm)))
  9685. #t))))
  9686. (native-inputs
  9687. (list unzip))
  9688. (inputs
  9689. (list bash scummvm))
  9690. (home-page "https://www.scummvm.org/")
  9691. (synopsis "Classic 2D point and click science-fiction adventure game")
  9692. (description
  9693. "Beneath a Steel Sky is a science-fiction thriller set in a bleak
  9694. post-apocalyptic vision of the future. It revolves around Union City,
  9695. where selfishness, rivalry, and corruption by its citizens seems to be
  9696. all too common, those who can afford it live underground, away from
  9697. the pollution and social problems which are plaguing the city.
  9698. You take on the role of Robert Foster, an outcast of sorts from the
  9699. city since a boy who was raised in a remote environment outside of
  9700. Union City simply termed ``the gap''. Robert's mother took him away
  9701. from Union City as a child on their way to ``Hobart'' but the
  9702. helicopter crashed on its way. Unfortunately, Robert's mother died,
  9703. but he survived and was left to be raised by a local tribe from the
  9704. gap.
  9705. Years later, Union City security drops by and abducts Robert, killing
  9706. his tribe in the process; upon reaching the city the helicopter taking
  9707. him there crashes with him escaping, high upon a tower block in the
  9708. middle of the city. He sets out to discover the truth about his past,
  9709. and to seek vengeance for the killing of his tribe.")
  9710. (license (license:non-copyleft "file:///readme.txt"))))
  9711. (define-public gnurobots
  9712. (package
  9713. (name "gnurobots")
  9714. (version "1.2.0")
  9715. (source
  9716. (origin
  9717. (method url-fetch)
  9718. (uri (string-append "mirror://gnu/gnurobots/gnurobots-"
  9719. version ".tar.gz"))
  9720. (sha256
  9721. (base32
  9722. "07gi3lsmbzzsjambgixj6xy79lh22km84z7bnzgwzxdy806lyvwb"))))
  9723. (build-system gnu-build-system)
  9724. (inputs
  9725. (list glib gtk+-2 vte/gtk+-2 readline guile-1.8))
  9726. (native-inputs
  9727. (list pkg-config))
  9728. (arguments
  9729. `(#:make-flags
  9730. (list
  9731. ;; Do not abort build on "deprecated-declarations" warnings.
  9732. "CFLAGS=-Wno-error=deprecated-declarations"
  9733. ;; Find readline headers in sub-directory.
  9734. (string-append "READLINE_CFLAGS=-I"
  9735. (assoc-ref %build-inputs "readline")
  9736. "/include/readline/"))
  9737. #:phases
  9738. (modify-phases %standard-phases
  9739. (add-after 'install 'install-doc
  9740. (lambda* (#:key outputs #:allow-other-keys)
  9741. (install-file "doc/Robots-HOWTO"
  9742. (string-append (assoc-ref outputs "out")
  9743. "/share/doc/gnurobots-"
  9744. ,version))
  9745. #t)))))
  9746. (home-page "https://www.gnu.org/software/gnurobots/")
  9747. (synopsis "Program a little robot and watch it explore a world")
  9748. (description
  9749. "GNU Robots is a game in which you program a robot to explore a world
  9750. full of enemies that can hurt it, obstacles and food to be eaten. The goal of
  9751. the game is to stay alive and collect prizes. The robot program conveniently
  9752. may be written in a plain text file in the Scheme programming language.")
  9753. (license license:gpl3+)))
  9754. (define-public ri-li
  9755. (package
  9756. (name "ri-li")
  9757. (version "2.0.1")
  9758. (source (origin
  9759. (method url-fetch)
  9760. (uri (string-append "mirror://sourceforge/ri-li/"
  9761. "Ri-li%20Linux_Unix/Ri-li%20V" version "/"
  9762. "Ri-li-" version ".tar.bz2"))
  9763. (sha256
  9764. (base32
  9765. "1gcdsgnnbbn1mb1hkpwniv3fhkaj1nn8gq33v5c16q3wqchcq77p"))
  9766. ;; Taken from
  9767. ;; <https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/rili/moderinze_cpp.patch>.
  9768. ;; It doesn't build otherwise.
  9769. (patches (search-patches "ri-li-modernize_cpp.patch"))))
  9770. (build-system gnu-build-system)
  9771. (arguments
  9772. `(#:phases
  9773. (modify-phases %standard-phases
  9774. ;; Remove "gentoo" subdirectory from Makefile, as it is
  9775. ;; missing a make file and generates a build failure.
  9776. (add-after 'configure 'fix-build
  9777. (lambda _
  9778. (substitute* "Makefile"
  9779. ((" gentoo") ""))
  9780. #t))
  9781. (add-after 'install 'install-desktop-file
  9782. (lambda* (#:key outputs #:allow-other-keys)
  9783. (let* ((out (assoc-ref outputs "out"))
  9784. (apps (string-append out "/share/applications"))
  9785. (pixmaps (string-append out "/share/pixmaps")))
  9786. (for-each (lambda (f) (install-file f pixmaps))
  9787. (find-files "data" "\\.(png|ico)$"))
  9788. (mkdir-p apps)
  9789. (with-output-to-file (string-append apps "/ri-li.desktop")
  9790. (lambda _
  9791. (format #t
  9792. "[Desktop Entry]~@
  9793. Name=Ri-li~@
  9794. Exec=~a/bin/Ri_li~@
  9795. Icon=~a/Ri-li-icon-32x32.png~@
  9796. Categories=Game;ArcadeGame;~@
  9797. Keywords=toy;train;wooden;snake-like;engine;~@
  9798. Comment=a toy simulator game~@
  9799. Comment[de]=Ein Spiel mit einem kleinen Zug~@
  9800. Comment[fr]=un jeu de petit train~@
  9801. Comment[ro_RO]=un joc cu un tren de jucărie~@
  9802. Terminal=false~@
  9803. Type=Application~%"
  9804. out pixmaps))))
  9805. #t))
  9806. (add-after 'install-desktop-file 'remove-spurious-files
  9807. ;; Delete redundant files already installed somewhere else.
  9808. (lambda* (#:key outputs #:allow-other-keys)
  9809. (let ((out (assoc-ref outputs "out")))
  9810. (for-each delete-file
  9811. (find-files (string-append out "/share/Ri-li")
  9812. "\\.(png|ico)|COPYING"))
  9813. #t))))))
  9814. (inputs
  9815. `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
  9816. (home-page "http://www.ri-li.org")
  9817. (synopsis "Toy train simulation game")
  9818. (description "Ri-li is a game in which you drive a wooden toy
  9819. steam locomotive across many levels and collect all the coaches to
  9820. win.")
  9821. ;; The project is dual-licensed GPL2+ and GPL3+.
  9822. (license (list license:gpl2+ license:gpl3+))))
  9823. (define-public freeorion
  9824. (package
  9825. (name "freeorion")
  9826. (version "0.4.10.2")
  9827. (source
  9828. (origin
  9829. (method git-fetch)
  9830. (uri (git-reference
  9831. (url "https://github.com/freeorion/freeorion")
  9832. (commit (string-append "v" version))))
  9833. (sha256
  9834. (base32 "12fhwa3cs6lvdbdhina310qk2g7zcphldsh7ibsbxn8d1m731xlk"))
  9835. (file-name (git-file-name name version))
  9836. (modules '((guix build utils)))
  9837. (snippet
  9838. '(begin
  9839. ;; There are some bundled fonts.
  9840. (for-each delete-file-recursively '("default/data/fonts"))))))
  9841. (build-system cmake-build-system)
  9842. (arguments
  9843. '(#:tests? #f ;no test
  9844. #:phases
  9845. (modify-phases %standard-phases
  9846. (add-after 'unpack 'unbundle-fonts
  9847. (lambda* (#:key inputs #:allow-other-keys)
  9848. (let ((roboto-dir (string-append (assoc-ref inputs "font-roboto")
  9849. "/share/fonts/truetype/")))
  9850. (substitute* "UI/ClientUI.cpp"
  9851. (("\\(GetRootDataDir.*?Roboto-(Bold|Regular)\\.ttf\"\\)\\.string\\(\\)\\);"
  9852. all type)
  9853. (string-append "\"" roboto-dir "Roboto-" type ".ttf\");")))
  9854. #t))))))
  9855. (inputs
  9856. `(("boost" ,boost)
  9857. ("boost_signals" ,boost-signals2)
  9858. ("font-dejavu" ,font-dejavu)
  9859. ("font-roboto" ,font-google-roboto)
  9860. ("freetype2" ,freetype)
  9861. ("glew" ,glew)
  9862. ("glu" ,glu)
  9863. ("libogg" ,libogg)
  9864. ("libpng" ,libpng)
  9865. ("libvorbis" ,libvorbis)
  9866. ("openal" ,openal)
  9867. ("python" ,python)
  9868. ("sdl2" ,sdl2)
  9869. ("zlib" ,zlib)))
  9870. (home-page "https://www.freeorion.org/index.php/Main_Page")
  9871. (synopsis "Turn-based space empire and galactic conquest computer game")
  9872. (description
  9873. "FreeOrion is a turn-based space empire and galactic conquest (4X)
  9874. computer game being designed and built by the FreeOrion project. Control an
  9875. empire with the goal of exploring the galaxy, expanding your territory,
  9876. exploiting the resources, and exterminating rival alien empires. FreeOrion is
  9877. inspired by the tradition of the Master of Orion games, but is not a clone or
  9878. remake of that series or any other game.")
  9879. ;; Source code is released under gpl2. Artwork, music and sounds, and
  9880. ;; in-game text are released under cc-by-sa3.0. Game content scripts are
  9881. ;; released under both gpl2 and cc-by-sa3.0. Bundled Gigi library is
  9882. ;; released under lgpl2.1+.
  9883. (license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+))))
  9884. (define-public leela-zero
  9885. (package
  9886. (name "leela-zero")
  9887. (version "0.17")
  9888. (source
  9889. (origin
  9890. (method git-fetch)
  9891. (uri (git-reference
  9892. (url "https://github.com/leela-zero/leela-zero")
  9893. (commit (string-append "v" version))))
  9894. (file-name (git-file-name name version))
  9895. (sha256
  9896. (base32
  9897. "17px5iny8mql5c01bymcli7zfssswkzvb2i8gnsmjcck6i2n8srl"))
  9898. (patches (search-patches "leela-zero-gtest.patch"))))
  9899. (build-system cmake-build-system)
  9900. (native-inputs
  9901. (list googletest))
  9902. (inputs
  9903. (list boost
  9904. opencl-icd-loader
  9905. openblas
  9906. opencl-headers
  9907. qtbase-5
  9908. zlib))
  9909. (arguments
  9910. '(#:configure-flags '("-DUSE_BLAS=YES")
  9911. #:phases (modify-phases %standard-phases
  9912. (add-before 'configure 'fix-tests
  9913. (lambda* (#:key outputs #:allow-other-keys)
  9914. (let ((home (getcwd)))
  9915. (setenv "HOME" home)
  9916. (substitute* "src/tests/gtests.cpp"
  9917. (("\\.\\./src/tests/0k\\.txt")
  9918. (string-append home "/src/tests/0k.txt"))
  9919. (("cfg_gtp_mode = true;")
  9920. "cfg_gtp_mode = true; cfg_cpu_only = true;")))
  9921. #t))
  9922. (replace 'check
  9923. (lambda _
  9924. (invoke "./tests"))))))
  9925. (home-page "https://github.com/leela-zero/leela-zero")
  9926. (synopsis "Program playing the game of Go")
  9927. (description
  9928. "Leela-zero is a Go engine with no human-provided knowledge, modeled after
  9929. the AlphaGo Zero paper. The current best network weights file for the engine
  9930. can be downloaded from @url{https://zero.sjeng.org/best-network}.")
  9931. (license license:gpl3+)))
  9932. (define-public q5go
  9933. (package
  9934. (name "q5go")
  9935. (version "1.0")
  9936. (source (origin
  9937. (method git-fetch)
  9938. (uri (git-reference
  9939. (url "https://github.com/bernds/q5Go")
  9940. (commit (string-append "q5go-" version))))
  9941. (file-name (git-file-name name version))
  9942. (sha256
  9943. (base32
  9944. "1gdlfqcqkqv7vph3qwq78d0qz6dhmdsranxq9bmixiisbzkqby31"))))
  9945. (build-system gnu-build-system)
  9946. (native-inputs
  9947. (list pkg-config))
  9948. (inputs
  9949. (list qtbase-5 qtmultimedia-5 qtsvg-5))
  9950. (arguments
  9951. '(#:phases
  9952. (modify-phases %standard-phases
  9953. (add-after 'unpack 'fix-configure-script
  9954. (lambda _
  9955. ;; Bypass the unavailable qtchooser program.
  9956. (substitute* "configure"
  9957. (("test -z \"QTCHOOSER\"")
  9958. "false")
  9959. (("qtchooser -run-tool=(.*) -qt=qt5" _ command)
  9960. command))
  9961. #t))
  9962. (add-after 'unpack 'fix-header
  9963. (lambda _
  9964. (substitute* "src/bitarray.h"
  9965. (("#include <cstring>" all)
  9966. (string-append all "\n#include <stdexcept>")))))
  9967. (add-after 'unpack 'fix-paths
  9968. (lambda _
  9969. (substitute* '("src/pics/Makefile.in"
  9970. "src/translations/Makefile.in")
  9971. (("\\$\\(datadir\\)/qGo/")
  9972. "$(datadir)/q5go/"))
  9973. #t))
  9974. (add-after 'install 'install-desktop-file
  9975. (lambda* (#:key outputs #:allow-other-keys)
  9976. (let* ((out (assoc-ref outputs "out"))
  9977. (apps (string-append out "/share/applications"))
  9978. (pics (string-append out "/share/q5go/pics")))
  9979. (delete-file-recursively (string-append out "/share/applnk"))
  9980. (delete-file-recursively (string-append out "/share/mimelnk"))
  9981. (install-file "../source/src/pics/Bowl.ico" pics)
  9982. (mkdir-p apps)
  9983. (with-output-to-file (string-append apps "/q5go.desktop")
  9984. (lambda _
  9985. (format #t
  9986. "[Desktop Entry]~@
  9987. Name=q5go~@
  9988. Exec=~a/bin/q5go~@
  9989. Icon=~a/Bowl.ico~@
  9990. Categories=Game;~@
  9991. Comment=Game of Go~@
  9992. Comment[de]=Spiel des Go~@
  9993. Comment[eo]=Goo~@
  9994. Comment[es]=Juego de Go~@
  9995. Comment[fr]=Jeu de Go~@
  9996. Comment[ja]=囲碁~@
  9997. Comment[ko]=바둑~@
  9998. Comment[zh]=围棋~@
  9999. Terminal=false~@
  10000. Type=Application~%"
  10001. out pics))))
  10002. #t)))))
  10003. (synopsis "Qt GUI to play the game of Go")
  10004. (description
  10005. "This a tool for Go players which performs the following functions:
  10006. @itemize
  10007. @item SGF editor,
  10008. @item Analysis frontend for Leela Zero (or compatible engines),
  10009. @item GTP interface (to play against an engine),
  10010. @item IGS client (to play on the internet),
  10011. @item Export games to a variety of formats.
  10012. @end itemize")
  10013. (home-page "https://github.com/bernds/q5Go")
  10014. (license license:gpl2+)))
  10015. (define-public xmoto
  10016. (package
  10017. (name "xmoto")
  10018. (version "0.6.2")
  10019. (source
  10020. (origin
  10021. (method git-fetch)
  10022. (uri (git-reference
  10023. (url "https://github.com/xmoto/xmoto")
  10024. (commit (string-append "v" version))))
  10025. (file-name (git-file-name name version))
  10026. (sha256
  10027. (base32 "14z3yqpiyv4y5l37b12kf8ipgsmb9krb4b5d9adlrry0j43hd7wz"))
  10028. (modules '((guix build utils)
  10029. (ice-9 ftw)
  10030. (srfi srfi-1)))
  10031. ;; XXX: Remove some bundled libraries. Guix provides Chipmunk, but
  10032. ;; it appears to be incompatible with the (older) one bundled.
  10033. (snippet
  10034. `(begin
  10035. (let ((keep '("chipmunk" "glad" "md5sum")))
  10036. (with-directory-excursion "vendor"
  10037. (for-each delete-file-recursively
  10038. (lset-difference string=?
  10039. (scandir ".")
  10040. (cons* "." ".." keep))))
  10041. (substitute* "src/CMakeLists.txt"
  10042. (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
  10043. (if (member library keep) line ""))))))))
  10044. (build-system cmake-build-system)
  10045. (arguments
  10046. (list
  10047. #:tests? #f ;no tests
  10048. #:phases
  10049. #~(modify-phases %standard-phases
  10050. (add-after 'unpack 'fix-hard-coded-directory
  10051. (lambda _
  10052. (substitute* "src/common/VFileIO.cpp"
  10053. (("/usr/share") (string-append #$output "/share")))))
  10054. (add-before 'build 'set-SDL
  10055. ;; Set correct environment for SDL.
  10056. (lambda* (#:key inputs #:allow-other-keys)
  10057. (setenv "CPATH"
  10058. (string-append
  10059. (search-input-directory inputs "/include/SDL2")
  10060. ":"
  10061. (or (getenv "CPATH") "")))))
  10062. (add-after 'install 'unbundle-fonts
  10063. ;; Unbundle DejaVuSans TTF files.
  10064. (lambda* (#:key inputs #:allow-other-keys)
  10065. (let ((font-dir (search-input-directory inputs
  10066. "/share/fonts/truetype/"))
  10067. (target-dir (string-append #$output
  10068. "/share/xmoto/Textures/Fonts/")))
  10069. (for-each (lambda (f)
  10070. (let ((font (string-append font-dir f))
  10071. (target (string-append target-dir f)))
  10072. (delete-file target)
  10073. (symlink font target)))
  10074. '("DejaVuSans.ttf" "DejaVuSansMono.ttf"))))))))
  10075. (native-inputs
  10076. (list gettext-minimal pkg-config))
  10077. (inputs
  10078. (list bzip2
  10079. curl
  10080. font-dejavu
  10081. glu
  10082. libjpeg-turbo
  10083. libpng
  10084. libxdg-basedir
  10085. libxml2
  10086. lua
  10087. ode
  10088. (sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf))
  10089. sqlite
  10090. zlib))
  10091. (home-page "https://xmoto.tuxfamily.org/")
  10092. (synopsis "2D motocross platform game")
  10093. (description
  10094. "X-Moto is a challenging 2D motocross platform game, where
  10095. physics play an all important role in the gameplay. You need to
  10096. control your bike to its limit, if you want to have a chance finishing
  10097. the more difficult challenges.")
  10098. (license (list license:gpl2+ ;whole project
  10099. license:bsd-3 ;vendor/md5sum
  10100. license:lgpl2.1+
  10101. license:expat))))
  10102. (define-public eboard
  10103. (package
  10104. (name "eboard")
  10105. (version "1.1.3")
  10106. (source
  10107. (origin
  10108. (method git-fetch)
  10109. (uri (git-reference
  10110. (url "https://github.com/fbergo/eboard")
  10111. (commit (string-append "v" version))))
  10112. (file-name (git-file-name name version))
  10113. (sha256
  10114. (base32 "1z4pwpqyvxhlda99h6arh2rjk90fbms9q29fqizjblrdn01dlxn1"))))
  10115. (build-system gnu-build-system)
  10116. (native-inputs
  10117. (list perl pkg-config))
  10118. (inputs
  10119. (list gtk+-2 libpng gstreamer))
  10120. (arguments
  10121. `(#:tests? #f
  10122. #:phases
  10123. (modify-phases %standard-phases
  10124. (replace 'configure
  10125. (lambda* (#:key outputs #:allow-other-keys)
  10126. (make-file-writable "eboard-config")
  10127. (setenv "CC" "gcc")
  10128. (invoke "./configure"
  10129. (string-append "--prefix=" (assoc-ref outputs "out")))
  10130. #t))
  10131. (add-before 'install 'make-required-directories
  10132. (lambda* (#:key outputs #:allow-other-keys)
  10133. (mkdir-p (string-append (assoc-ref outputs "out")
  10134. "/share/eboard"))
  10135. #t)))))
  10136. (synopsis "Graphical user interface to play chess")
  10137. (description
  10138. "Eboard is a chess board interface for ICS (Internet Chess Servers)
  10139. and chess engines.")
  10140. (home-page "https://www.bergo.eng.br/eboard/")
  10141. (license license:gpl2+)))
  10142. (define-public chessx
  10143. (package
  10144. (name "chessx")
  10145. (version "1.5.6")
  10146. (source
  10147. (origin
  10148. (method url-fetch)
  10149. (uri (string-append "mirror://sourceforge/chessx/chessx/"
  10150. version "/chessx-" version ".tgz"))
  10151. (sha256
  10152. (base32 "01fjchil2h6ry2ywr0dwjw2g7zd29580cr4c74d5z74h999lp6nh"))))
  10153. (build-system qt-build-system)
  10154. (native-inputs
  10155. (list qttools-5))
  10156. (inputs
  10157. (list qtbase-5 qtmultimedia-5 qtspeech qtsvg-5 zlib))
  10158. (arguments
  10159. `(#:tests? #f
  10160. #:phases
  10161. (modify-phases %standard-phases
  10162. (add-after 'unpack 'fix-paths
  10163. (lambda* (#:key inputs #:allow-other-keys)
  10164. (substitute* "chessx.pro"
  10165. (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
  10166. (search-input-file inputs "/bin/lrelease")))))
  10167. (add-after 'fix-paths 'make-qt-deterministic
  10168. (lambda _
  10169. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
  10170. #t))
  10171. (add-after 'make-qt-deterministic 'disable-versioncheck
  10172. (lambda _
  10173. (substitute* "src/database/settings.cpp"
  10174. (("\"/General/onlineVersionCheck\", true")
  10175. "\"/General/onlineVersionCheck\", false"))
  10176. #t))
  10177. (replace 'configure
  10178. (lambda _
  10179. (invoke "qmake")
  10180. #t))
  10181. (replace 'install
  10182. (lambda* (#:key outputs #:allow-other-keys)
  10183. (let ((out (assoc-ref outputs "out")))
  10184. (install-file "release/chessx" (string-append out "/bin"))
  10185. (install-file "unix/chessx.desktop"
  10186. (string-append out "/share/applications")))
  10187. #t)))))
  10188. (synopsis "Chess game database")
  10189. (description
  10190. "ChessX is a chess database. With ChessX you can operate on your
  10191. collection of chess games in many ways: browse, edit, add, organize, analyze,
  10192. etc. You can also play games on FICS or against an engine.")
  10193. (home-page "https://chessx.sourceforge.net/")
  10194. (license license:gpl2+)))
  10195. (define-public stockfish
  10196. (let ((neural-network-revision "ad9b42354671")) ; also update hash below
  10197. (package
  10198. (name "stockfish")
  10199. (version "15.1")
  10200. (source
  10201. (origin
  10202. (method git-fetch)
  10203. (uri (git-reference
  10204. (url "https://github.com/official-stockfish/Stockfish")
  10205. (commit (string-append "sf_" version))))
  10206. (file-name (git-file-name name version))
  10207. (sha256
  10208. (base32 "0zmnv8vbhhid73pjyxg56r4ckm887znv4d55br370plm3p5b56xa"))))
  10209. (build-system gnu-build-system)
  10210. (inputs
  10211. `(("neural-network"
  10212. ,(origin
  10213. (method url-fetch)
  10214. (uri (string-append "https://tests.stockfishchess.org/api/nn/nn-"
  10215. neural-network-revision ".nnue"))
  10216. (sha256
  10217. (base32
  10218. "11mpdhnsfggldgvmzwmya64pp3fndyppi2fkdf8kfhbi8qsl56xd"))))))
  10219. (arguments
  10220. `(#:tests? #f
  10221. #:make-flags (list "-C" "src"
  10222. "build"
  10223. (string-append "PREFIX="
  10224. (assoc-ref %outputs "out"))
  10225. ,@(if (target-ppc32?)
  10226. `("EXTRALDFLAGS=-latomic")
  10227. `())
  10228. (string-append "ARCH="
  10229. ,(match (%current-system)
  10230. ("x86_64-linux" "x86-64")
  10231. ("i686-linux" "x86-32")
  10232. ("aarch64-linux" "armv8")
  10233. ("armhf-linux" "armv7")
  10234. ("powerpc-linux" "ppc-32")
  10235. ("powerpc64le-linux" "ppc-64")
  10236. ("riscv64-linux" "general-64")
  10237. ("mips64el-linux" "general-64")
  10238. (_ "general-32"))))
  10239. #:phases (modify-phases %standard-phases
  10240. (delete 'configure)
  10241. ;; The official neural network file is needed for building
  10242. ;; and is embedded in the resulting binary.
  10243. (add-after 'unpack 'copy-net
  10244. (lambda* (#:key inputs #:allow-other-keys)
  10245. (copy-file (assoc-ref inputs "neural-network")
  10246. (format #f "src/nn-~a.nnue"
  10247. ,neural-network-revision))))
  10248. (add-after 'unpack 'remove-m-flag-and-net-target
  10249. (lambda _
  10250. (substitute* "src/Makefile"
  10251. ;; Guix doesn't use a multiarch gcc.
  10252. (("-m\\$\\(bits\\)") "")
  10253. ;; Dont depend on net target.
  10254. ((": net") ": ")))))))
  10255. (synopsis "Strong chess engine")
  10256. (description
  10257. "Stockfish is a very strong chess engine. It is much stronger than the
  10258. best human chess grandmasters. It can be used with UCI-compatible GUIs like
  10259. ChessX.")
  10260. (home-page "https://stockfishchess.org/")
  10261. (license license:gpl3+))))
  10262. (define-public barrage
  10263. (package
  10264. (name "barrage")
  10265. (version "1.0.6")
  10266. (source
  10267. (origin
  10268. (method url-fetch)
  10269. (uri (string-append "mirror://sourceforge/lgames/barrage/"
  10270. "barrage-" version ".tar.gz"))
  10271. (sha256
  10272. (base32 "1bhx708s7viv01m6bmpjsdgr33wk5kqw4wf7bvgw73a07v6j8ncw"))))
  10273. (build-system gnu-build-system)
  10274. (inputs
  10275. (list hicolor-icon-theme sdl sdl-mixer))
  10276. (arguments
  10277. `(#:configure-flags
  10278. (list
  10279. (string-append "CFLAGS="
  10280. "-I" (assoc-ref %build-inputs "sdl-mixer")
  10281. "/include/SDL"))))
  10282. (home-page "https://lgames.sourceforge.net/Barrage/")
  10283. (synopsis "Violent point-and-click shooting game with nice effects")
  10284. (description
  10285. "Barrage is a rather destructive action game that puts you on a shooting
  10286. range with the objective to hit as many dummy targets as possible within
  10287. 3 minutes. You control a gun that may either fire small or large grenades at
  10288. soldiers, jeeps and tanks. The gameplay is simple but it is not that easy to
  10289. get high scores.")
  10290. (license license:gpl2+)))
  10291. (define-public burgerspace
  10292. (package
  10293. (name "burgerspace")
  10294. (version "1.9.5")
  10295. (source
  10296. (origin
  10297. (method url-fetch)
  10298. (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/"
  10299. "burgerspace-" version ".tar.gz"))
  10300. (sha256
  10301. (base32 "1r2albqv2ygs58rwcldsx1mp2vy96j7k4yw5jjmvwgnxjmddq7wr"))))
  10302. (build-system gnu-build-system)
  10303. (native-inputs
  10304. (list pkg-config))
  10305. (inputs
  10306. (list flatzebra))
  10307. (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html")
  10308. (synopsis "Avoid evil foodstuffs and make burgers")
  10309. (description
  10310. "This is a clone of the classic game BurgerTime. In it, you play
  10311. the part of a chef who must create burgers by stepping repeatedly on
  10312. the ingredients until they fall into place. And to make things more
  10313. complicated, you also must avoid evil animate food items while
  10314. performing this task, with nothing but your trusty pepper shaker to
  10315. protect you.")
  10316. (license license:gpl2+)))
  10317. (define-public 7kaa
  10318. (package
  10319. (name "7kaa")
  10320. (version "2.15.5")
  10321. (source
  10322. (origin
  10323. (method url-fetch)
  10324. (uri (string-append "https://github.com/the3dfxdude/7kaa/"
  10325. "releases/download/v" version "/"
  10326. "7kaa-" version ".tar.xz"))
  10327. (sha256
  10328. (base32 "0axbv14fh87hwjabrb3zv7ivj88rs6kd2xq6s9qlpsszk20jc2im"))))
  10329. (build-system gnu-build-system)
  10330. (native-inputs
  10331. (list gettext-minimal pkg-config))
  10332. (inputs
  10333. (list curl enet openal sdl2))
  10334. (home-page "https://7kfans.com/")
  10335. (synopsis "Seven Kingdoms Ancient Adversaries: real-time strategy game")
  10336. (description
  10337. "Seven Kingdoms, designed by Trevor Chan, brings a blend of Real-Time
  10338. Strategy with the addition of trade, diplomacy, and espionage. The game
  10339. enables players to compete against up to six other kingdoms allowing players
  10340. to conquer opponents by defeating them in war (with troops or machines),
  10341. capturing their buildings with spies, or offering opponents money for their
  10342. kingdom.")
  10343. (license license:gpl2+)))
  10344. (define-public neverball
  10345. ;; Git version is 6-years younger than latest release.
  10346. (let ((commit "760a25d32a5fb0661b99426d4ddcb9ac9f3d1644")
  10347. (revision "1"))
  10348. (package
  10349. (name "neverball")
  10350. (version (git-version "1.6.0" revision commit))
  10351. (source
  10352. (origin
  10353. (method git-fetch)
  10354. (uri (git-reference
  10355. (url "https://github.com/Neverball/neverball")
  10356. (commit commit)))
  10357. (sha256
  10358. (base32
  10359. "0bwh67df3lyf33bv710y25l3frjdd34j9b7gsjadwxviz6r1vpj5"))
  10360. (file-name (git-file-name name version))
  10361. (modules '((guix build utils)))
  10362. (snippet
  10363. '(begin
  10364. ;; Octocat seems to be non-free. Oddly, Debian doesn't strip it.
  10365. (delete-file-recursively "data/ball/octocat")
  10366. #t))))
  10367. (build-system copy-build-system)
  10368. (arguments
  10369. `(#:install-plan
  10370. '(("neverball" "bin/")
  10371. ("neverputt" "bin/")
  10372. ("mapc" "bin/")
  10373. ("data" "share/games/neverball/")
  10374. ("locale" "share/")
  10375. ("dist/" "share/games/neverball" #:include ("neverball_replay.png"
  10376. "neverlogos.svg"
  10377. "svg readme.txt"))
  10378. ("dist/" "share/applications" #:include ("neverball.desktop"
  10379. "neverputt.desktop"))
  10380. ("dist/neverball_16.png"
  10381. "/share/icons/hicolor/16x16/apps/neverball.png")
  10382. ("dist/neverball_24.png"
  10383. "/share/icons/hicolor/24x24/apps/neverball.png")
  10384. ("dist/neverball_32.png"
  10385. "/share/icons/hicolor/32x32/apps/neverball.png")
  10386. ("dist/neverball_48.png"
  10387. "/share/icons/hicolor/48x48/apps/neverball.png")
  10388. ("dist/neverball_64.png"
  10389. "/share/icons/hicolor/64x64/apps/neverball.png")
  10390. ("dist/neverball_128.png"
  10391. "/share/icons/hicolor/128x128/apps/neverball.png")
  10392. ("dist/neverball_256.png"
  10393. "/share/icons/hicolor/256x256/apps/neverball.png")
  10394. ("dist/neverball_512.png"
  10395. "/share/icons/hicolor/512x512/apps/neverball.png")
  10396. ("dist/neverputt_16.png"
  10397. "/share/icons/hicolor/16x16/apps/neverputt.png")
  10398. ("dist/neverputt_24.png"
  10399. "/share/icons/hicolor/24x24/apps/neverputt.png")
  10400. ("dist/neverputt_32.png"
  10401. "/share/icons/hicolor/32x32/apps/neverputt.png")
  10402. ("dist/neverputt_48.png"
  10403. "/share/icons/hicolor/48x48/apps/neverputt.png")
  10404. ("dist/neverputt_64.png"
  10405. "/share/icons/hicolor/64x64/apps/neverputt.png")
  10406. ("dist/neverputt_128.png"
  10407. "/share/icons/hicolor/128x128/apps/neverputt.png")
  10408. ("dist/neverputt_256.png"
  10409. "/share/icons/hicolor/256x256/apps/neverputt.png")
  10410. ("dist/neverputt_512.png"
  10411. "/share/icons/hicolor/512x512/apps/neverputt.png")
  10412. ("dist/" "share/man/man1" #:include ("mapc.1"))
  10413. ("dist/" "share/man/man6" #:include ("neverball.6" "neverputt.6"))
  10414. ("doc/" "share/doc/neverball")
  10415. ("README.md" "share/doc/neverball/"))
  10416. #:phases
  10417. (modify-phases %standard-phases
  10418. (add-before 'install 'build
  10419. (lambda* (#:key inputs outputs #:allow-other-keys)
  10420. (let* ((out (assoc-ref outputs "out"))
  10421. (sdl (assoc-ref inputs "sdl")))
  10422. (invoke "make" "-j" (number->string (parallel-job-count))
  10423. "--environment-overrides"
  10424. "CC=gcc" "BUILD=release"
  10425. (string-append "DATADIR="
  10426. out
  10427. "/share/games/neverball/data")
  10428. (string-append "LOCALEDIR=" out "/share/locale")
  10429. (string-append "SDL_CPPFLAGS=-I"
  10430. sdl
  10431. "/include/SDL2/")))
  10432. #t))
  10433. (add-after 'install 'fix-some-broken-fonts
  10434. (lambda* (#:key outputs #:allow-other-keys)
  10435. (let* ((out (assoc-ref outputs "out")))
  10436. (wrap-program (string-append out "/bin/neverball")
  10437. `("LANG" = ("en_US.utf8")))
  10438. (wrap-program (string-append out "/bin/neverputt")
  10439. `("LANG" = ("en_US.utf8"))))
  10440. #t)))))
  10441. (native-inputs
  10442. `(("gettext" ,gettext-minimal))) ;for msgfmt
  10443. (inputs
  10444. `(("libjpeg" ,libjpeg-turbo)
  10445. ("libpng" ,libpng)
  10446. ("libvorbis" ,libvorbis)
  10447. ("physfs" ,physfs)
  10448. ("sdl" ,(sdl-union (list sdl2 sdl2-ttf)))))
  10449. (home-page "https://neverball.org/")
  10450. (synopsis "3D floor-tilting game")
  10451. (description
  10452. "In the grand tradition of Marble Madness and Super Monkey Ball,
  10453. Neverball has you guide a rolling ball through dangerous territory. Balance
  10454. on narrow bridges, navigate mazes, ride moving platforms, and dodge pushers
  10455. and shovers to get to the goal. Race against the clock to collect coins to
  10456. earn extra balls. Also included is Neverputt, which is a 3D miniature golf
  10457. game.") ;thanks to Debian for description
  10458. (license license:gpl2+))))
  10459. (define-public pokerth
  10460. (package
  10461. (name "pokerth")
  10462. (version "1.1.2")
  10463. (source
  10464. (origin
  10465. (method url-fetch)
  10466. (uri (string-append "mirror://sourceforge/pokerth/pokerth/"
  10467. version "/pokerth-" version ".tar.gz"))
  10468. (sha256
  10469. (base32 "0yi9bj3k8yc1gkwmaf14zbbvvn13n54n1dli8k6j1pkph3p3vjq2"))
  10470. (modules '((guix build utils)))
  10471. (snippet
  10472. '(begin
  10473. ;; Remove bundled websocketpp.
  10474. (delete-file-recursively "src/third_party/websocketpp")
  10475. (substitute* "pokerth_lib.pro"
  10476. (("src/third_party/websocketpp")
  10477. ""))))
  10478. (patches (search-patches "pokerth-boost.patch"))))
  10479. (build-system qt-build-system)
  10480. (inputs
  10481. (list boost
  10482. curl
  10483. gsasl
  10484. libgcrypt
  10485. libircclient
  10486. protobuf-2 ;remove package when no longer needed
  10487. qtbase-5
  10488. (sdl-union (list sdl sdl-mixer))
  10489. sqlite
  10490. tinyxml
  10491. websocketpp
  10492. zlib))
  10493. (arguments
  10494. (list
  10495. #:tests? #f ; No test suite
  10496. #:phases
  10497. #~(modify-phases %standard-phases
  10498. (add-after 'unpack 'fix-paths
  10499. (lambda* (#:key inputs #:allow-other-keys)
  10500. (substitute* (find-files "." "\\.pro$")
  10501. (("LIB_DIRS =")
  10502. (string-append "LIB_DIRS = "
  10503. #$(this-package-input "boost") "/lib")))))
  10504. (add-after 'unpack 'fix-build
  10505. (lambda _
  10506. ;; Fixes for Boost versions >= 1.66.
  10507. (substitute* '("src/net/common/clientthread.cpp"
  10508. "src/net/serveraccepthelper.h")
  10509. (("boost::asio::socket_base::non_blocking_io command\\(true\\);")
  10510. "")
  10511. (("newSock->io_control\\(command\\);")
  10512. "newSock->non_blocking(true);")
  10513. (("acceptedSocket->io_control\\(command\\);")
  10514. "acceptedSocket->non_blocking(true);"))))
  10515. (replace 'configure
  10516. (lambda _
  10517. (invoke "qmake" "pokerth.pro" "CONFIG+=client"
  10518. (string-append "PREFIX=" #$output)))))))
  10519. (home-page "https://www.pokerth.net")
  10520. (synopsis "Texas holdem poker game")
  10521. (description
  10522. "With PokerTH you can play the Texas holdem poker game, either against
  10523. computer opponents or against real players online.")
  10524. (license license:agpl3+)))
  10525. (define-public xblackjack
  10526. (package
  10527. (name "xblackjack")
  10528. (version "2.2")
  10529. (source
  10530. (origin
  10531. (method url-fetch)
  10532. (uri (string-append "https://www.ibiblio.org/pub/X11/contrib/games/"
  10533. "xblackjack-" version ".tar.gz"))
  10534. (sha256
  10535. (base32 "05h93rya7zwnx2l58f0a7wkjadymkj4y77clcr2hryhrhhy1vwjx"))))
  10536. (build-system gnu-build-system)
  10537. (arguments
  10538. `(#:phases
  10539. (modify-phases %standard-phases
  10540. (replace 'configure
  10541. (lambda* (#:key inputs outputs #:allow-other-keys)
  10542. (let ((imake (assoc-ref inputs "imake"))
  10543. (out (assoc-ref outputs "out")))
  10544. (substitute* "Imakefile"
  10545. (("EXTRA_LIBRARIES = -lXm \\$\\(DEPLIBS\\) -lbsd")
  10546. "EXTRA_LIBRARIES = -lXm -lXt -lXmu -lXext -lX11")
  10547. (("^#define NonStandardInstallTargets NO")
  10548. "#define NonStandardInstallTargets YES")
  10549. (("BINDIR = /usr/local/bin")
  10550. (string-append "BINDIR = " out "/bin"))
  10551. (("MANDIR = /usr/local/man/cat1")
  10552. (string-append "MANDIR = " out "/share/man/man1"))
  10553. (("XAPPLOADDIR = /usr/local/lib/app-defaults")
  10554. (string-append "XAPPLOADDIR = " out "/lib/X11/app-defaults")))
  10555. (invoke "xmkmf") ; Generate Makefile.
  10556. (substitute* "Makefile"
  10557. ((imake) out)
  10558. (("ETCX11DIR = /etc/X11")
  10559. (string-append "ETCX11DIR = " out "/etc/X11"))
  10560. ;; Fix incorrect argument given to gcc. Error message:
  10561. ;; "gcc: error: DefaultGcc2AMD64Opt: No such file or directory"
  10562. (("CDEBUGFLAGS = [^\n]*") ""))
  10563. ;; Fix header paths.
  10564. (substitute* '("Draw.c"
  10565. "Strategy.c")
  10566. (("^#include <X11/Xm/Xm.h>")
  10567. "#include <Xm/Xm.h>"))
  10568. (substitute* "Strategy.c"
  10569. (("^#include <X11/Xm/Label.h>")
  10570. "#include <Xm/Label.h>"))
  10571. ;; Fix compilation errors.
  10572. (substitute* "Table.c"
  10573. (("/\\* focus_moved_proc \\*/\tXtInheritFocusMovedProc,") "")
  10574. (("_XmMoveObject\\(\\(RectObj\\) w, rx, ry\\);")
  10575. "_XmMoveObject(w, rx, ry);")
  10576. (("_XmResizeObject\\(\\(RectObj\\) managed->locs[i].w, nw, nh,")
  10577. "_XmResizeObject(managed->locs[i].w, nw, nh,")))))
  10578. (add-after 'install 'install-man-pages
  10579. (lambda _
  10580. (invoke "make" "install.man"))))
  10581. #:tests? #f)) ; No check target.
  10582. (inputs
  10583. (list lesstif libx11 libxext libxmu libxt))
  10584. (native-inputs
  10585. (list imake))
  10586. (home-page "https://www.ibiblio.org/pub/X11/contrib/games/")
  10587. (synopsis "X11/Motif blackjack game")
  10588. (description
  10589. "Xblackjack is a MOTIF/OLIT based tool constructed to get you ready for
  10590. the casino. It was inspired by a book called \"Beat the Dealer\" by Edward
  10591. O. Thorp, Ph.D. of UCLA. A number of important statistics are maintained
  10592. for display, and used by the program to implement Thorp's \"Complete Point
  10593. System\" (high-low system).")
  10594. (license (license:x11-style "" "See file headers."))))
  10595. (define-public azimuth
  10596. (package
  10597. (name "azimuth")
  10598. ;; Not marked as latest release, but it fixes a compiling issue
  10599. ;; and adds the install target.
  10600. (version "1.0.3")
  10601. (source
  10602. (origin
  10603. (method git-fetch)
  10604. (uri (git-reference
  10605. (url "https://github.com/mdsteele/azimuth")
  10606. (commit (string-append "v" version))))
  10607. (file-name (git-file-name name version))
  10608. (sha256
  10609. (base32
  10610. "1znfvpmqiixd977jv748glk5zc4cmhw5813zp81waj07r9b0828r"))))
  10611. (build-system gnu-build-system)
  10612. (arguments
  10613. `(#:test-target "test"
  10614. #:phases
  10615. (modify-phases %standard-phases
  10616. (delete 'configure) ; no configure script
  10617. ;; Build release version instead of debug version.
  10618. (add-after 'unpack 'set-release
  10619. (lambda _
  10620. (setenv "BUILDTYPE" "release") #t))
  10621. (add-after 'unpack 'fix-install ; set install directory
  10622. (lambda* (#:key outputs #:allow-other-keys)
  10623. (substitute* "Makefile" (("/usr") (assoc-ref outputs "out"))) #t)))))
  10624. (inputs (list sdl))
  10625. (home-page "https://mdsteele.games/azimuth/")
  10626. (synopsis "Metroidvania game with vector graphics")
  10627. (description
  10628. "Pilot your ship inside a planet to find and rescue the colonists trapped
  10629. inside the Zenith Colony.")
  10630. (license license:gpl3+)))
  10631. (define-public cgoban
  10632. (package
  10633. (name "cgoban")
  10634. (version "1.9.14")
  10635. (source
  10636. (origin
  10637. (method url-fetch)
  10638. (uri (string-append "mirror://sourceforge/cgoban1/cgoban1/"
  10639. version "/cgoban-" version ".tar.gz"))
  10640. (sha256
  10641. (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))))
  10642. (build-system gnu-build-system)
  10643. (inputs
  10644. (list libx11 libxt xorgproto))
  10645. (home-page "https://cgoban1.sourceforge.net/")
  10646. (synopsis "Go client for X11")
  10647. (description "Provides a large set of Go-related services for X11:
  10648. @itemize
  10649. @item Local games with precise implementation of the Chinese and Japanese rulesets
  10650. @item Edition and visualization of SGF files
  10651. @item Connection to the NNGS or IGS Go servers
  10652. @item Bridge to Go modem protocol, allowing to play against Go modem-capable AIs
  10653. such as GnuGo.
  10654. @end itemize")
  10655. (license license:gpl2+)))
  10656. (define-public passage
  10657. (package
  10658. (name "passage")
  10659. (version "4")
  10660. (source
  10661. (origin
  10662. (method url-fetch)
  10663. (uri (string-append "mirror://sourceforge/hcsoftware/Passage/v"
  10664. version "/Passage_v" version "_UnixSource.tar.gz"))
  10665. (sha256
  10666. (base32 "02ky4a4xdjvr71r58339jjrjyz76b5skcnbq4f8707mrln9vhby3"))))
  10667. (build-system gnu-build-system)
  10668. (arguments
  10669. `(#:tests? #false ; there are none
  10670. #:phases
  10671. (modify-phases %standard-phases
  10672. (add-after 'unpack 'chdir
  10673. (lambda _
  10674. (chdir "gamma256/gameSource")
  10675. (system "cat Makefile.GnuLinux Makefile.all > Makefile")))
  10676. (replace 'configure
  10677. (lambda* (#:key outputs inputs #:allow-other-keys)
  10678. (setenv "CPATH"
  10679. (string-append
  10680. (assoc-ref inputs "sdl") "/include/SDL:"
  10681. (or (getenv "CPATH") "")))
  10682. (let* ((out (assoc-ref outputs "out"))
  10683. (assets (string-append out "/share/passage")))
  10684. (substitute* "common.cpp"
  10685. (("readTGA\\( \"graphics\"")
  10686. (format #false "readTGA(\"~a/graphics\"" assets)))
  10687. (substitute* "musicPlayer.cpp"
  10688. (("readTGA\\( \"music\"")
  10689. (format #false "readTGA(\"~a/music\"" assets))))))
  10690. (replace 'install
  10691. (lambda* (#:key outputs #:allow-other-keys)
  10692. (let* ((out (assoc-ref outputs "out"))
  10693. (bin (string-append out "/bin"))
  10694. (assets (string-append out "/share/passage/")))
  10695. (install-file "Passage" bin)
  10696. (install-file "../documentation/Readme.txt" assets)
  10697. (copy-recursively "graphics" (string-append assets "graphics"))
  10698. (copy-recursively "music" (string-append assets "music"))
  10699. (copy-recursively "settings" (string-append assets "settings"))))))))
  10700. (inputs
  10701. `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
  10702. (native-inputs
  10703. (list imagemagick))
  10704. (home-page "https://hcsoftware.sourceforge.net/passage/")
  10705. (synopsis "Memento mori game")
  10706. (description
  10707. "Passage is meant to be a memento mori game. It presents an entire life,
  10708. from young adulthood through old age and death, in the span of five minutes.
  10709. Of course, it's a game, not a painting or a film, so the choices that you make
  10710. as the player are crucial. There's no ``right'' way to play Passage, just as
  10711. there's no right way to interpret it.")
  10712. (license license:public-domain)))
  10713. (define-public paperview
  10714. (let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6")
  10715. (revision "1"))
  10716. (package
  10717. (name "paperview")
  10718. (version (git-version "0.0.1" revision commit)) ;no upstream release
  10719. (source (origin
  10720. (method git-fetch)
  10721. (uri (git-reference
  10722. (url "https://github.com/glouw/paperview")
  10723. (commit commit)))
  10724. (file-name (git-file-name name version))
  10725. (sha256
  10726. (base32
  10727. "09sb9sg44fvkgfdyycrm1ndpx7cnkrglxhci41y8f3gpagnvi7jk"))))
  10728. (build-system gnu-build-system)
  10729. (inputs
  10730. (list sdl2))
  10731. (arguments
  10732. '(#:tests? #f ;no tests
  10733. #:make-flags
  10734. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  10735. #:phases
  10736. (modify-phases %standard-phases
  10737. (delete 'configure))))
  10738. (home-page "https://github.com/glouw/paperview/")
  10739. (synopsis "High performance X11 animated wallpaper setter")
  10740. (description "High performance animated desktop background setter for
  10741. X11 that won't set your CPU on fire, drain your laptop battery, or lower video
  10742. game FPS.")
  10743. (license license:unlicense))))
  10744. (define-public curseofwar
  10745. (package
  10746. (name "curseofwar")
  10747. (version "1.3.0")
  10748. (source
  10749. (origin
  10750. (method git-fetch)
  10751. (uri (git-reference
  10752. (url "https://github.com/a-nikolaev/curseofwar")
  10753. (commit (string-append "v" version))))
  10754. (file-name (git-file-name name version))
  10755. (sha256
  10756. (base32 "1wd71wdnj9izg5d95m81yx3684g4zdi7fsy0j5wwnbd9j34ilz1i"))))
  10757. (build-system gnu-build-system)
  10758. (arguments
  10759. `(#:tests? #f ; no tests
  10760. #:make-flags
  10761. (list (string-append "CC=" ,(cc-for-target))
  10762. (string-append "PREFIX=" (assoc-ref %outputs "out")))
  10763. #:phases
  10764. (modify-phases %standard-phases
  10765. (delete 'configure))))
  10766. (inputs (list ncurses))
  10767. (home-page "https://a-nikolaev.github.io/curseofwar/")
  10768. (synopsis "Fast-paced action strategy game")
  10769. (description "Curse of War is a fast-paced action strategy game originally
  10770. implemented using ncurses user interface. An SDL graphical version is also
  10771. available.")
  10772. (license license:gpl3+)))
  10773. (define-public schiffbruch
  10774. ;; There haven't been any releases for several years, so I've taken the most
  10775. ;; recent commit from the master branch that didn't fail to build (the last
  10776. ;; commit gave me a compile error).
  10777. (let ((commit "e41916d15d87749c82c5005cbb42d1bb079b43d9"))
  10778. (package
  10779. (name "schiffbruch")
  10780. (version (git-version "1.2.1" "0" commit))
  10781. (source
  10782. (origin
  10783. (method git-fetch)
  10784. (uri (git-reference
  10785. (url "https://github.com/sandsmark/Schiffbruch")
  10786. (commit commit)))
  10787. (file-name (git-file-name name version))
  10788. (sha256
  10789. (base32 "0lg3rqacrapf6c4sxi12cm9bmg43mlbclway1zxcm848pi1xkzwv"))))
  10790. (build-system cmake-build-system)
  10791. (arguments
  10792. `(#:tests? #f ; no tests
  10793. #:build-type "Release"))
  10794. (inputs
  10795. (list sfml))
  10796. (home-page "https://github.com/sandsmark/Schiffbruch/")
  10797. (synopsis "Pixelart survival game")
  10798. (description
  10799. "Schiffbruch is a mix of building, strategy and adventure and gets played
  10800. with a two-dimensional view. The game deals with the consequences of a ship
  10801. wreckage. You're stranded on a desert island and have to survive. In order to
  10802. do so you need to explore the island, find food, build a shelter and try to
  10803. get attention, so you get found.")
  10804. (license license:cc-by4.0))))
  10805. (define-public sdlpop
  10806. (package
  10807. (name "sdlpop")
  10808. (version "1.22")
  10809. (source (origin
  10810. (method git-fetch)
  10811. (uri (git-reference
  10812. (url "https://github.com/NagyD/SDLPoP")
  10813. (commit (string-append "v" version))))
  10814. (file-name (git-file-name name version))
  10815. (sha256
  10816. (base32
  10817. "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"))))
  10818. (build-system gnu-build-system)
  10819. (arguments
  10820. `(#:tests? #f ; no tests provided
  10821. #:phases
  10822. (modify-phases %standard-phases
  10823. (delete 'configure)
  10824. (add-before 'build 'prepare-build
  10825. ;; Set correct environment for SDL.
  10826. (lambda* (#:key inputs #:allow-other-keys)
  10827. (setenv "CPATH"
  10828. (string-append (assoc-ref inputs "sdl")
  10829. "/include/SDL2:"
  10830. (or (getenv "CPATH") "")))))
  10831. (add-after 'unpack 'chdir
  10832. (lambda _
  10833. (chdir "src")))
  10834. (replace 'install
  10835. (lambda* (#:key outputs #:allow-other-keys)
  10836. (let* ((out (assoc-ref outputs "out"))
  10837. (bin (string-append out "/bin"))
  10838. (opt (string-append out "/opt/sdlpop"))
  10839. (app (string-append out "/usr/share/applications"))
  10840. (template "src/SDLPoP.desktop.template"))
  10841. (chdir "..")
  10842. (install-file "prince" bin)
  10843. (substitute* template (("\\$ROOT") out))
  10844. (substitute* "src/seg009.c"
  10845. (("g_argv[0]") (string-append "\"" out "\"")))
  10846. (install-file template app)
  10847. (rename-file (string-append app "/SDLPoP.desktop.template")
  10848. (string-append app "/SDLPoP.desktop"))
  10849. (install-file "SDLPoP.ini" opt)
  10850. (copy-recursively "data" (string-append bin "/data"))
  10851. (copy-recursively "doc" opt)
  10852. (copy-recursively "mods" opt)))))))
  10853. (native-inputs (list pkg-config))
  10854. (inputs `(("sdl" ,(sdl-union (list sdl2
  10855. sdl2-image
  10856. sdl2-mixer)))))
  10857. (synopsis "Port of Prince of Persia game")
  10858. (description "This package provides port of Prince of Persia, based on the
  10859. disassembly of the DOS version, extended with new features.")
  10860. (home-page "https://github.com/NagyD/SDLPoP")
  10861. (license license:gpl3+)))
  10862. (define-public fheroes2
  10863. (package
  10864. (name "fheroes2")
  10865. (version "1.0.2")
  10866. (source
  10867. (origin
  10868. (method git-fetch)
  10869. (uri (git-reference
  10870. (url "https://github.com/ihhub/fheroes2")
  10871. (commit version)))
  10872. (file-name (git-file-name name version))
  10873. (sha256
  10874. (base32 "18hl84lapmqc810rnh2wkd4p2mnfcl4gbmg5sizakqcfpahgsl33"))))
  10875. (build-system cmake-build-system)
  10876. (arguments
  10877. `(#:tests? #f ; no tests
  10878. #:make-flags '("FHEROES2_STRICT_COMPILATION=1"
  10879. "RELEASE=1")))
  10880. (native-inputs
  10881. (list gettext-minimal))
  10882. (inputs
  10883. (list libpng
  10884. (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
  10885. zlib))
  10886. (home-page "https://ihhub.github.io/fheroes2/")
  10887. (synopsis "Turn-based strategy game engine")
  10888. (description "@code{fheroes2} is an implementation of Heroes of Might and
  10889. Magic II (aka HOMM2) game engine. It requires assets and game resources to
  10890. play; it will look for them at @file{~/.local/share/fheroes2} folder.")
  10891. (license license:gpl2)))
  10892. (define-public apricots
  10893. (package
  10894. (name "apricots")
  10895. (version "0.2.7")
  10896. (source
  10897. (origin
  10898. (method git-fetch)
  10899. (uri (git-reference
  10900. (url "https://github.com/moggers87/apricots")
  10901. (commit (string-append "v" version))))
  10902. (sha256
  10903. (base32 "0vis217hhnb9fbs9sf8mmcm71qp44kr3xqmffc1gdiixvi90c781"))
  10904. (file-name (git-file-name name version))))
  10905. (build-system gnu-build-system)
  10906. (native-inputs (list autoconf ; autom4te used in ./bootstrap
  10907. automake ; aclocal used in ./bootstrap
  10908. cppcheck))
  10909. (inputs (list freealut openal sdl2))
  10910. (home-page "https://github.com/moggers87/apricots")
  10911. (synopsis "Arcade airplane game")
  10912. (description "@code{apricots} is a game where you fly a little plane
  10913. around the screen and shoot things and drop bombs on enemy targets. It's
  10914. meant to be quick and fun.")
  10915. (license license:gpl2+)))
  10916. (define-public liquidwar6
  10917. (package
  10918. (name "liquidwar6")
  10919. (version "0.6.3902")
  10920. (source (origin
  10921. (method url-fetch)
  10922. (uri (string-append "mirror://gnu/liquidwar6/" "liquidwar6-"
  10923. version ".tar.gz"))
  10924. (sha256
  10925. (base32
  10926. "1976nnl83d8wspjhb5d5ivdvdxgb8lp34wp54jal60z4zad581fn"))))
  10927. (native-inputs (list doxygen))
  10928. (inputs (list guile-2.0
  10929. zlib
  10930. expat
  10931. sqlite
  10932. ncurses
  10933. readline
  10934. curl
  10935. python-2
  10936. libxslt
  10937. perl
  10938. graphviz
  10939. glu
  10940. libcaca
  10941. (sdl-union (list sdl sdl-image sdl-ttf sdl-mixer))))
  10942. (build-system gnu-build-system)
  10943. (arguments
  10944. (list #:configure-flags
  10945. #~(list "--enable-allinone" "CFLAGS=-Wno-error -O2 -g"
  10946. (string-append "CPPFLAGS=" "-I"
  10947. #$(this-package-input "sdl-union")
  10948. "/include/SDL"))))
  10949. (synopsis "Liquid War 6 is a unique multiplayer wargame")
  10950. (description
  10951. "Liquid War 6 is a unique multiplayer war game. Your army is a blob of
  10952. liquid and you have to try and eat your opponents. Rules are very simple yet
  10953. original, they have been invented by Thomas Colcombet.")
  10954. (home-page "https://www.gnu.org/software/liquidwar6/")
  10955. (license license:gpl3+)))
  10956. (define-public freerct
  10957. (package
  10958. (name "freerct")
  10959. (version "0.1")
  10960. (source (origin
  10961. (method git-fetch)
  10962. (uri (git-reference
  10963. (url "https://github.com/FreeRCT/FreeRCT")
  10964. (commit version)))
  10965. (file-name (git-file-name name version))
  10966. (sha256
  10967. (base32
  10968. "1szwy2cq4ffp4yxm9pp9vdyia0i5nz0wnppdd1xb9w7v3wa4mywi"))))
  10969. (build-system cmake-build-system)
  10970. (arguments
  10971. `(#:tests? #f))
  10972. (native-inputs (list flex bison))
  10973. (inputs (list libpng sdl2 sdl2-ttf))
  10974. (home-page "https://freerct.net/")
  10975. (synopsis "Theme park management simulation game")
  10976. (description
  10977. "FreeRCT is a game that captures the look and feel of the popular games
  10978. RollerCoaster Tycoon 1 and 2, graphics- and gameplay-wise.
  10979. In this game, you play as a manager of a theme park, allowing you to make a
  10980. park of your dreams. The list of responsibilities includes managing staff,
  10981. finances, landscaping, and most importantly: rides. Good managers follow the
  10982. principle of prioritizing the guests' happiness with a well-maintained park.
  10983. Should they go unwise, a theme park plunge into chaos with vandalizing guests
  10984. and unsafe rides. Which path will you take?")
  10985. (license license:gpl2)))
  10986. (define-public ultrastar-deluxe
  10987. ;; The last release is quite old and does not support recent ffmpeg versions.
  10988. (let ((commit "43484b0a10ce6aae339e19d81ae2f7b37caf6baa")
  10989. (revision "1"))
  10990. (package
  10991. (name "ultrastar-deluxe")
  10992. (version (git-version "2020.4.0" revision commit))
  10993. (source (origin
  10994. (method git-fetch)
  10995. (uri (git-reference
  10996. (url "https://github.com/UltraStar-Deluxe/USDX.git")
  10997. (commit commit)))
  10998. (file-name (git-file-name name version))
  10999. (sha256
  11000. (base32
  11001. "078g1rbm1ympmwq9s64v68sxvcms7rr0qid12d2wgm4r04ana47r"))
  11002. (patches (search-patches "ultrastar-deluxe-no-freesans.patch"))
  11003. (modules '((guix build utils)))
  11004. (snippet
  11005. #~(begin
  11006. ;; Remove Windows binaries.
  11007. (for-each delete-file (find-files "game" "\\.dll$"))
  11008. ;; Remove font blobs.
  11009. (let ((font-directories
  11010. (list "DejaVu" "FreeSans" "NotoSans"
  11011. "wqy-microhei")))
  11012. (for-each
  11013. (lambda (d) (delete-file-recursively
  11014. (string-append "game/fonts/" d)))
  11015. font-directories))))))
  11016. (build-system gnu-build-system)
  11017. (arguments
  11018. (list
  11019. #:tests? #f ; No tests.
  11020. #:phases
  11021. #~(modify-phases %standard-phases
  11022. (add-after 'unpack 'fix-configure
  11023. (lambda* (#:key inputs configure-flags outputs #:allow-other-keys)
  11024. (define (where inputs file)
  11025. (dirname (search-input-file inputs file)))
  11026. ;; The configure script looks for lua$version, but we
  11027. ;; provide lua-$version.
  11028. (substitute* "configure.ac"
  11029. (("lua\\$i") "lua-$i"))
  11030. ;; fpc does not pass -lfoo to the linker, but uses its own
  11031. ;; linker script, which references libs. Pass the libraries
  11032. ;; listed in that linker script, so our custom linker adds
  11033. ;; a correct rpath.
  11034. (substitute* "src/Makefile.in"
  11035. (("linkflags\\s+:= ")
  11036. (string-append
  11037. "linkflags := -lpthread -lsqlite3 -lSDL2"
  11038. " -lSDL2_image -ldl "
  11039. " -lz -lfreetype -lportaudio -lavcodec"
  11040. " -lavformat -lavutil -lswresample"
  11041. " -lswscale -llua -ldl -lX11 -lportmidi"
  11042. " -L" (where inputs "lib/libz.so")
  11043. " -L" (where inputs "lib/libX11.so")
  11044. " -L" (where inputs "lib/libportmidi.so"))))))
  11045. (add-after 'install 'font-paths
  11046. (lambda* (#:key outputs #:allow-other-keys)
  11047. (substitute* (string-append
  11048. (assoc-ref outputs "out")
  11049. "/share/ultrastardx/fonts/fonts.ini")
  11050. (("=NotoSans/") (string-append "=" #$font-google-noto
  11051. "/share/fonts/truetype/"))
  11052. (("=DejaVu/") (string-append "=" #$font-dejavu
  11053. "/share/fonts/truetype/"))))))))
  11054. (inputs (list ffmpeg-5
  11055. font-dejavu
  11056. font-google-noto
  11057. ; Not needed, since we don’t have freesans.
  11058. ;font-wqy-microhei
  11059. freetype
  11060. libx11
  11061. lua
  11062. portaudio
  11063. portmidi
  11064. sdl2
  11065. sdl2-image
  11066. sqlite
  11067. zlib))
  11068. (native-inputs (list pkg-config fpc autoconf automake))
  11069. (synopsis "Karaoke game")
  11070. (description
  11071. "UltraStar Deluxe (USDX) is a karaoke game. It allows up to six players
  11072. to sing along with music using microphones in order to score points, depending
  11073. on the pitch of the voice and the rhythm of singing.")
  11074. (home-page "https://usdx.eu/")
  11075. (license license:gpl2+))))
  11076. (define-public steam-devices-udev-rules
  11077. ;; Last release from 2019-04-10
  11078. (let ((commit "d87ef558408c5e7a1a793d738db4c9dc2cb5f8fa")
  11079. (revision "0"))
  11080. (package
  11081. (name "steam-devices-udev-rules")
  11082. (version (git-version "1.0.0.61" revision commit))
  11083. (source (origin
  11084. (method git-fetch)
  11085. (uri (git-reference
  11086. (url "https://github.com/ValveSoftware/steam-devices")
  11087. (commit commit)))
  11088. (file-name (git-file-name name version))
  11089. (sha256
  11090. (base32
  11091. "1yqigraz9f19018ma5n2pbx7naadh9960lia3z8ayg7vz1fjdl54"))))
  11092. (build-system copy-build-system)
  11093. (arguments
  11094. '(#:install-plan '(("./" "lib/udev/rules.d"
  11095. #:include-regexp ("rules$")))
  11096. #:phases (modify-phases %standard-phases
  11097. (add-after 'unpack 'patch-paths
  11098. (lambda* (#:key inputs #:allow-other-keys)
  11099. (substitute* "60-steam-input.rules"
  11100. (("/bin/sh")
  11101. (search-input-file inputs "/bin/sh"))
  11102. (("udevadm")
  11103. (search-input-file inputs "/bin/udevadm"))))))))
  11104. (inputs (list eudev))
  11105. (home-page "https://github.com/ValveSoftware/steam-devices")
  11106. (synopsis "udev rules for game controllers and virtual reality devices")
  11107. (description
  11108. "This package provides a set of udev rules for game controllers and
  11109. virtual reality devices.")
  11110. (license license:expat))))
  11111. ;;;
  11112. ;;; Avoid adding new packages to the end of this file. To reduce the chances
  11113. ;;; of a merge conflict, place them above by existing packages with similar
  11114. ;;; functionality or similar names.
  11115. ;;;