ocaml.scm 280 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  3. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
  5. ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
  6. ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
  7. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  8. ;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  9. ;;; Copyright © 2016-2020 Julien Lepiller <julien@lepiller.eu>
  10. ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
  11. ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  12. ;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
  13. ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
  14. ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
  15. ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
  16. ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
  17. ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
  18. ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
  19. ;;; Copyright © 2020 divoplade <d@divoplade.fr>
  20. ;;; Copyright © 2020, 2021 pukkamustard <pukkamustard@posteo.net>
  21. ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
  22. ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
  23. ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  24. ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
  25. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  26. ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
  27. ;;;
  28. ;;; This file is part of GNU Guix.
  29. ;;;
  30. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  31. ;;; under the terms of the GNU General Public License as published by
  32. ;;; the Free Software Foundation; either version 3 of the License, or (at
  33. ;;; your option) any later version.
  34. ;;;
  35. ;;; GNU Guix is distributed in the hope that it will be useful, but
  36. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  37. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. ;;; GNU General Public License for more details.
  39. ;;;
  40. ;;; You should have received a copy of the GNU General Public License
  41. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  42. (define-module (gnu packages ocaml)
  43. #:use-module (gnu packages)
  44. #:use-module (gnu packages algebra)
  45. #:use-module (gnu packages autotools)
  46. #:use-module (gnu packages base)
  47. #:use-module (gnu packages bash)
  48. #:use-module (gnu packages bison)
  49. #:use-module (gnu packages boost)
  50. #:use-module (gnu packages compression)
  51. #:use-module (gnu packages curl)
  52. #:use-module (gnu packages emacs)
  53. #:use-module (gnu packages emacs-xyz)
  54. #:use-module (gnu packages flex)
  55. #:use-module (gnu packages gcc)
  56. #:use-module (gnu packages ghostscript)
  57. #:use-module (gnu packages glib)
  58. #:use-module (gnu packages gnome)
  59. #:use-module (gnu packages gtk)
  60. #:use-module (gnu packages guile)
  61. #:use-module (gnu packages libevent)
  62. #:use-module (gnu packages libffi)
  63. #:use-module (gnu packages llvm)
  64. #:use-module (gnu packages m4)
  65. #:use-module (gnu packages maths)
  66. #:use-module (gnu packages multiprecision)
  67. #:use-module (gnu packages ncurses)
  68. #:use-module (gnu packages node)
  69. #:use-module (gnu packages pcre)
  70. #:use-module (gnu packages perl)
  71. #:use-module (gnu packages pkg-config)
  72. #:use-module (gnu packages protobuf)
  73. #:use-module (gnu packages python)
  74. #:use-module (gnu packages python-xyz)
  75. #:use-module (gnu packages rsync)
  76. #:use-module (gnu packages sdl)
  77. #:use-module (gnu packages sqlite)
  78. #:use-module (gnu packages tex)
  79. #:use-module (gnu packages texinfo)
  80. #:use-module (gnu packages time)
  81. #:use-module (gnu packages tls)
  82. #:use-module (gnu packages version-control)
  83. #:use-module (gnu packages virtualization)
  84. #:use-module (gnu packages web)
  85. #:use-module (gnu packages web-browsers)
  86. #:use-module (gnu packages xml)
  87. #:use-module (gnu packages xorg)
  88. #:use-module (guix build-system dune)
  89. #:use-module (guix build-system emacs)
  90. #:use-module (guix build-system gnu)
  91. #:use-module (guix build-system ocaml)
  92. #:use-module (guix download)
  93. #:use-module (guix gexp)
  94. #:use-module (guix git-download)
  95. #:use-module ((guix licenses) #:prefix license:)
  96. #:use-module (guix packages)
  97. #:use-module (guix svn-download)
  98. #:use-module (guix utils)
  99. #:use-module ((srfi srfi-1) #:hide (zip)))
  100. ;; A shortcut for files from ocaml forge. Downloaded files are computed from
  101. ;; their number, not their name.
  102. (define (ocaml-forge-uri name version file-number)
  103. (string-append "https://forge.ocamlcore.org/frs/download.php/"
  104. (number->string file-number) "/" name "-" version
  105. ".tar.gz"))
  106. (define (janestreet-origin name version hash)
  107. (origin (method url-fetch)
  108. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  109. (version-major+minor version) "/files/"
  110. name "-v" (version-major+minor+point version)
  111. ".tar.gz"))
  112. (sha256 (base32 hash))))
  113. (define-public camlboot
  114. (let ((commit "506280c6e0813e0e794988151a8e46be55373ebc")
  115. (revision "0"))
  116. (package
  117. (name "camlboot")
  118. (version (git-version "0.0.0" revision commit))
  119. (source (origin
  120. (method git-fetch)
  121. (uri (git-reference
  122. (url "https://github.com/Ekdohibs/camlboot")
  123. (commit commit)
  124. (recursive? #t)))
  125. (file-name (git-file-name name version))
  126. (sha256
  127. (base32
  128. "0vimxl4karw9ih3npyc5rhxg85cjh6fqjbq3dzj7j2iymlhwfbkv"))
  129. (modules '((guix build utils)))
  130. (snippet
  131. `(begin
  132. ;; Remove bootstrap binaries and pre-generated source files,
  133. ;; to ensure we actually bootstrap properly.
  134. (for-each delete-file (find-files "ocaml-src" "^.depend$"))
  135. (delete-file "ocaml-src/boot/ocamlc")
  136. (delete-file "ocaml-src/boot/ocamllex")
  137. ;; Ensure writable
  138. (for-each
  139. (lambda (file)
  140. (chmod file (logior (stat:mode (stat file)) #o200)))
  141. (find-files "." "."))))))
  142. (build-system gnu-build-system)
  143. (arguments
  144. `(#:make-flags (list "_boot/ocamlc") ; build target
  145. #:tests? #f ; no tests
  146. #:phases
  147. (modify-phases %standard-phases
  148. (delete 'configure)
  149. (add-before 'build 'no-autocompile
  150. (lambda _
  151. ;; prevent a guile warning
  152. (setenv "GUILE_AUTO_COMPILE" "0")))
  153. (replace 'install
  154. (lambda* (#:key outputs #:allow-other-keys)
  155. (let* ((out (assoc-ref outputs "out"))
  156. (bin (string-append out "/bin")))
  157. (mkdir-p bin)
  158. (install-file "_boot/ocamlc" bin)
  159. (rename-file "miniml/interp/lex.byte" "ocamllex")
  160. (install-file "ocamllex" bin)))))))
  161. (native-inputs
  162. `(("guile" ,guile-3.0)))
  163. (properties
  164. `((max-silent-time . 14400))) ; 4 hours, expected even on x86_64
  165. (home-page "https://github.com/Ekdohibs/camlboot")
  166. (synopsis "OCaml source bootstrap")
  167. (description "OCaml is written in OCaml. Its sources contain a pre-compiled
  168. bytecode version of @command{ocamlc} and @command{ocamllex} that are used to
  169. build the next version of the compiler. Camlboot implements a bootstrap for
  170. the OCaml compiler and provides a bootstrapped equivalent to these files.
  171. It contains a compiler for a small subset of OCaml written in Guile Scheme,
  172. an interpreter for OCaml written in that subset and a manually-written lexer
  173. for OCaml. These elements eliminate the need for the binary bootstrap in
  174. OCaml and can effectively bootstrap OCaml 4.07.
  175. This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
  176. (license license:expat))))
  177. (define-public ocaml-4.11
  178. (package
  179. (name "ocaml")
  180. (version "4.11.1")
  181. (source (origin
  182. (method url-fetch)
  183. (uri (string-append
  184. "http://caml.inria.fr/pub/distrib/ocaml-"
  185. (version-major+minor version)
  186. "/ocaml-" version ".tar.xz"))
  187. (sha256
  188. (base32
  189. "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa"))))
  190. (build-system gnu-build-system)
  191. (native-search-paths
  192. (list (search-path-specification
  193. (variable "OCAMLPATH")
  194. (files (list "lib/ocaml" "lib/ocaml/site-lib")))
  195. (search-path-specification
  196. (variable "CAML_LD_LIBRARY_PATH")
  197. (files (list "lib/ocaml/site-lib/stubslibs"
  198. "lib/ocaml/site-lib/stublibs")))))
  199. (native-inputs
  200. `(("perl" ,perl)
  201. ("pkg-config" ,pkg-config)))
  202. (inputs
  203. `(("libx11" ,libx11)
  204. ("libiberty" ,libiberty) ;needed for objdump support
  205. ("zlib" ,zlib))) ;also needed for objdump support
  206. (arguments
  207. `(#:phases
  208. (modify-phases %standard-phases
  209. (add-after 'unpack 'patch-/bin/sh-references
  210. (lambda* (#:key inputs #:allow-other-keys)
  211. (let* ((sh (search-input-file inputs "/bin/sh"))
  212. (quoted-sh (string-append "\"" sh "\"")))
  213. (with-fluids ((%default-port-encoding #f))
  214. (for-each
  215. (lambda (file)
  216. (substitute* file
  217. (("\"/bin/sh\"")
  218. (begin
  219. (format (current-error-port) "\
  220. patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
  221. file quoted-sh)
  222. quoted-sh))))
  223. (find-files "." "\\.ml$"))
  224. #t))))
  225. (replace 'build
  226. (lambda _
  227. (invoke "make" "-j" (number->string (parallel-job-count))
  228. "world.opt")))
  229. (replace 'check
  230. (lambda _
  231. (with-directory-excursion "testsuite"
  232. (invoke "make" "all")))))))
  233. (home-page "https://ocaml.org/")
  234. (synopsis "The OCaml programming language")
  235. (description
  236. "OCaml is a general purpose industrial-strength programming language with
  237. an emphasis on expressiveness and safety. Developed for more than 20 years at
  238. Inria it benefits from one of the most advanced type systems and supports
  239. functional, imperative and object-oriented styles of programming.")
  240. ;; The compiler is distributed under qpl1.0 with a change to choice of
  241. ;; law: the license is governed by the laws of France. The library is
  242. ;; distributed under lgpl2.0.
  243. (license (list license:qpl license:lgpl2.0))))
  244. (define-public ocaml-4.09
  245. (package
  246. (inherit ocaml-4.11)
  247. (version "4.09.0")
  248. (source (origin
  249. (method url-fetch)
  250. (uri (string-append
  251. "http://caml.inria.fr/pub/distrib/ocaml-"
  252. (version-major+minor version)
  253. "/ocaml-" version ".tar.xz"))
  254. (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
  255. (sha256
  256. (base32
  257. "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
  258. ;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
  259. ;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
  260. ;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
  261. ;; that we otherwise remove for bootstrap purposes.
  262. (define ocaml-4.07-boot
  263. (package
  264. (inherit ocaml-4.09)
  265. (name "ocaml-boot")
  266. (version "4.07.1")
  267. (source (origin
  268. (method url-fetch)
  269. (uri (string-append
  270. "http://caml.inria.fr/pub/distrib/ocaml-"
  271. (version-major+minor version)
  272. "/ocaml-" version ".tar.xz"))
  273. (sha256
  274. (base32
  275. "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
  276. (patches (search-patches "ocaml-multiple-definitions.patch"))
  277. (modules '((guix build utils)))
  278. (snippet
  279. `(begin
  280. ;; Remove bootstrap binaries and pre-generated source files,
  281. ;; to ensure we actually bootstrap properly.
  282. (for-each delete-file (find-files "." "^.depend$"))
  283. (delete-file "boot/ocamlc")
  284. (delete-file "boot/ocamllex")))))
  285. (arguments
  286. `(#:tests? #f
  287. #:phases
  288. (modify-phases %standard-phases
  289. (add-before 'configure 'copy-bootstrap
  290. (lambda* (#:key inputs #:allow-other-keys)
  291. (let ((camlboot (assoc-ref inputs "camlboot")))
  292. (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex")
  293. (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc")
  294. (chmod "boot/ocamllex" #o755)
  295. (chmod "boot/ocamlc" #o755))))
  296. (replace 'configure
  297. (lambda* (#:key outputs #:allow-other-keys)
  298. (let* ((out (assoc-ref outputs "out"))
  299. (mandir (string-append out "/share/man")))
  300. (invoke "./configure"
  301. "--prefix" out
  302. "--mandir" mandir))))
  303. (replace 'build
  304. (lambda* (#:key parallel-build? #:allow-other-keys)
  305. (define* (make . args)
  306. (apply invoke "make"
  307. (append (if parallel-build?
  308. `("-j" ,(number->string (parallel-job-count)))
  309. '())
  310. args)))
  311. ;; create empty .depend files because they are included by various
  312. ;; Makefiles, and they have no rule to generate them.
  313. (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend"
  314. "tools/.depend" "lex/.depend" "asmrun/.depend"
  315. "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend"
  316. "ocamldoc/stdlib_non_prefixed/.depend"
  317. "otherlibs/bigarray/.depend" "otherlibs/graph/.depend"
  318. "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend"
  319. "otherlibs/systhreads/.depend" "otherlibs/threads/.depend"
  320. "otherlibs/unix/.depend" "otherlibs/win32unix/.depend")
  321. ;; We cannot build ocamldep until we have created all the .depend
  322. ;; files, so replace it with ocamlc -depend.
  323. (substitute* "tools/Makefile"
  324. (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend"))
  325. (substitute* '("otherlibs/graph/Makefile"
  326. "otherlibs/systhreads/Makefile"
  327. "otherlibs/threads/Makefile"
  328. "otherlibs/unix/Makefile")
  329. (("\\$\\(CAMLRUN\\) ../../tools/ocamldep")
  330. "../../boot/ocamlc -depend"))
  331. (substitute* '("otherlibs/bigarray/Makefile"
  332. "otherlibs/raw_spacetime_lib/Makefile"
  333. "otherlibs/str/Makefile"
  334. "otherlibs/win32unix/Makefile")
  335. (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep")
  336. "../../boot/ocamlc -depend"))
  337. ;; Ensure we copy needed file, so we can generate a proper .depend
  338. (substitute* "ocamldoc/Makefile"
  339. (("include Makefile.unprefix")
  340. "include Makefile.unprefix
  341. depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
  342. ;; Generate required tools for `alldepend'
  343. (make "-C" "byterun" "depend")
  344. (make "-C" "byterun" "all")
  345. (copy-file "byterun/ocamlrun" "boot/ocamlrun")
  346. (make "ocamlyacc")
  347. (copy-file "yacc/ocamlyacc" "boot/ocamlyacc")
  348. (make "-C" "stdlib" "sys.ml")
  349. (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend")
  350. ;; Build and copy files later used by `tools'
  351. (make "-C" "stdlib" "COMPILER="
  352. "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives"
  353. "all")
  354. (for-each
  355. (lambda (file)
  356. (copy-file file (string-append "boot/" (basename file))))
  357. (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader"
  358. (find-files "stdlib" ".*.cmi$")))
  359. (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
  360. ;; required for ocamldoc/stdlib_non_prefixed
  361. (make "parsing/parser.mli")
  362. ;; required for dependencies
  363. (make "-C" "tools"
  364. "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .."
  365. "make_opcodes" "cvt_emit")
  366. ;; generate all remaining .depend files
  367. (make "alldepend"
  368. (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
  369. (getcwd) "/boot/ocamllex")
  370. (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
  371. (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend")
  372. (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend"))
  373. ;; Build ocamllex
  374. (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives"
  375. "ocamlc")
  376. ;; Build ocamlc
  377. (make "-C" "lex"
  378. "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives"
  379. "all")))
  380. (replace 'install
  381. (lambda* (#:key outputs #:allow-other-keys)
  382. (let* ((out (assoc-ref outputs "out"))
  383. (bin (string-append out "/bin"))
  384. (depends (string-append out "/share/depends")))
  385. (mkdir-p bin)
  386. (mkdir-p depends)
  387. (install-file "ocamlc" bin)
  388. (install-file "lex/ocamllex" bin)
  389. (for-each
  390. (lambda (file)
  391. (let ((dir (string-append depends "/" (dirname file))))
  392. (mkdir-p dir)
  393. (install-file file dir)))
  394. (find-files "." "^\\.depend$"))))))))
  395. (native-inputs
  396. `(("camlboot" ,camlboot)
  397. ("perl" ,perl)
  398. ("pkg-config" ,pkg-config)))))
  399. (define-public ocaml-4.07
  400. (package
  401. (inherit ocaml-4.07-boot)
  402. (name "ocaml")
  403. (arguments
  404. (substitute-keyword-arguments (package-arguments ocaml-4.09)
  405. ((#:phases phases)
  406. `(modify-phases ,phases
  407. (add-before 'configure 'copy-bootstrap
  408. (lambda* (#:key inputs #:allow-other-keys)
  409. (let ((ocaml (assoc-ref inputs "ocaml")))
  410. (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex")
  411. (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc")
  412. (chmod "boot/ocamllex" #o755)
  413. (chmod "boot/ocamlc" #o755)
  414. (let ((rootdir (getcwd)))
  415. (with-directory-excursion (string-append ocaml "/share/depends")
  416. (for-each
  417. (lambda (file)
  418. (copy-file file (string-append rootdir "/" file)))
  419. (find-files "." ".")))))))
  420. (replace 'configure
  421. (lambda* (#:key outputs #:allow-other-keys)
  422. (let* ((out (assoc-ref outputs "out"))
  423. (mandir (string-append out "/share/man")))
  424. ;; Custom configure script doesn't recognize
  425. ;; --prefix=<PREFIX> syntax (with equals sign).
  426. (invoke "./configure"
  427. "--prefix" out
  428. "--mandir" mandir))))))))
  429. (native-inputs
  430. `(("ocaml" ,ocaml-4.07-boot)
  431. ("perl" ,perl)
  432. ("pkg-config" ,pkg-config)))))
  433. (define-public ocaml ocaml-4.11)
  434. (define-public ocamlbuild
  435. (package
  436. (name "ocamlbuild")
  437. (version "0.14.0")
  438. (source
  439. (origin
  440. (method git-fetch)
  441. (uri (git-reference
  442. (url "https://github.com/ocaml/ocamlbuild")
  443. (commit version)))
  444. (file-name (git-file-name name version))
  445. (sha256
  446. (base32 "1hb5mcdz4wv7sh1pj7dq9q4fgz5h3zg7frpiya6s8zd3ypwzq0kh"))))
  447. (build-system ocaml-build-system)
  448. (arguments
  449. `(#:make-flags
  450. ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
  451. (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
  452. (string-append "OCAMLBUILD_LIBDIR=" #$output
  453. "/lib/ocaml/site-lib")
  454. (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
  455. #:phases
  456. (modify-phases %standard-phases
  457. (delete 'configure))
  458. ; some failures because of changes in OCaml's error message formating
  459. #:tests? #f))
  460. (home-page "https://github.com/ocaml/ocamlbuild")
  461. (synopsis "OCaml build tool")
  462. (description "OCamlbuild is a generic build tool, that has built-in rules
  463. for building OCaml library and programs.")
  464. (license license:lgpl2.1+)))
  465. (define-public camlidl
  466. (package
  467. (name "camlidl")
  468. (version "1.09")
  469. (source
  470. (origin
  471. (method git-fetch)
  472. (uri (git-reference
  473. (url "https://github.com/xavierleroy/camlidl")
  474. (commit "camlidl109")))
  475. (sha256
  476. (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
  477. (file-name (git-file-name name version))))
  478. (build-system gnu-build-system)
  479. (arguments
  480. `(#:tests? #f ;; No test suite
  481. #:make-flags
  482. (list
  483. (string-append
  484. "BINDIR=" (assoc-ref %outputs "out") "/bin")
  485. (string-append
  486. "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
  487. #:phases
  488. (modify-phases %standard-phases
  489. (delete 'configure)
  490. (replace 'build
  491. (lambda _
  492. (copy-file "config/Makefile.unix" "config/Makefile")
  493. ;; Note: do not pass '-jN' as this appears to not be
  494. ;; parallel-safe (race condition related to libcamlidl.a).
  495. (invoke "make" "all")
  496. #t))
  497. (add-before 'install 'create-target-directories
  498. (lambda* (#:key outputs #:allow-other-keys)
  499. (let ((out (string-append (assoc-ref outputs "out"))))
  500. (mkdir-p
  501. (string-append out "/bin"))
  502. (mkdir-p
  503. (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
  504. (mkdir-p
  505. (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
  506. #t))
  507. (add-after 'install 'install-meta
  508. (lambda* (#:key outputs #:allow-other-keys)
  509. (let ((out (assoc-ref outputs "out")))
  510. (with-output-to-file
  511. (string-append out "/lib/ocaml/site-lib/camlidl/META")
  512. (lambda _
  513. (display
  514. (string-append
  515. "description = \"Stub code generator for OCaml/C interface\"
  516. version = \"" ,version "\"
  517. directory = \"^\"
  518. archive(byte) = \"com.cma\"
  519. archive(native) = \"com.cmxa\"")))))
  520. #t)))))
  521. (native-inputs
  522. `(("ocaml" ,ocaml)))
  523. (home-page "https://github.com/xavierleroy/camlidl")
  524. (synopsis "Stub code generator for OCaml/C interface")
  525. (description
  526. "Camlidl is a stub code generator for Objective Caml. It generates stub
  527. code for interfacing Caml with C from an IDL description of the C functions.")
  528. (license license:lgpl2.1)))
  529. (define-public ocaml-extlib
  530. (package
  531. (name "ocaml-extlib")
  532. (version "1.7.8")
  533. (source (origin
  534. (method url-fetch)
  535. (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
  536. "extlib-" version ".tar.gz"))
  537. (sha256
  538. (base32
  539. "0npq4hq3zym8nmlyji7l5cqk6drx2rkcx73d60rxqh5g8dla8p4k"))))
  540. (build-system ocaml-build-system)
  541. (arguments
  542. `(#:phases
  543. (modify-phases %standard-phases
  544. (delete 'configure))))
  545. (native-inputs
  546. `(("ocaml-cppo" ,ocaml-cppo)))
  547. (home-page "https://github.com/ygrek/ocaml-extlib")
  548. (synopsis "Complete and small extension for OCaml standard library")
  549. (description "This library adds new functions to OCaml standard library
  550. modules, modifies some functions in order to get better performances or
  551. safety (tail-recursive) and also provides new modules which should be useful
  552. for day to day programming.")
  553. ;; With static-linking exception
  554. (license license:lgpl2.1+)))
  555. (define-public ocaml-cudf
  556. (package
  557. (name "ocaml-cudf")
  558. (version "0.9")
  559. (source
  560. (origin
  561. (method url-fetch)
  562. (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
  563. (sha256
  564. (base32
  565. "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
  566. (build-system ocaml-build-system)
  567. (propagated-inputs `(("ocaml-extlib" ,ocaml-extlib)))
  568. (native-inputs
  569. `(("perl" ,perl)
  570. ("ocamlbuild" ,ocamlbuild)
  571. ("ocaml-ounit" ,ocaml-ounit)))
  572. (arguments
  573. `(#:make-flags
  574. ,#~(list
  575. "all" "opt"
  576. (string-append "BINDIR=" #$output "/bin"))
  577. #:phases
  578. (modify-phases %standard-phases
  579. (delete 'configure))))
  580. (home-page "https://www.mancoosi.org/cudf/")
  581. (synopsis "CUDF library (part of the Mancoosi tools)")
  582. (description "CUDF (for Common Upgradeability Description Format) is a
  583. format for describing upgrade scenarios in package-based Free and Open Source
  584. Software distribution.")
  585. ;; With static-linking exception
  586. (license license:lgpl2.1+)))
  587. (define-public ocaml-mccs
  588. (package
  589. (name "ocaml-mccs")
  590. (version "1.1+11")
  591. (source (origin
  592. (method git-fetch)
  593. (uri (git-reference
  594. (url "https://github.com/AltGr/ocaml-mccs")
  595. (commit version)))
  596. (file-name (git-file-name name version))
  597. (sha256
  598. (base32
  599. "1gsad5cj03256i36wdjqk5pg51pyd48rpjazf0gfaakrn8lk438g"))))
  600. (build-system dune-build-system)
  601. (propagated-inputs `(("ocaml-cudf" ,ocaml-cudf)))
  602. (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
  603. (synopsis "Upgrade path problem solver")
  604. (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
  605. Mccs take as input a CUDF problem and computes the best solution according to
  606. a set of criteria. It relies on a Integer Programming solver or a
  607. Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
  608. underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
  609. (license (list
  610. license:bsd-3
  611. license:gpl3+
  612. ;; With static-linking exception
  613. license:lgpl2.1+))))
  614. (define-public ocaml-dose3
  615. (package
  616. (name "ocaml-dose3")
  617. (version "5.0.1")
  618. (source (origin
  619. (method url-fetch)
  620. (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
  621. (sha256
  622. (base32
  623. "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
  624. (patches
  625. (search-patches
  626. "ocaml-dose3-add-unix-dependency.patch"
  627. "ocaml-dose3-Fix-for-ocaml-4.06.patch"
  628. "ocaml-dose3-dont-make-printconf.patch"
  629. "ocaml-dose3-Install-mli-cmx-etc.patch"))))
  630. (build-system ocaml-build-system)
  631. (arguments
  632. `(#:configure-flags
  633. ,#~(list (string-append "SHELL="
  634. #+(file-append (canonical-package bash-minimal)
  635. "/bin/sh")))
  636. #:make-flags
  637. ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))
  638. #:phases
  639. (modify-phases %standard-phases
  640. (add-after 'unpack 'fix-test-script
  641. (lambda _
  642. (substitute* "applications/dose-tests.py"
  643. (("warning\\(")
  644. "from warnings import warn\nwarn(")))))))
  645. (propagated-inputs
  646. `(("ocaml-graph" ,ocaml-graph)
  647. ("ocaml-cudf" ,ocaml-cudf)
  648. ("ocaml-extlib" ,ocaml-extlib)
  649. ("ocaml-re" ,ocaml-re)))
  650. (native-inputs
  651. `(("perl" ,perl)
  652. ("python" ,python-2) ; for a test script
  653. ("python2-pyyaml" ,python2-pyyaml) ; for a test script
  654. ("ocaml-extlib" ,ocaml-extlib)
  655. ("ocamlbuild" ,ocamlbuild)
  656. ("ocaml-cppo" ,ocaml-cppo)))
  657. (home-page "https://www.mancoosi.org/software/")
  658. (synopsis "Package distribution management framework")
  659. (description "Dose3 is a framework made of several OCaml libraries for
  660. managing distribution packages and their dependencies. Though not tied to
  661. any particular distribution, dose3 constitutes a pool of libraries which
  662. enable analyzing packages coming from various distributions. Besides basic
  663. functionalities for querying and setting package properties, dose3 also
  664. implements algorithms for solving more complex problems such as monitoring
  665. package evolutions, correct and complete dependency resolution and
  666. repository-wide uninstallability checks.")
  667. ;; with static-linking exception
  668. (license license:lgpl2.1+)))
  669. (define-public ocaml-down
  670. (package
  671. (name "ocaml-down")
  672. (version "0.0.3")
  673. (source
  674. (origin
  675. (method url-fetch)
  676. (uri (string-append "https://erratique.ch/software/down/releases/down-"
  677. version ".tbz"))
  678. (sha256
  679. (base32
  680. "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg"))))
  681. (build-system ocaml-build-system)
  682. (arguments
  683. `(#:tests? #f ;no tests
  684. #:phases
  685. (modify-phases %standard-phases
  686. (delete 'configure))
  687. #:build-flags
  688. ,#~(list "build" "--lib-dir"
  689. (string-append #$output "/lib/ocaml/site-lib"))))
  690. (native-inputs
  691. `(("ocaml-findlib" ,ocaml-findlib)
  692. ("ocamlbuild" ,ocamlbuild)
  693. ("ocaml-topkg" ,ocaml-topkg)
  694. ("opam" ,opam)))
  695. (home-page "https://erratique.ch/software/down")
  696. (synopsis "OCaml toplevel (REPL) upgrade")
  697. (description "Down is an unintrusive user experience upgrade for the
  698. @command{ocaml} toplevel (REPL).
  699. Simply load the zero dependency @code{down} library in the @command{ocaml}
  700. toplevel and you get line edition, history, session support and identifier
  701. completion and documentation with @command{ocp-index}.
  702. Add this to your @file{~/.ocamlinit}:
  703. @example
  704. #use \"down.top\"
  705. @end example
  706. You may also need to add this to your @file{~/.ocamlinit} and declare
  707. the environment variable @code{OCAML_TOPLEVEL_PATH}:
  708. @example
  709. let () =
  710. try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
  711. with Not_found -> ()
  712. @end example
  713. OR
  714. @example
  715. let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
  716. |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
  717. |> List.map (fun x -> x ^ \"/toplevel\")
  718. (* remove the line below if you don't want to see the text
  719. every time you start the toplevel *)
  720. |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
  721. |> List.iter Topdirs.dir_directory;;
  722. @end example")
  723. (license license:isc)))
  724. (define-public ocaml-opam-file-format
  725. (package
  726. (name "ocaml-opam-file-format")
  727. (version "2.1.3")
  728. (source (origin
  729. (method git-fetch)
  730. (uri (git-reference
  731. (url "https://github.com/ocaml/opam-file-format")
  732. (commit version)))
  733. (file-name (git-file-name name version))
  734. (sha256
  735. (base32
  736. "1fxhppdmrysr2nb5z3c448h17np48f3ga9jih33acj78r4rdblcs"))))
  737. (build-system ocaml-build-system)
  738. (arguments
  739. `(#:tests? #f; No tests
  740. #:make-flags ,#~(list (string-append "LIBDIR=" #$output
  741. "/lib/ocaml/site-lib"))
  742. #:phases
  743. (modify-phases %standard-phases
  744. (delete 'configure))))
  745. (home-page "https://opam.ocaml.org")
  746. (synopsis "Parser and printer for the opam file syntax")
  747. (description "This package contains a parser and a pretty-printer for
  748. the opam file format.")
  749. ;; With static-linking exception
  750. (license license:lgpl2.1+)))
  751. (define-public opam
  752. (package
  753. (name "opam")
  754. (version "2.1.0")
  755. (source (origin
  756. (method git-fetch)
  757. (uri (git-reference
  758. (url "https://github.com/ocaml/opam")
  759. (commit version)))
  760. (file-name (git-file-name name version))
  761. (sha256
  762. (base32
  763. "12l7l4pbzy71k1yc7ym5aczajszvc9bqkdnfg8xhqc8ch8j1h1lj"))))
  764. (build-system dune-build-system)
  765. (arguments
  766. `(#:test-target "."
  767. #:phases
  768. (modify-phases %standard-phases
  769. (add-before 'build 'pre-build
  770. (lambda* (#:key inputs make-flags #:allow-other-keys)
  771. (let ((bash (assoc-ref inputs "bash"))
  772. (bwrap (search-input-file inputs "/bin/bwrap")))
  773. (substitute* "src/core/opamSystem.ml"
  774. (("\"/bin/sh\"")
  775. (string-append "\"" bash "/bin/sh\""))
  776. (("getconf")
  777. (which "getconf")))
  778. ;; Use bwrap from the store directly.
  779. (substitute* "src/state/shellscripts/bwrap.sh"
  780. (("-v bwrap") (string-append "-v " bwrap))
  781. (("exec bwrap") (string-append "exec " bwrap))
  782. ;; Mount /gnu and /run/current-system in the
  783. ;; isolated environment when building with opam.
  784. ;; This is necessary for packages to find external
  785. ;; dependencies, such as a C compiler, make, etc...
  786. (("^add_sys_mounts /usr")
  787. (string-append "add_sys_mounts "
  788. (%store-directory)
  789. " /run/current-system /usr")))
  790. (substitute* "src/client/opamInitDefaults.ml"
  791. (("\"bwrap\"") (string-append "\"" bwrap "\""))))))
  792. (add-before 'check 'prepare-checks
  793. (lambda* (#:key inputs #:allow-other-keys)
  794. ;; Opam tests need to run an isolated environment from a writable
  795. ;; home directory.
  796. (mkdir-p "test-home")
  797. (setenv "HOME" (string-append (getcwd) "/test-home"))
  798. ;; Opam tests require data from opam-repository. Instead of
  799. ;; downloading them with wget from the guix environment, copy the
  800. ;; content to the expected directory.
  801. (substitute* "tests/reftests/dune.inc"
  802. (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
  803. (string-append "rmdir %{targets}) (run cp -r "
  804. (assoc-ref inputs (string-append "opam-repo-" commit))
  805. "/ %{targets}) (run chmod +w -R %{targets}"))
  806. (("wget[^)]*") "touch %{targets}")
  807. ;; Disable a failing test because of different line wrapping
  808. (("diff cli-versioning.test cli-versioning.out") "run true")
  809. ;; Disable a failing test because it tries to clone a git
  810. ;; repository from inside bwrap
  811. (("diff upgrade-format.test upgrade-format.out") "run true"))
  812. (substitute* "tests/reftests/dune"
  813. ;; Because of our changes to the previous file, we cannot check
  814. ;; it can be regenerated
  815. (("diff dune.inc dune.inc.gen") "run true"))
  816. ;; Ensure we can run the generated build.sh (no /bin/sh)
  817. (substitute* '("tests/reftests/legacy-local.test"
  818. "tests/reftests/legacy-git.test")
  819. (("#! ?/bin/sh")
  820. (string-append "#!"
  821. (search-input-file inputs "/bin/sh"))))
  822. (substitute* "tests/reftests/testing-env"
  823. (("OPAMSTRICT=1")
  824. (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
  825. (assoc-ref inputs "libc") "/lib"))))))))
  826. (native-inputs
  827. (let ((opam-repo (lambda (commit hash)
  828. (origin
  829. (method git-fetch)
  830. (uri (git-reference
  831. (url "https://github.com/ocaml/opam-repository")
  832. (commit commit)))
  833. (file-name (git-file-name "opam-repo" commit))
  834. (sha256 (base32 hash))))))
  835. `(("dune" ,dune)
  836. ("ocaml-cppo" ,ocaml-cppo)
  837. ;; For tests.
  838. ("git" ,git-minimal)
  839. ("openssl" ,openssl)
  840. ("python" ,python-wrapper)
  841. ("rsync" ,rsync)
  842. ("unzip" ,unzip)
  843. ("which" ,which)
  844. ;; Data for tests
  845. ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2"
  846. "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
  847. ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
  848. "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
  849. ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
  850. "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
  851. ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701"
  852. "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
  853. (inputs
  854. `(("ocaml" ,ocaml)
  855. ("ncurses" ,ncurses)
  856. ("curl" ,curl)
  857. ("bubblewrap" ,bubblewrap)))
  858. (propagated-inputs
  859. `(("ocaml-cmdliner" ,ocaml-cmdliner)
  860. ("ocaml-dose3" ,ocaml-dose3)
  861. ("ocaml-mccs" ,ocaml-mccs)
  862. ("ocaml-opam-file-format" ,ocaml-opam-file-format)
  863. ("ocaml-re" ,ocaml-re)))
  864. (home-page "http://opam.ocamlpro.com/")
  865. (synopsis "Package manager for OCaml")
  866. (description
  867. "OPAM is a tool to manage OCaml packages. It supports multiple
  868. simultaneous compiler installations, flexible package constraints, and a
  869. Git-friendly development workflow.")
  870. ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
  871. (license license:lgpl3)))
  872. (define-public camlp5
  873. (package
  874. (name "camlp5")
  875. (version "7.13")
  876. (source
  877. (origin
  878. (method git-fetch)
  879. (uri (git-reference
  880. (url "https://github.com/camlp5/camlp5")
  881. (commit (string-append "rel" (string-delete #\. version)))))
  882. (file-name (git-file-name name version))
  883. (sha256
  884. (base32 "1d9spy3f5ahixm8nxxk086kpslzva669a5scn49am0s7vx4i71kp"))))
  885. (build-system gnu-build-system)
  886. (inputs
  887. `(("ocaml" ,ocaml)))
  888. (arguments
  889. `(#:tests? #f ; XXX TODO figure out how to run the tests
  890. #:phases
  891. (modify-phases %standard-phases
  892. (replace 'configure
  893. (lambda* (#:key outputs #:allow-other-keys)
  894. (let* ((out (assoc-ref outputs "out"))
  895. (mandir (string-append out "/share/man")))
  896. ;; Custom configure script doesn't recognize
  897. ;; --prefix=<PREFIX> syntax (with equals sign).
  898. (invoke "./configure"
  899. "--prefix" out
  900. "--mandir" mandir))))
  901. (add-before 'build 'fix-/bin-references
  902. (lambda _
  903. (substitute* "config/Makefile"
  904. (("/bin/rm") "rm"))
  905. #t))
  906. (replace 'build
  907. (lambda _
  908. (invoke "make" "-j" (number->string
  909. (parallel-job-count))
  910. "world.opt")))
  911. ;; Required for findlib to find camlp5's libraries
  912. (add-after 'install 'install-meta
  913. (lambda* (#:key outputs #:allow-other-keys)
  914. (install-file "etc/META" (string-append (assoc-ref outputs "out")
  915. "/lib/ocaml/camlp5/"))
  916. #t)))))
  917. (home-page "https://camlp5.github.io/")
  918. (synopsis "Pre-processor Pretty Printer for OCaml")
  919. (description
  920. "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
  921. tools for syntax (Stream Parsers and Grammars) and the ability to modify the
  922. concrete syntax of the language (Quotations, Syntax Extensions).")
  923. ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
  924. (license (list license:bsd-3 license:qpl))))
  925. (define-public hevea
  926. (package
  927. (name "hevea")
  928. (version "2.35")
  929. (source (origin
  930. (method url-fetch)
  931. (uri (string-append "http://hevea.inria.fr/old/"
  932. "hevea-" version ".tar.gz"))
  933. (sha256
  934. (base32
  935. "1jwydkb9ldb1sx815c364dxgr569f2rbbzgxbn2kanrybpdbm2gi"))))
  936. (build-system gnu-build-system)
  937. (inputs
  938. `(("ocaml" ,ocaml)))
  939. (native-inputs
  940. `(("ocamlbuild" ,ocamlbuild)))
  941. (arguments
  942. `(#:tests? #f ; no test suite
  943. #:make-flags (list (string-append "PREFIX=" %output))
  944. #:phases (modify-phases %standard-phases
  945. (delete 'configure)
  946. (add-before 'build 'patch-/bin/sh
  947. (lambda _
  948. (substitute* "_tags"
  949. (("/bin/sh") (which "sh")))
  950. #t)))))
  951. (home-page "http://hevea.inria.fr/")
  952. (synopsis "LaTeX to HTML translator")
  953. (description
  954. "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
  955. written in Objective Caml.")
  956. (license license:qpl)))
  957. (define-public ocaml-num
  958. (package
  959. (name "ocaml-num")
  960. (version "1.4")
  961. (source
  962. (origin
  963. (method git-fetch)
  964. (uri (git-reference
  965. (url "https://github.com/ocaml/num")
  966. (commit (string-append "v" version))))
  967. (file-name (git-file-name name version))
  968. (sha256
  969. (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
  970. (build-system dune-build-system)
  971. (home-page "https://github.com/ocaml/num")
  972. (synopsis "Arbitrary-precision integer and rational arithmetic")
  973. (description "OCaml-Num contains the legacy Num library for
  974. arbitrary-precision integer and rational arithmetic that used to be part of
  975. the OCaml core distribution.")
  976. (license license:lgpl2.1+))); with linking exception
  977. (define-public emacs-tuareg
  978. ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
  979. ;; deprecated" or 'lexical-binding' and others had been fixed.
  980. (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545")
  981. (revision "0"))
  982. (package
  983. (name "emacs-tuareg")
  984. (version (git-version "2.2.0" revision commit))
  985. (source
  986. (origin
  987. (method git-fetch)
  988. (uri (git-reference
  989. (url "https://github.com/ocaml/tuareg")
  990. (commit commit)))
  991. (file-name (git-file-name name version))
  992. (sha256
  993. (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
  994. (build-system gnu-build-system)
  995. (native-inputs
  996. `(("emacs" ,emacs-minimal)
  997. ("opam" ,opam)))
  998. (arguments
  999. `(#:phases
  1000. (modify-phases %standard-phases
  1001. (add-after 'unpack 'make-git-checkout-writable
  1002. (lambda _
  1003. (for-each make-file-writable (find-files "."))
  1004. #t))
  1005. (delete 'configure)
  1006. (add-before 'install 'fix-install-path
  1007. (lambda* (#:key outputs #:allow-other-keys)
  1008. (substitute* "Makefile"
  1009. (("/emacs/site-lisp")
  1010. (string-append (assoc-ref %outputs "out")
  1011. "/share/emacs/site-lisp/")))
  1012. #t))
  1013. (add-after 'install 'post-install
  1014. (lambda* (#:key outputs #:allow-other-keys)
  1015. (symlink "tuareg.el"
  1016. (string-append (assoc-ref outputs "out")
  1017. "/share/emacs/site-lisp/"
  1018. "tuareg-autoloads.el"))
  1019. #t)))))
  1020. (home-page "https://github.com/ocaml/tuareg")
  1021. (synopsis "OCaml programming mode, REPL, debugger for Emacs")
  1022. (description "Tuareg helps editing OCaml code, to highlight important
  1023. parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
  1024. Emacs.")
  1025. (license license:gpl2+))))
  1026. (define-public ocaml-menhir
  1027. (package
  1028. (name "ocaml-menhir")
  1029. (version "20210419")
  1030. (source
  1031. (origin
  1032. (method git-fetch)
  1033. (uri (git-reference
  1034. (url "https://gitlab.inria.fr/fpottier/menhir.git")
  1035. (commit version)))
  1036. (file-name (git-file-name name version))
  1037. (sha256
  1038. (base32 "0jcbr7s3iwfr7xxfybs3h407g76yfp5yq5r9i0wg2ahvvbqh03ky"))))
  1039. (build-system dune-build-system)
  1040. (inputs
  1041. `(("ocaml" ,ocaml)))
  1042. (arguments
  1043. `(#:tests? #f)) ; No check target
  1044. (home-page "http://gallium.inria.fr/~fpottier/menhir/")
  1045. (synopsis "Parser generator")
  1046. (description "Menhir is a parser generator. It turns high-level grammar
  1047. specifications, decorated with semantic actions expressed in the OCaml
  1048. programming language into parsers, again expressed in OCaml. It is based on
  1049. Knuth’s LR(1) parser construction technique.")
  1050. ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
  1051. ;; that have an *.ml or *.mli extension are GPL licensed. All other files
  1052. ;; are QPL licensed.
  1053. (license (list license:gpl2+ license:qpl))))
  1054. (define-public ocaml-bigarray-compat
  1055. (package
  1056. (name "ocaml-bigarray-compat")
  1057. (version "1.0.0")
  1058. (source (origin
  1059. (method git-fetch)
  1060. (uri (git-reference
  1061. (url "https://github.com/mirage/bigarray-compat")
  1062. (commit (string-append "v" version))))
  1063. (file-name (git-file-name name version))
  1064. (sha256
  1065. (base32
  1066. "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"))))
  1067. (build-system dune-build-system)
  1068. (arguments
  1069. `(#:tests? #f)); no tests
  1070. (home-page "https://github.com/mirage/bigarray-compat")
  1071. (synopsis "OCaml compatibility library")
  1072. (description "This package contains a compatibility library for
  1073. @code{Stdlib.Bigarray} in OCaml.")
  1074. (license license:isc)))
  1075. (define-public lablgtk
  1076. (package
  1077. (name "lablgtk")
  1078. (version "2.18.11")
  1079. (source (origin
  1080. (method git-fetch)
  1081. (uri (git-reference
  1082. (url "https://github.com/garrigue/lablgtk")
  1083. (commit version)))
  1084. (file-name (git-file-name name version))
  1085. (sha256
  1086. (base32
  1087. "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
  1088. (build-system gnu-build-system)
  1089. (native-inputs
  1090. `(("ocaml" ,ocaml)
  1091. ("findlib" ,ocaml-findlib)
  1092. ("pkg-config" ,pkg-config)))
  1093. ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
  1094. ;; and gtk+-quartz-2.0 once available.
  1095. (inputs
  1096. `(("gtk+" ,gtk+-2)
  1097. ("gtksourceview" ,gtksourceview-2)
  1098. ("libgnomecanvas" ,libgnomecanvas)
  1099. ("libgnomeui" ,libgnomeui)
  1100. ("libglade" ,libglade)
  1101. ("librsvg" ,librsvg)))
  1102. (arguments
  1103. `(#:tests? #f ; no check target
  1104. ;; opt: also install cmxa files
  1105. #:make-flags (list "all" "opt"
  1106. (string-append "FINDLIBDIR="
  1107. (assoc-ref %outputs "out")
  1108. "/lib/ocaml"))
  1109. ;; Occasionally we would get "Error: Unbound module GtkThread" when
  1110. ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
  1111. #:parallel-build? #f
  1112. #:phases
  1113. (modify-phases %standard-phases
  1114. (add-before 'install 'prepare-install
  1115. (lambda* (#:key inputs outputs #:allow-other-keys)
  1116. (let ((out (assoc-ref outputs "out"))
  1117. (ocaml (assoc-ref inputs "ocaml")))
  1118. ;; Install into the output and not the ocaml directory.
  1119. (mkdir-p (string-append out "/lib/ocaml"))
  1120. (substitute* "config.make"
  1121. ((ocaml) out))
  1122. #t))))))
  1123. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
  1124. (home-page "http://lablgtk.forge.ocamlcore.org/")
  1125. (synopsis "GTK+ bindings for OCaml")
  1126. (description
  1127. "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
  1128. a strongly-typed object-oriented interface that is compatible with the
  1129. dynamic typing of GTK+. Most widgets and methods are available. LablGtk
  1130. also provides bindings to
  1131. gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
  1132. gnomeui, gtksourceview, gtkspell,
  1133. libglade (and it an generate OCaml code from .glade files),
  1134. libpanel, librsvg and quartz.")
  1135. (license license:lgpl2.1)))
  1136. (define-public ocaml4.07-lablgtk
  1137. (package
  1138. (inherit lablgtk)
  1139. (name "ocaml4.07-lablgtk")
  1140. (native-inputs
  1141. `(("ocaml" ,ocaml-4.07)
  1142. ("findlib" ,ocaml4.07-findlib)
  1143. ("pkg-config" ,pkg-config)))
  1144. (properties '())))
  1145. (define-public unison
  1146. (package
  1147. (name "unison")
  1148. (version "2.51.2")
  1149. (source (origin
  1150. (method git-fetch)
  1151. (uri (git-reference
  1152. (url "https://github.com/bcpierce00/unison")
  1153. (commit (string-append "v" version))))
  1154. (file-name (git-file-name name version))
  1155. (sha256
  1156. (base32
  1157. "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
  1158. (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
  1159. (build-system gnu-build-system)
  1160. (outputs '("out"
  1161. "doc")) ; 1.9 MiB of documentation
  1162. (native-inputs
  1163. `(("ocaml" ,ocaml-4.09)
  1164. ;; For documentation
  1165. ("ghostscript" ,ghostscript)
  1166. ("texlive" ,texlive-tiny)
  1167. ("hevea" ,hevea)
  1168. ("lynx" ,lynx)
  1169. ("which" ,which)))
  1170. (arguments
  1171. `(#:parallel-build? #f
  1172. #:parallel-tests? #f
  1173. #:test-target "selftest"
  1174. #:tests? #f ; Tests require writing to $HOME.
  1175. ; If some $HOME is provided, they fail with the message
  1176. ; "Fatal error: Skipping some tests -- remove me!"
  1177. #:phases
  1178. (modify-phases %standard-phases
  1179. (delete 'configure)
  1180. (add-before 'install 'prepare-install
  1181. (lambda* (#:key outputs #:allow-other-keys)
  1182. (let* ((out (assoc-ref outputs "out"))
  1183. (bin (string-append out "/bin")))
  1184. (mkdir-p bin)
  1185. (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
  1186. #t)))
  1187. (add-after 'install 'install-fsmonitor
  1188. (lambda* (#:key outputs #:allow-other-keys)
  1189. (let* ((out (assoc-ref outputs "out"))
  1190. (bin (string-append out "/bin")))
  1191. ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
  1192. (install-file "src/unison-fsmonitor" bin)
  1193. #t)))
  1194. (add-after 'install 'install-doc
  1195. (lambda* (#:key outputs #:allow-other-keys)
  1196. (let ((doc (string-append (assoc-ref outputs "doc")
  1197. "/share/doc/unison")))
  1198. (mkdir-p doc)
  1199. ;; Remove an '\n' that prevents the doc to be generated
  1200. ;; correctly with newer hevea.
  1201. (substitute* "doc/local.tex"
  1202. (("----SNIP----.*") "----SNIP----"))
  1203. ;; This file needs write-permissions, because it's
  1204. ;; overwritten by 'docs' during documentation generation.
  1205. (chmod "src/strings.ml" #o600)
  1206. (invoke "make" "docs"
  1207. "TEXDIRECTIVES=\\\\draftfalse")
  1208. (for-each (lambda (f)
  1209. (install-file f doc))
  1210. (map (lambda (ext)
  1211. (string-append "doc/unison-manual." ext))
  1212. ;; Install only html documentation,
  1213. ;; since the build is currently
  1214. ;; non-reproducible with the ps, pdf,
  1215. ;; and dvi docs.
  1216. '(;; "ps" "pdf" "dvi"
  1217. "html")))
  1218. #t))))))
  1219. (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
  1220. (synopsis "File synchronizer")
  1221. (description
  1222. "Unison is a file-synchronization tool. It allows two replicas of
  1223. a collection of files and directories to be stored on different hosts
  1224. (or different disks on the same host), modified separately, and then
  1225. brought up to date by propagating the changes in each replica
  1226. to the other.")
  1227. (license license:gpl3+)))
  1228. (define-public ocaml-findlib
  1229. (package
  1230. (name "ocaml-findlib")
  1231. (version "1.8.1")
  1232. (source (origin
  1233. (method url-fetch)
  1234. (uri (string-append "http://download.camlcity.org/download/"
  1235. "findlib" "-" version ".tar.gz"))
  1236. (sha256
  1237. (base32
  1238. "00s3sfb02pnjmkax25pcnljcnhcggiliccfz69a72ic7gsjwz1cf"))))
  1239. (build-system gnu-build-system)
  1240. (native-inputs
  1241. `(("m4" ,m4)
  1242. ("ocaml" ,ocaml)))
  1243. (arguments
  1244. `(#:tests? #f ; no test suite
  1245. #:parallel-build? #f
  1246. #:make-flags (list "all" "opt")
  1247. #:phases (modify-phases %standard-phases
  1248. (replace
  1249. 'configure
  1250. (lambda* (#:key inputs outputs #:allow-other-keys)
  1251. (let ((out (assoc-ref outputs "out")))
  1252. (invoke
  1253. "./configure"
  1254. "-bindir" (string-append out "/bin")
  1255. "-config" (string-append out "/etc/ocamfind.conf")
  1256. "-mandir" (string-append out "/share/man")
  1257. "-sitelib" (string-append out "/lib/ocaml/site-lib")
  1258. "-with-toolbox"))))
  1259. (replace 'install
  1260. (lambda* (#:key outputs #:allow-other-keys)
  1261. (let ((out (assoc-ref outputs "out")))
  1262. (invoke "make" "install"
  1263. (string-append "OCAML_CORE_STDLIB="
  1264. out "/lib/ocaml/site-lib"))))))))
  1265. (home-page "http://projects.camlcity.org/projects/findlib.html")
  1266. (synopsis "Management tool for OCaml libraries")
  1267. (description
  1268. "The \"findlib\" library provides a scheme to manage reusable software
  1269. components (packages), and includes tools that support this scheme. Packages
  1270. are collections of OCaml modules for which metainformation can be stored. The
  1271. packages are kept in the file system hierarchy, but with strict directory
  1272. structure. The library contains functions to look the directory up that
  1273. stores a package, to query metainformation about a package, and to retrieve
  1274. dependency information about multiple packages. There is also a tool that
  1275. allows the user to enter queries on the command-line. In order to simplify
  1276. compilation and linkage, there are new frontends of the various OCaml
  1277. compilers that can directly deal with packages.")
  1278. (license license:x11)))
  1279. (define-public ocaml4.07-findlib
  1280. (package
  1281. (inherit ocaml-findlib)
  1282. (name "ocaml4.07-findlib")
  1283. (native-inputs
  1284. `(("m4" ,m4)
  1285. ("ocaml" ,ocaml-4.07)))))
  1286. (define-public ocaml4.09-findlib
  1287. (package
  1288. (inherit ocaml-findlib)
  1289. (name "ocaml4.09-findlib")
  1290. (native-inputs
  1291. `(("m4" ,m4)
  1292. ("ocaml" ,ocaml-4.09)))))
  1293. (define-public ocaml-ounit2
  1294. (package
  1295. (name "ocaml-ounit2")
  1296. (version "2.2.4")
  1297. (source (origin
  1298. (method git-fetch)
  1299. (uri (git-reference
  1300. (url "https://github.com/gildor478/ounit.git")
  1301. (commit (string-append "v" version))))
  1302. (file-name (git-file-name name version))
  1303. (sha256
  1304. (base32
  1305. "0gxjw1bhmjcjzri6x6psqrkbbyq678b69bqfl9i1zswp7cj2lryg"))))
  1306. (build-system dune-build-system)
  1307. (propagated-inputs
  1308. `(("lwt" ,ocaml-lwt)
  1309. ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
  1310. (home-page "https://github.com/gildor478/ounit")
  1311. (synopsis "Unit testing framework for OCaml")
  1312. (description "OUnit2 is a unit testing framework for OCaml. It is similar
  1313. to JUnit and other XUnit testing frameworks.")
  1314. (license license:expat)))
  1315. ;; note that some tests may hang for no obvious reason.
  1316. (define-public ocaml-ounit
  1317. (package
  1318. (name "ocaml-ounit")
  1319. (version "2.0.8")
  1320. (source (origin
  1321. (method url-fetch)
  1322. (uri (ocaml-forge-uri "ounit" version 1749))
  1323. (sha256
  1324. (base32
  1325. "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
  1326. (build-system ocaml-build-system)
  1327. (native-inputs
  1328. `(("libxml2" ,libxml2) ; for xmllint
  1329. ("ocamlbuild" ,ocamlbuild)))
  1330. (arguments
  1331. `(#:phases
  1332. (modify-phases %standard-phases
  1333. (delete 'check)))) ; tests are run during build
  1334. (home-page "http://ounit.forge.ocamlcore.org")
  1335. (synopsis "Unit testing framework for OCaml")
  1336. (description "Unit testing framework for OCaml. It is similar to JUnit and
  1337. other XUnit testing frameworks.")
  1338. (license license:expat)))
  1339. (define-public camlzip
  1340. (package
  1341. (name "camlzip")
  1342. (version "1.11")
  1343. (source (origin
  1344. (method git-fetch)
  1345. (uri (git-reference
  1346. (url "https://github.com/xavierleroy/camlzip")
  1347. (commit (string-append
  1348. "rel"
  1349. (string-join (string-split version #\.) "")))))
  1350. (file-name (git-file-name name version))
  1351. (sha256
  1352. (base32
  1353. "16jnn3czxnvyjngnz167x5kw097k7izdqvkix8qvgvhdmgvqm89b"))))
  1354. (build-system ocaml-build-system)
  1355. (inputs
  1356. `(("zlib" ,zlib)))
  1357. (arguments
  1358. `(#:phases
  1359. (modify-phases %standard-phases
  1360. (delete 'configure))
  1361. #:install-target "install-findlib"
  1362. #:make-flags
  1363. ,#~(list "all" "allopt"
  1364. (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
  1365. (home-page "https://github.com/xavierleroy/camlzip")
  1366. (synopsis "Provides easy access to compressed files")
  1367. (description "Provides easy access to compressed files in ZIP, GZIP and
  1368. JAR format. It provides functions for reading from and writing to compressed
  1369. files in these formats.")
  1370. (license license:lgpl2.1+)))
  1371. (define-public ocamlmod
  1372. (package
  1373. (name "ocamlmod")
  1374. (version "0.0.9")
  1375. (source (origin
  1376. (method url-fetch)
  1377. (uri (ocaml-forge-uri name version 1702))
  1378. (sha256
  1379. (base32
  1380. "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
  1381. (build-system ocaml-build-system)
  1382. (native-inputs
  1383. `(("ounit" ,ocaml-ounit)
  1384. ("ocamlbuild" ,ocamlbuild)))
  1385. (arguments
  1386. `(#:phases
  1387. (modify-phases %standard-phases
  1388. ;; Tests are done during build.
  1389. (delete 'check))))
  1390. (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
  1391. (synopsis "Generate modules from OCaml source files")
  1392. (description "Generate modules from OCaml source files.")
  1393. (license license:lgpl2.1+))) ; with an exception
  1394. (define-public ocaml-zarith
  1395. (package
  1396. (name "ocaml-zarith")
  1397. (version "1.12")
  1398. (source (origin
  1399. (method git-fetch)
  1400. (uri (git-reference
  1401. (url "https://github.com/ocaml/Zarith")
  1402. (commit (string-append "release-" version))))
  1403. (file-name (git-file-name name version))
  1404. (sha256
  1405. (base32
  1406. "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
  1407. (build-system ocaml-build-system)
  1408. (native-inputs
  1409. `(("perl" ,perl)))
  1410. (inputs
  1411. `(("gmp" ,gmp)))
  1412. (arguments
  1413. `(#:tests? #f ; no test target
  1414. #:phases
  1415. (modify-phases %standard-phases
  1416. (replace 'configure
  1417. (lambda _ (invoke "./configure")))
  1418. (add-after 'install 'move-sublibs
  1419. (lambda* (#:key outputs #:allow-other-keys)
  1420. (let* ((out (assoc-ref outputs "out"))
  1421. (lib (string-append out "/lib/ocaml/site-lib")))
  1422. (mkdir-p (string-append lib "/stublibs"))
  1423. (rename-file (string-append lib "/zarith/dllzarith.so")
  1424. (string-append lib "/stublibs/dllzarith.so"))))))))
  1425. (home-page "https://forge.ocamlcore.org/projects/zarith/")
  1426. (synopsis "Implements arbitrary-precision integers")
  1427. (description "Implements arithmetic and logical operations over
  1428. arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
  1429. over big integers. Small integers are represented as Caml unboxed integers,
  1430. for speed and space economy.")
  1431. (license license:lgpl2.1+))) ; with an exception
  1432. (define-public ocaml-frontc
  1433. (package
  1434. (name "ocaml-frontc")
  1435. (version "3.4.2")
  1436. (source (origin
  1437. (method git-fetch)
  1438. (uri (git-reference
  1439. (url "https://github.com/BinaryAnalysisPlatform/FrontC")
  1440. (commit (string-append
  1441. "V_" (string-join (string-split version #\.) "_")))))
  1442. (file-name (git-file-name name version))
  1443. (sha256
  1444. (base32
  1445. "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
  1446. (build-system ocaml-build-system)
  1447. (arguments
  1448. `(#:phases
  1449. (modify-phases %standard-phases
  1450. (delete 'configure)
  1451. (add-after 'install 'install-meta
  1452. (lambda* (#:key outputs #:allow-other-keys)
  1453. (let ((out (assoc-ref outputs "out")))
  1454. (with-output-to-file
  1455. (string-append out "/lib/ocaml/frontc/META")
  1456. (lambda _
  1457. (display
  1458. (string-append
  1459. "description = \"Parser for the C language\"
  1460. version = \"" ,version "\"
  1461. requires = \"unix\"
  1462. archive(byte) = \"frontc.cma\"
  1463. archive(native) = \"frontc.cmxa\""))))
  1464. (symlink (string-append out "/lib/ocaml/frontc")
  1465. (string-append out "/lib/ocaml/FrontC"))))))
  1466. #:make-flags ,#~(list (string-append "PREFIX=" #$output)
  1467. "OCAML_SITE=$(LIB_DIR)/ocaml/")))
  1468. (properties `((upstream-name . "FrontC")))
  1469. (home-page "https://www.irit.fr/FrontC")
  1470. (synopsis "C parser and lexer library")
  1471. (description "FrontC is an OCAML library providing a C parser and lexer.
  1472. The result is a syntactic tree easy to process with usual OCAML tree management.
  1473. It provides support for ANSI C syntax, old-C K&R style syntax and the standard
  1474. GNU CC attributes. It provides also a C pretty printer as an example of use.")
  1475. (license license:lgpl2.1)))
  1476. (define-public ocaml-qcheck
  1477. (package
  1478. (name "ocaml-qcheck")
  1479. (version "0.12")
  1480. (source
  1481. (origin
  1482. (method git-fetch)
  1483. (uri (git-reference
  1484. (url "https://github.com/c-cube/qcheck")
  1485. (commit version)))
  1486. (file-name (git-file-name name version))
  1487. (sha256
  1488. (base32 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
  1489. (build-system dune-build-system)
  1490. (arguments
  1491. `(#:test-target "."
  1492. #:phases
  1493. (modify-phases %standard-phases
  1494. (add-before 'build 'fix-deprecated
  1495. (lambda _
  1496. (substitute* "src/core/QCheck.ml"
  1497. (("Pervasives.compare") "compare"))
  1498. #t)))))
  1499. (propagated-inputs
  1500. `(("ocaml-alcotest" ,ocaml-alcotest)
  1501. ("ocaml-ounit" ,ocaml-ounit)))
  1502. (native-inputs
  1503. `(("ocamlbuild" ,ocamlbuild)))
  1504. (home-page "https://github.com/c-cube/qcheck")
  1505. (synopsis "QuickCheck inspired property-based testing for OCaml")
  1506. (description "QuickCheck inspired property-based testing for OCaml. This
  1507. module checks invariants (properties of some types) over randomly
  1508. generated instances of the type. It provides combinators for generating
  1509. instances and printing them.")
  1510. (license license:lgpl3+)))
  1511. (define-public ocaml-qtest
  1512. (package
  1513. (name "ocaml-qtest")
  1514. (version "2.10.1")
  1515. (source (origin
  1516. (method git-fetch)
  1517. (uri (git-reference
  1518. (url "https://github.com/vincent-hugot/qtest/")
  1519. (commit (string-append "v" version))))
  1520. (file-name (git-file-name name version))
  1521. (sha256
  1522. (base32
  1523. "0gddzan4vzs0vklsxhirdjrvx3rp7hhh2yr20vi13nq8rwkn9w29"))))
  1524. (build-system dune-build-system)
  1525. (arguments
  1526. `(#:test-target "tests"))
  1527. (propagated-inputs
  1528. `(("ounit" ,ocaml-ounit)
  1529. ("qcheck" ,ocaml-qcheck)))
  1530. (home-page "https://github.com/vincent-hugot/qtest")
  1531. (synopsis "Inline (Unit) Tests for OCaml")
  1532. (description "Qtest extracts inline unit tests written using a special
  1533. syntax in comments. Those tests are then run using the oUnit framework and the
  1534. qcheck library. The possibilities range from trivial tests -- extremely simple
  1535. to use -- to sophisticated random generation of test cases.")
  1536. (license license:lgpl3+)))
  1537. (define-public ocaml-stringext
  1538. (package
  1539. (name "ocaml-stringext")
  1540. (version "1.6.0")
  1541. (source (origin
  1542. (method git-fetch)
  1543. (uri (git-reference
  1544. (url "https://github.com/rgrinberg/stringext")
  1545. (commit version)))
  1546. (file-name (git-file-name name version))
  1547. (sha256
  1548. (base32
  1549. "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
  1550. (build-system dune-build-system)
  1551. (arguments
  1552. `(#:test-target "."))
  1553. (native-inputs
  1554. `(("ocamlbuild" ,ocamlbuild)
  1555. ("qtest" ,ocaml-qtest)))
  1556. (home-page "https://github.com/rgrinberg/stringext")
  1557. (synopsis "Extra string functions for OCaml")
  1558. (description "Provides a single module named Stringext that provides a grab
  1559. bag of often used but missing string functions from the stdlib. E.g, split,
  1560. full_split, cut, rcut, etc..")
  1561. ;; the only mention of a license in this project is in its `opam' file
  1562. ;; where it says `mit'.
  1563. (license license:expat)))
  1564. (define dune-bootstrap
  1565. (package
  1566. (name "dune")
  1567. (version "2.9.0")
  1568. (source (origin
  1569. (method git-fetch)
  1570. (uri (git-reference
  1571. (url "https://github.com/ocaml/dune")
  1572. (commit version)))
  1573. (file-name (git-file-name name version))
  1574. (sha256
  1575. (base32
  1576. "01np4jy0f3czkpzkl38k9b4lsh41qk52ldaqxl98mgigyzhx4w0b"))))
  1577. (build-system ocaml-build-system)
  1578. (arguments
  1579. `(#:tests? #f; require odoc
  1580. #:make-flags ,#~(list "release"
  1581. (string-append "PREFIX=" #$output)
  1582. (string-append "LIBDIR=" #$output
  1583. "/lib/ocaml/site-lib"))
  1584. #:phases
  1585. (modify-phases %standard-phases
  1586. (replace 'configure
  1587. (lambda* (#:key outputs #:allow-other-keys)
  1588. (mkdir-p "src/dune")
  1589. (invoke "./configure")
  1590. #t)))))
  1591. (home-page "https://github.com/ocaml/dune")
  1592. (synopsis "OCaml build system")
  1593. (description "Dune is a build system that was designed to simplify the
  1594. release of Jane Street packages. It reads metadata from @file{dune} files
  1595. following a very simple s-expression syntax.")
  1596. (license license:expat)))
  1597. (define ocaml4.09-dune-bootstrap
  1598. (package-with-ocaml4.09 dune-bootstrap))
  1599. (define-public dune-configurator
  1600. (package
  1601. (inherit dune-bootstrap)
  1602. (name "dune-configurator")
  1603. (build-system dune-build-system)
  1604. (arguments
  1605. `(#:package "dune-configurator"
  1606. #:dune ,dune-bootstrap
  1607. ; require ppx_expect
  1608. #:tests? #f))
  1609. (propagated-inputs
  1610. `(("ocaml-csexp" ,ocaml-csexp)))
  1611. (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
  1612. (synopsis "Dune helper library for gathering system configuration")
  1613. (description "Dune-configurator is a small library that helps writing
  1614. OCaml scripts that test features available on the system, in order to generate
  1615. config.h files for instance. Among other things, dune-configurator allows one to:
  1616. @itemize
  1617. @item test if a C program compiles
  1618. @item query pkg-config
  1619. @item import #define from OCaml header files
  1620. @item generate config.h file
  1621. @end itemize")))
  1622. (define-public ocaml4.09-dune-configurator
  1623. (package
  1624. (inherit dune-configurator)
  1625. (name "ocaml4.09-dune-configurator")
  1626. (arguments
  1627. `(#:package "dune-configurator"
  1628. #:tests? #f
  1629. #:dune ,ocaml4.09-dune-bootstrap
  1630. #:ocaml ,ocaml-4.09
  1631. #:findlib ,ocaml4.09-findlib))
  1632. (propagated-inputs
  1633. `(("ocaml-csexp" ,ocaml4.09-csexp)))))
  1634. (define-public dune
  1635. (package
  1636. (inherit dune-bootstrap)
  1637. (propagated-inputs
  1638. `(("dune-configurator" ,dune-configurator)))
  1639. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
  1640. (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
  1641. (define-public ocaml4.09-dune
  1642. (package
  1643. (inherit ocaml4.09-dune-bootstrap)
  1644. (propagated-inputs
  1645. `(("dune-configurator" ,dune-configurator)))))
  1646. (define-public ocaml4.07-dune
  1647. (package
  1648. (inherit (package-with-ocaml4.07 dune-bootstrap))
  1649. (version "1.11.3")
  1650. (source (origin
  1651. (method git-fetch)
  1652. (uri (git-reference
  1653. (url "https://github.com/ocaml/dune")
  1654. (commit version)))
  1655. (file-name (git-file-name "dune" version))
  1656. (sha256
  1657. (base32
  1658. "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
  1659. (define-public ocaml-csexp
  1660. (package
  1661. (name "ocaml-csexp")
  1662. (version "1.3.2")
  1663. (source (origin
  1664. (method git-fetch)
  1665. (uri (git-reference
  1666. (url "https://github.com/ocaml-dune/csexp")
  1667. (commit version)))
  1668. (file-name (git-file-name name version))
  1669. (sha256
  1670. (base32
  1671. "190zppgvdjgghmrnx67ayzzk86qdjy3yn5fcrcw08wsh93384pl0"))))
  1672. (build-system dune-build-system)
  1673. (arguments
  1674. `(#:tests? #f; FIXME: needs ppx_expect, but which version?
  1675. #:dune ,dune-bootstrap
  1676. #:phases
  1677. (modify-phases %standard-phases
  1678. (add-before 'build 'chmod
  1679. (lambda _
  1680. (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
  1681. #t)))))
  1682. (propagated-inputs
  1683. `(("ocaml-result" ,ocaml-result)))
  1684. (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
  1685. (home-page "https://github.com/ocaml-dune/csexp")
  1686. (synopsis "Parsing and printing of S-expressions in Canonical form")
  1687. (description "This library provides minimal support for Canonical
  1688. S-expressions. Canonical S-expressions are a binary encoding of
  1689. S-expressions that is super simple and well suited for communication
  1690. between programs.
  1691. This library only provides a few helpers for simple applications. If
  1692. you need more advanced support, such as parsing from more fancy input
  1693. sources, you should consider copying the code of this library given
  1694. how simple parsing S-expressions in canonical form is.
  1695. To avoid a dependency on a particular S-expression library, the only
  1696. module of this library is parameterised by the type of S-expressions.")
  1697. (license license:expat)))
  1698. (define-public ocaml4.09-csexp
  1699. (package
  1700. (inherit ocaml-csexp)
  1701. (name "ocaml4.09-csexp")
  1702. (arguments
  1703. `(#:ocaml ,ocaml-4.09
  1704. #:findlib ,ocaml4.09-findlib
  1705. ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
  1706. ((#:dune _) ocaml4.09-dune-bootstrap))))
  1707. (propagated-inputs
  1708. `(("ocaml-result" ,ocaml4.09-result)))))
  1709. (define-public ocaml-migrate-parsetree
  1710. (package
  1711. (name "ocaml-migrate-parsetree")
  1712. (version "2.2.0")
  1713. (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
  1714. (source
  1715. (origin
  1716. (method git-fetch)
  1717. (uri (git-reference
  1718. (url home-page)
  1719. (commit (string-append "v" version))))
  1720. (file-name (git-file-name name version))
  1721. (sha256
  1722. (base32
  1723. "0midpqjw53b5gx2zbkxs2hqrvh12y8n5681indficp9h3zr822l6"))))
  1724. (build-system dune-build-system)
  1725. (arguments `(#:tests? #f))
  1726. (propagated-inputs
  1727. `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
  1728. ("ocamlbuild" ,ocamlbuild)
  1729. ("ocaml-result" ,ocaml-result)))
  1730. (properties `((upstream-name . "ocaml-migrate-parsetree")
  1731. ;; OCaml 4.07 packages require version 1.*
  1732. (ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-migrate-parsetree-1)))))
  1733. (synopsis "OCaml parsetree converter")
  1734. (description "This library converts between parsetrees of different OCaml
  1735. versions. For each version, there is a snapshot of the parsetree and conversion
  1736. functions to the next and/or previous version.")
  1737. (license license:lgpl2.1+)))
  1738. (define-public ocaml-migrate-parsetree-1
  1739. (package
  1740. (inherit ocaml-migrate-parsetree)
  1741. (name "ocaml-migrate-parsetree-1")
  1742. (version "1.8.0")
  1743. (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
  1744. (source
  1745. (origin
  1746. (method git-fetch)
  1747. (uri (git-reference
  1748. (url home-page)
  1749. (commit (string-append "v" version))))
  1750. (file-name (git-file-name name version))
  1751. (sha256
  1752. (base32
  1753. "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
  1754. (properties '((upstream-name . "ocaml-migrate-parsetree")))))
  1755. (define-public ocaml-ppx-tools-versioned
  1756. (package
  1757. (name "ocaml-ppx-tools-versioned")
  1758. (version "5.4.0")
  1759. (source (origin
  1760. (method git-fetch)
  1761. (uri (git-reference
  1762. (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
  1763. (commit version)))
  1764. (file-name (git-file-name name version))
  1765. (sha256
  1766. (base32
  1767. "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
  1768. (build-system dune-build-system)
  1769. (arguments
  1770. `(#:test-target "."
  1771. #:package "ppx_tools_versioned"))
  1772. (propagated-inputs
  1773. `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)))
  1774. (properties `((upstream-name . "ppx_tools_versioned")))
  1775. (home-page "https://github.com/let-def/ppx_tools_versioned")
  1776. (synopsis "Variant of ppx_tools")
  1777. (description "This package is a variant of ppx_tools based on
  1778. ocaml-migrate-parsetree")
  1779. (license license:expat)))
  1780. (define-public ocaml-bitstring
  1781. (package
  1782. (name "ocaml-bitstring")
  1783. (version "3.1.0")
  1784. (source (origin
  1785. (method url-fetch)
  1786. (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
  1787. "get/v" version ".tar.gz"))
  1788. (file-name (string-append name "-" version ".tar.gz"))
  1789. (sha256
  1790. (base32
  1791. "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
  1792. (build-system dune-build-system)
  1793. (native-inputs
  1794. `(("time" ,time)
  1795. ("autoconf" ,autoconf)
  1796. ("automake" ,automake)))
  1797. (propagated-inputs
  1798. `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
  1799. (arguments
  1800. `(#:package "bitstring"
  1801. #:tests? #f; Tests fail to build
  1802. #:phases
  1803. (modify-phases %standard-phases
  1804. (add-before 'build 'upgrade
  1805. (lambda _
  1806. (invoke "dune" "upgrade")
  1807. #t)))))
  1808. (home-page "https://github.com/xguerin/bitstring")
  1809. (synopsis "Bitstrings and bitstring matching for OCaml")
  1810. (description "Adds Erlang-style bitstrings and matching over bitstrings as
  1811. a syntax extension and library for OCaml. You can use this module to both parse
  1812. and generate binary formats, files and protocols. Bitstring handling is added
  1813. as primitives to the language, making it exceptionally simple to use and very
  1814. powerful.")
  1815. (license license:isc)))
  1816. (define-public ocaml-result
  1817. (package
  1818. (name "ocaml-result")
  1819. (version "1.5")
  1820. (source (origin
  1821. (method git-fetch)
  1822. (uri (git-reference
  1823. (url "https://github.com/janestreet/result")
  1824. (commit version)))
  1825. (file-name (git-file-name name version))
  1826. (sha256
  1827. (base32
  1828. "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
  1829. (build-system dune-build-system)
  1830. (arguments
  1831. `(#:test-target "."
  1832. #:dune ,dune-bootstrap))
  1833. (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
  1834. (home-page "https://github.com/janestreet/result")
  1835. (synopsis "Compatibility Result module")
  1836. (description "Uses the new result type defined in OCaml >= 4.03 while
  1837. staying compatible with older version of OCaml should use the Result module
  1838. defined in this library.")
  1839. (license license:bsd-3)))
  1840. (define-public ocaml4.09-result
  1841. (package
  1842. (inherit ocaml-result)
  1843. (name "ocaml4.09-result")
  1844. (arguments
  1845. `(#:test-target "."
  1846. #:dune ,ocaml4.09-dune-bootstrap
  1847. #:ocaml ,ocaml-4.09
  1848. #:findlib ,ocaml4.09-findlib))))
  1849. (define-public ocaml-topkg
  1850. (package
  1851. (name "ocaml-topkg")
  1852. (version "1.0.0")
  1853. (source (origin
  1854. (method url-fetch)
  1855. (uri (string-append "http://erratique.ch/software/topkg/releases/"
  1856. "topkg-" version ".tbz"))
  1857. (sha256
  1858. (base32
  1859. "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
  1860. (build-system ocaml-build-system)
  1861. (native-inputs
  1862. `(("opam" ,opam)
  1863. ("ocamlbuild" ,ocamlbuild)))
  1864. (propagated-inputs
  1865. `(("result" ,ocaml-result)))
  1866. (arguments
  1867. `(#:tests? #f
  1868. #:build-flags '("build")
  1869. #:phases
  1870. (modify-phases %standard-phases
  1871. (delete 'configure))))
  1872. (home-page "https://erratique.ch/software/topkg")
  1873. (synopsis "Transitory OCaml software packager")
  1874. (description "Topkg is a packager for distributing OCaml software. It
  1875. provides an API to describe the files a package installs in a given build
  1876. configuration and to specify information about the package's distribution,
  1877. creation and publication procedures.")
  1878. (license license:isc)))
  1879. (define-public ocaml-rresult
  1880. (package
  1881. (name "ocaml-rresult")
  1882. (version "0.5.0")
  1883. (source (origin
  1884. (method url-fetch)
  1885. (uri (string-append "http://erratique.ch/software/rresult/releases/"
  1886. "rresult-" version ".tbz"))
  1887. (sha256
  1888. (base32
  1889. "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
  1890. (build-system ocaml-build-system)
  1891. (native-inputs
  1892. `(("opam" ,opam)
  1893. ("ocamlbuild" ,ocamlbuild)))
  1894. (propagated-inputs
  1895. `(("topkg" ,ocaml-topkg)))
  1896. (arguments
  1897. `(#:tests? #f
  1898. #:build-flags '("build")
  1899. #:phases
  1900. (modify-phases %standard-phases
  1901. (delete 'configure))))
  1902. (home-page "https://erratique.ch/software/rresult")
  1903. (synopsis "Result value combinators for OCaml")
  1904. (description "Handle computation results and errors in an explicit and
  1905. declarative manner, without resorting to exceptions. It defines combinators
  1906. to operate on the result type available from OCaml 4.03 in the standard
  1907. library.")
  1908. (license license:isc)))
  1909. (define-public ocaml-sqlite3
  1910. (package
  1911. (name "ocaml-sqlite3")
  1912. (version "5.0.2")
  1913. (source
  1914. (origin
  1915. (method git-fetch)
  1916. (uri (git-reference
  1917. (url "https://github.com/mmottl/sqlite3-ocaml")
  1918. (commit version)))
  1919. (file-name (git-file-name name version))
  1920. (sha256
  1921. (base32
  1922. "15mmq7ak5facpfawfrc6hjz211gli7jab52iqdsihfvh790xm55f"))))
  1923. (build-system dune-build-system)
  1924. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sqlite3))))
  1925. (propagated-inputs
  1926. `(("dune-configurator" ,dune-configurator)
  1927. ("ocaml-odoc" ,ocaml-odoc)))
  1928. (native-inputs
  1929. `(("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  1930. ("pkg-config" ,pkg-config)
  1931. ("sqlite" ,sqlite)))
  1932. (home-page "https://mmottl.github.io/sqlite3-ocaml")
  1933. (synopsis "SQLite3 Bindings for OCaml")
  1934. (description
  1935. "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
  1936. API. Sqlite3 is a self-contained, serverless, zero-configuration,
  1937. transactional SQL database engine with outstanding performance for many use
  1938. cases. These bindings are written in a way that enables a friendly
  1939. coexistence with the old (version 2) SQLite and its OCaml wrapper
  1940. @code{ocaml-sqlite}.")
  1941. (license license:expat)))
  1942. (define-public ocaml4.07-sqlite3
  1943. (package-with-ocaml4.07
  1944. (package
  1945. (inherit ocaml-sqlite3)
  1946. (arguments
  1947. `(#:phases
  1948. (modify-phases %standard-phases
  1949. (add-before 'build 'chmod
  1950. (lambda _
  1951. (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
  1952. #t)))))
  1953. (propagated-inputs
  1954. `(("ocaml-odoc" ,ocaml-odoc)))
  1955. (properties '()))))
  1956. (define-public ocaml-csv
  1957. (package
  1958. (name "ocaml-csv")
  1959. (version "2.3")
  1960. (source
  1961. (origin
  1962. (method git-fetch)
  1963. (uri (git-reference
  1964. (url "https://github.com/Chris00/ocaml-csv")
  1965. (commit version)))
  1966. (file-name (git-file-name name version))
  1967. (sha256
  1968. (base32
  1969. "19k48517s8y1zb91a1312a0n94cbh5i5dixndcrqjmf87kkz61zx"))))
  1970. (build-system dune-build-system)
  1971. (arguments
  1972. `(#:package "csv"
  1973. #:test-target "."))
  1974. (home-page "https://github.com/Chris00/ocaml-csv")
  1975. (synopsis "Pure OCaml functions to read and write CSV")
  1976. (description
  1977. "@dfn{Comma separated values} (CSV) is a simple tabular format supported
  1978. by all major spreadsheets. This library implements pure OCaml functions to
  1979. read and write files in this format as well as some convenience functions to
  1980. manipulate such data.")
  1981. ;; This is LGPLv2.1 with an exception that allows packages statically-linked
  1982. ;; against the library to be released under any terms.
  1983. (license license:lgpl2.1)))
  1984. (define-public ocaml-mtime
  1985. (package
  1986. (name "ocaml-mtime")
  1987. (version "1.1.0")
  1988. (source (origin
  1989. (method url-fetch)
  1990. (uri (string-append "http://erratique.ch/software/mtime/releases/"
  1991. "mtime-" version ".tbz"))
  1992. (sha256
  1993. (base32
  1994. "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
  1995. (build-system ocaml-build-system)
  1996. (native-inputs
  1997. `(("ocamlbuild" ,ocamlbuild)
  1998. ("opam" ,opam)))
  1999. (propagated-inputs
  2000. `(("topkg" ,ocaml-topkg)))
  2001. (arguments
  2002. `(#:tests? #f
  2003. #:build-flags (list "build" "--with-js_of_ocaml" "false")
  2004. #:phases
  2005. (modify-phases %standard-phases
  2006. (delete 'configure))))
  2007. (home-page "https://erratique.ch/software/mtime")
  2008. (synopsis "Monotonic wall-clock time for OCaml")
  2009. (description "Access monotonic wall-clock time. It measures time
  2010. spans without being subject to operating system calendar time adjustments.")
  2011. (license license:isc)))
  2012. (define-public ocaml-calendar
  2013. ;; No tags.
  2014. ;; Commit from 2019-02-03.
  2015. (let ((commit "a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da")
  2016. (revision "0"))
  2017. (package
  2018. (name "ocaml-calendar")
  2019. ;; Makefile.in says 2.04.
  2020. (version (git-version "2.04" revision commit))
  2021. (source
  2022. (origin
  2023. (method git-fetch)
  2024. (uri (git-reference
  2025. (url "https://github.com/ocaml-community/calendar")
  2026. (commit commit)))
  2027. (file-name (git-file-name name version))
  2028. (sha256
  2029. (base32
  2030. "09d9gyqm3zkf3z2m9fx87clqihx6brf8rnzm4yq7c8kf1p572hmc"))))
  2031. (build-system gnu-build-system)
  2032. (arguments
  2033. '(#:test-target "tests"
  2034. #:phases
  2035. (modify-phases %standard-phases
  2036. (add-after 'unpack 'make-deterministic
  2037. (lambda _
  2038. (substitute* "Makefile.in"
  2039. (("`date`") "no date for reproducibility"))))
  2040. (add-before 'install 'set-environment-variables
  2041. (lambda* (#:key outputs #:allow-other-keys)
  2042. (let ((out (assoc-ref outputs "out")))
  2043. (setenv "OCAMLFIND_DESTDIR"
  2044. (string-append out "/lib/ocaml/site-lib"))
  2045. (setenv "OCAMLFIND_LDCONF" "ignore")
  2046. (mkdir-p (string-append
  2047. out "/lib/ocaml/site-lib/calendar"))))))))
  2048. (native-inputs
  2049. `(("autoconf" ,autoconf)
  2050. ("automake" ,automake)))
  2051. (propagated-inputs
  2052. `(("ocaml" ,ocaml)
  2053. ("ocamlfind" ,ocaml-findlib)))
  2054. (home-page "https://github.com/ocaml-community/calendar")
  2055. (synopsis "OCaml library for handling dates and times")
  2056. (description "This package provides types and operations over
  2057. dates and times.")
  2058. ;; With linking exception.
  2059. (license license:lgpl2.1+))))
  2060. (define-public ocaml-cmdliner
  2061. (package
  2062. (name "ocaml-cmdliner")
  2063. (version "1.0.4")
  2064. (source (origin
  2065. (method url-fetch)
  2066. (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
  2067. "cmdliner-" version ".tbz"))
  2068. (sha256
  2069. (base32
  2070. "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"))))
  2071. (build-system ocaml-build-system)
  2072. (inputs
  2073. `(("ocaml-result" ,ocaml-result)))
  2074. (native-inputs
  2075. `(("ocamlbuild" ,ocamlbuild)))
  2076. (arguments
  2077. `(#:tests? #f
  2078. #:make-flags ,#~(list (string-append "LIBDIR=" #$output
  2079. "/lib/ocaml/site-lib/cmdliner"))
  2080. #:phases
  2081. (modify-phases %standard-phases
  2082. (delete 'configure)
  2083. (add-before 'build 'fix-source-file-order
  2084. (lambda _
  2085. (substitute* "build.ml"
  2086. (("Sys.readdir dir")
  2087. "let a = Sys.readdir dir in Array.sort String.compare a; a"))
  2088. #t)))))
  2089. (home-page "https://erratique.ch/software/cmdliner")
  2090. (synopsis "Declarative definition of command line interfaces for OCaml")
  2091. (description "Cmdliner is a module for the declarative definition of command
  2092. line interfaces. It provides a simple and compositional mechanism to convert
  2093. command line arguments to OCaml values and pass them to your functions. The
  2094. module automatically handles syntax errors, help messages and UNIX man page
  2095. generation. It supports programs with single or multiple commands and respects
  2096. most of the POSIX and GNU conventions.")
  2097. (license license:bsd-3)))
  2098. (define-public ocaml-fmt
  2099. (package
  2100. (name "ocaml-fmt")
  2101. (version "0.8.9")
  2102. (source
  2103. (origin
  2104. (method url-fetch)
  2105. (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
  2106. version ".tbz"))
  2107. (sha256 (base32
  2108. "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
  2109. (build-system ocaml-build-system)
  2110. (native-inputs
  2111. `(("ocamlbuild" ,ocamlbuild)
  2112. ("opam" ,opam)
  2113. ("topkg" ,ocaml-topkg)))
  2114. (propagated-inputs
  2115. `(("cmdliner" ,ocaml-cmdliner)
  2116. ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
  2117. ("ocaml-uchar" ,ocaml-uchar)))
  2118. (arguments `(#:tests? #f
  2119. #:build-flags (list "build" "--with-base-unix" "true"
  2120. "--with-cmdliner" "true")
  2121. #:phases
  2122. (modify-phases %standard-phases
  2123. (delete 'configure))))
  2124. (home-page "https://erratique.ch/software/fmt")
  2125. (synopsis "OCaml Format pretty-printer combinators")
  2126. (description "Fmt exposes combinators to devise Format pretty-printing
  2127. functions.")
  2128. (license license:isc)))
  2129. (define-public ocaml-astring
  2130. (package
  2131. (name "ocaml-astring")
  2132. (version "0.8.5")
  2133. (source
  2134. (origin
  2135. (method url-fetch)
  2136. (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
  2137. version ".tbz"))
  2138. (sha256 (base32
  2139. "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"))))
  2140. (build-system ocaml-build-system)
  2141. (native-inputs
  2142. `(("ocamlbuild" ,ocamlbuild)
  2143. ("opam" ,opam)
  2144. ("topkg" ,ocaml-topkg)))
  2145. (arguments
  2146. `(#:tests? #f
  2147. #:build-flags (list "build")
  2148. #:phases
  2149. (modify-phases %standard-phases
  2150. (delete 'configure))))
  2151. (home-page "https://erratique.ch/software/astring")
  2152. (synopsis "Alternative String module for OCaml")
  2153. (description "Astring exposes an alternative String module for OCaml. This
  2154. module balances minimality and expressiveness for basic, index-free, string
  2155. processing and provides types and functions for substrings, string sets and
  2156. string maps. The String module exposed by Astring has exception safe functions,
  2157. removes deprecated and rarely used functions, alters some signatures and names,
  2158. adds a few missing functions and fully exploits OCaml's newfound string
  2159. immutability.")
  2160. (license license:isc)))
  2161. (define-public ocaml-alcotest
  2162. (package
  2163. (name "ocaml-alcotest")
  2164. (version "1.4.0")
  2165. (source (origin
  2166. (method git-fetch)
  2167. (uri (git-reference
  2168. (url "https://github.com/mirage/alcotest")
  2169. (commit version)))
  2170. (file-name (git-file-name name version))
  2171. (sha256
  2172. (base32
  2173. "0fs4yzjva8q703h9kjl5cs0wibvxaqv5hhfhmpbpm1k8cqwr9cri"))))
  2174. (build-system dune-build-system)
  2175. (arguments
  2176. `(#:package "alcotest"
  2177. #:test-target "."))
  2178. (native-inputs
  2179. `(("ocamlbuild" ,ocamlbuild)))
  2180. (propagated-inputs
  2181. `(("ocaml-astring" ,ocaml-astring)
  2182. ("ocaml-cmdliner" ,ocaml-cmdliner)
  2183. ("ocaml-fmt" ,ocaml-fmt)
  2184. ("ocaml-re" ,ocaml-re)
  2185. ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
  2186. ("ocaml-uuidm" ,ocaml-uuidm)
  2187. ("ocaml-uutf" ,ocaml-uutf)))
  2188. (home-page "https://github.com/mirage/alcotest")
  2189. (synopsis "Lightweight OCaml test framework")
  2190. (description "Alcotest exposes simple interface to perform unit tests. It
  2191. exposes a simple TESTABLE module type, a check function to assert test
  2192. predicates and a run function to perform a list of unit -> unit test callbacks.
  2193. Alcotest provides a quiet and colorful output where only faulty runs are fully
  2194. displayed at the end of the run (with the full logs ready to inspect), with a
  2195. simple (yet expressive) query language to select the tests to run.")
  2196. (license license:isc)))
  2197. (define-public ocaml-ppx-tools
  2198. (package
  2199. (name "ocaml-ppx-tools")
  2200. (version "6.4")
  2201. (source
  2202. (origin
  2203. (method git-fetch)
  2204. (uri (git-reference
  2205. (url "https://github.com/alainfrisch/ppx_tools")
  2206. (commit version)))
  2207. (file-name (git-file-name name version))
  2208. (sha256
  2209. (base32
  2210. "15v7yfv6gyp8lzlgwi9garz10wpg34dk4072jdv19n6v20zfg7n1"))))
  2211. (build-system dune-build-system)
  2212. (arguments
  2213. ;; No tests
  2214. `(#:tests? #f))
  2215. (native-inputs
  2216. `(("ocaml-cppo" ,ocaml-cppo)))
  2217. (properties `((upstream-name . "ppx_tools")))
  2218. (home-page "https://github.com/alainfrisch/ppx_tools")
  2219. (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
  2220. (description
  2221. "Ppx_tools provides tools for authors of ppx rewriters and other
  2222. syntactic tools.")
  2223. (license license:expat)))
  2224. (define-public ocaml-react
  2225. (package
  2226. (name "ocaml-react")
  2227. (version "1.2.1")
  2228. (source
  2229. (origin
  2230. (method url-fetch)
  2231. (uri (string-append "http://erratique.ch/software/react/releases/react-"
  2232. version ".tbz"))
  2233. (sha256 (base32
  2234. "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
  2235. (build-system ocaml-build-system)
  2236. (native-inputs
  2237. `(("ocamlbuild" ,ocamlbuild)
  2238. ("opam" ,opam)
  2239. ("ocaml-topkg" ,ocaml-topkg)))
  2240. (arguments
  2241. `(#:tests? #f
  2242. #:build-flags (list "build")
  2243. #:phases
  2244. (modify-phases %standard-phases
  2245. (delete 'configure))))
  2246. (home-page "https://erratique.ch/software/react")
  2247. (synopsis "Declarative events and signals for OCaml")
  2248. (description "React is an OCaml module for functional reactive programming
  2249. (FRP). It provides support to program with time varying values: declarative
  2250. events and signals. React doesn't define any primitive event or signal, it
  2251. lets the client choose the concrete timeline.")
  2252. (license license:bsd-3)))
  2253. (define-public ocaml-ssl
  2254. (package
  2255. (name "ocaml-ssl")
  2256. (version "0.5.9")
  2257. (source
  2258. (origin
  2259. (method git-fetch)
  2260. (uri (git-reference
  2261. (url "https://github.com/savonet/ocaml-ssl")
  2262. (commit version)))
  2263. (file-name (git-file-name name version))
  2264. (sha256 (base32
  2265. "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"))))
  2266. (build-system dune-build-system)
  2267. (arguments
  2268. `(#:test-target "."))
  2269. (native-inputs
  2270. `(("autoconf" ,autoconf)
  2271. ("automake" ,automake)
  2272. ("which" ,which)))
  2273. (propagated-inputs `(("openssl" ,openssl)))
  2274. (home-page "https://github.com/savonet/ocaml-ssl/")
  2275. (synopsis "OCaml bindings for OpenSSL")
  2276. (description
  2277. "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
  2278. through Transport Layer Security (@dfn{TLS}) encrypted connections.")
  2279. (license license:lgpl2.1)))
  2280. (define-public ocaml-mmap
  2281. (package
  2282. (name "ocaml-mmap")
  2283. (version "1.1.0")
  2284. (source (origin
  2285. (method git-fetch)
  2286. (uri (git-reference
  2287. (url "https://github.com/mirage/mmap")
  2288. (commit (string-append "v" version))))
  2289. (file-name (git-file-name name version))
  2290. (sha256
  2291. (base32
  2292. "1jaismy5d1bhbbanysmr2k79px0yv6ya265dri3949nha1l23i60"))))
  2293. (build-system dune-build-system)
  2294. (home-page "https://github.com/mirage/mmap")
  2295. (synopsis "File mapping for OCaml")
  2296. (description "This project provides a @command{Mmap.map_file} function
  2297. for mapping files in memory. This function is the same as the
  2298. @command{Unix.map_file} function added in OCaml >= 4.06.")
  2299. (license (list license:qpl license:lgpl2.0))))
  2300. (define-public ocaml-lwt
  2301. (package
  2302. (name "ocaml-lwt")
  2303. (version "5.4.0")
  2304. (source
  2305. (origin
  2306. (method git-fetch)
  2307. (uri (git-reference
  2308. (url "https://github.com/ocsigen/lwt")
  2309. (commit version)))
  2310. (file-name (git-file-name name version))
  2311. (sha256 (base32
  2312. "1ay1zgadnw19r9hl2awfjr22n37l7rzxd9v73pjbahavwm2ay65d"))))
  2313. (build-system dune-build-system)
  2314. (arguments
  2315. `(#:package "lwt"))
  2316. (native-inputs
  2317. `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
  2318. ("ocaml-cppo" ,ocaml-cppo)
  2319. ("pkg-config" ,pkg-config)))
  2320. (inputs
  2321. `(("glib" ,glib)))
  2322. (propagated-inputs
  2323. `(("ocaml-mmap" ,ocaml-mmap)
  2324. ("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
  2325. ("ocaml-result" ,ocaml-result)
  2326. ("ocaml-seq" ,ocaml-seq)
  2327. ("libev" ,libev)))
  2328. (home-page "https://github.com/ocsigen/lwt")
  2329. (synopsis "Cooperative threads and I/O in monadic style")
  2330. (description "Lwt provides typed, composable cooperative threads. These
  2331. make it easy to run normally-blocking I/O operations concurrently in a single
  2332. process. Also, in many cases, Lwt threads can interact without the need for
  2333. locks or other synchronization primitives.")
  2334. (license license:lgpl2.1)))
  2335. (define-public ocaml-lwt-react
  2336. (package
  2337. (inherit ocaml-lwt)
  2338. (name "ocaml-lwt-react")
  2339. (version "1.1.3")
  2340. (source (origin
  2341. (method git-fetch)
  2342. (uri (git-reference
  2343. (url "https://github.com/ocsigen/lwt")
  2344. ;; Version from opam
  2345. (commit "4.3.0")))
  2346. (file-name (git-file-name name version))
  2347. (sha256
  2348. (base32
  2349. "0f7036srqz7zmnz0n164734smgkrqz78r1i35cg30x31kkr3pnn4"))))
  2350. (arguments
  2351. `(#:package "lwt_react"))
  2352. (properties `((upstream-name . "lwt_react")))
  2353. (propagated-inputs
  2354. `(("ocaml-lwt" ,ocaml-lwt)
  2355. ("ocaml-react" ,ocaml-react)))))
  2356. (define-public ocaml-lwt-log
  2357. (package
  2358. (name "ocaml-lwt-log")
  2359. (version "1.1.1")
  2360. (source (origin
  2361. (method git-fetch)
  2362. (uri (git-reference
  2363. (url "https://github.com/aantron/lwt_log")
  2364. (commit version)))
  2365. (file-name (git-file-name name version))
  2366. (sha256
  2367. (base32
  2368. "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
  2369. (build-system dune-build-system)
  2370. (arguments
  2371. `(#:tests? #f)); require lwt_ppx
  2372. (propagated-inputs
  2373. `(("lwt" ,ocaml-lwt)))
  2374. (properties `((upstream-name . "lwt_log")))
  2375. (home-page "https://github.com/aantron/lwt_log")
  2376. (synopsis "Logging library")
  2377. (description "This package provides a deprecated logging component for
  2378. ocaml lwt.")
  2379. (license license:lgpl2.1)))
  2380. (define-public ocaml-logs
  2381. (package
  2382. (name "ocaml-logs")
  2383. (version "0.7.0")
  2384. (source (origin
  2385. (method url-fetch)
  2386. (uri (string-append "http://erratique.ch/software/logs/releases/"
  2387. "logs-" version ".tbz"))
  2388. (sha256
  2389. (base32
  2390. "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
  2391. (build-system ocaml-build-system)
  2392. (arguments
  2393. `(#:tests? #f
  2394. #:build-flags (list "build" "--with-js_of_ocaml" "false")
  2395. #:phases
  2396. (modify-phases %standard-phases
  2397. (delete 'configure))))
  2398. (native-inputs
  2399. `(("ocamlbuild" ,ocamlbuild)
  2400. ("opam" ,opam)))
  2401. (propagated-inputs
  2402. `(("fmt" ,ocaml-fmt)
  2403. ("lwt" ,ocaml-lwt)
  2404. ("mtime" ,ocaml-mtime)
  2405. ("result" ,ocaml-result)
  2406. ("cmdliner" ,ocaml-cmdliner)
  2407. ("topkg" ,ocaml-topkg)))
  2408. (home-page "https://erratique.ch/software/logs")
  2409. (synopsis "Logging infrastructure for OCaml")
  2410. (description "Logs provides a logging infrastructure for OCaml. Logging is
  2411. performed on sources whose reporting level can be set independently. Log
  2412. message report is decoupled from logging and is handled by a reporter.")
  2413. (license license:isc)))
  2414. (define-public ocaml-fpath
  2415. (package
  2416. (name "ocaml-fpath")
  2417. (version "0.7.2")
  2418. (source (origin
  2419. (method url-fetch)
  2420. (uri (string-append "http://erratique.ch/software/fpath/releases/"
  2421. "fpath-" version ".tbz"))
  2422. (sha256
  2423. (base32
  2424. "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
  2425. (build-system ocaml-build-system)
  2426. (arguments
  2427. `(#:tests? #f
  2428. #:build-flags (list "build")
  2429. #:phases
  2430. (modify-phases %standard-phases
  2431. (delete 'configure))))
  2432. (native-inputs
  2433. `(("ocamlbuild" ,ocamlbuild)
  2434. ("opam" ,opam)))
  2435. (propagated-inputs
  2436. `(("topkg" ,ocaml-topkg)
  2437. ("astring" ,ocaml-astring)))
  2438. (home-page "https://erratique.ch/software/fpath")
  2439. (synopsis "File system paths for OCaml")
  2440. (description "Fpath is an OCaml module for handling file system paths with
  2441. POSIX or Windows conventions. Fpath processes paths without accessing the
  2442. file system and is independent from any system library.")
  2443. (license license:isc)))
  2444. (define-public ocaml-bos
  2445. (package
  2446. (name "ocaml-bos")
  2447. (version "0.2.1")
  2448. (source (origin
  2449. (method url-fetch)
  2450. (uri (string-append "http://erratique.ch/software/bos/releases/"
  2451. "bos-" version ".tbz"))
  2452. (sha256
  2453. (base32
  2454. "0dwg7lpaq30rvwc5z1gij36fn9xavvpah1bj8ph9gmhhddw2xmnq"))))
  2455. (build-system ocaml-build-system)
  2456. (arguments
  2457. `(#:tests? #f
  2458. #:build-flags (list "build")
  2459. #:phases
  2460. (modify-phases %standard-phases
  2461. (delete 'configure))))
  2462. (native-inputs
  2463. `(("ocamlbuild" ,ocamlbuild)
  2464. ("opam" ,opam)))
  2465. (propagated-inputs
  2466. `(("topkg" ,ocaml-topkg)
  2467. ("astring" ,ocaml-astring)
  2468. ("fmt" ,ocaml-fmt)
  2469. ("fpath" ,ocaml-fpath)
  2470. ("logs" ,ocaml-logs)
  2471. ("rresult" ,ocaml-rresult)))
  2472. (home-page "https://erratique.ch/software/bos")
  2473. (synopsis "Basic OS interaction for OCaml")
  2474. (description "Bos provides support for basic and robust interaction with
  2475. the operating system in OCaml. It has functions to access the process
  2476. environment, parse command line arguments, interact with the file system and
  2477. run command line programs.")
  2478. (license license:isc)))
  2479. (define-public ocaml-xmlm
  2480. (package
  2481. (name "ocaml-xmlm")
  2482. (version "1.3.0")
  2483. (source (origin
  2484. (method url-fetch)
  2485. (uri (string-append "http://erratique.ch/software/xmlm/releases/"
  2486. "xmlm-" version ".tbz"))
  2487. (sha256
  2488. (base32
  2489. "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
  2490. (build-system ocaml-build-system)
  2491. (arguments
  2492. `(#:tests? #f
  2493. #:build-flags (list "build")
  2494. #:phases
  2495. (modify-phases %standard-phases
  2496. (delete 'configure))))
  2497. (native-inputs
  2498. `(("ocamlbuild" ,ocamlbuild)
  2499. ("ocaml-topkg" ,ocaml-topkg)
  2500. ("opam" ,opam)))
  2501. (home-page "https://erratique.ch/software/xmlm")
  2502. (synopsis "Streaming XML codec for OCaml")
  2503. (description "Xmlm is a streaming codec to decode and encode the XML data
  2504. format. It can process XML documents without a complete in-memory
  2505. representation of the data.")
  2506. (license license:isc)))
  2507. (define-public ocaml-gen
  2508. (package
  2509. (name "ocaml-gen")
  2510. (version "0.5.3")
  2511. (source (origin
  2512. (method git-fetch)
  2513. (uri (git-reference
  2514. (url "https://github.com/c-cube/gen")
  2515. (commit version)))
  2516. (file-name (git-file-name name version))
  2517. (sha256
  2518. (base32
  2519. "1jzrs0nsdk55annkd2zrk5svi61i3b1nk6qyqdc2y26vnzqvzfg8"))))
  2520. (build-system dune-build-system)
  2521. (arguments
  2522. `(#:package "gen"
  2523. #:test-target "."))
  2524. (propagated-inputs
  2525. `(("ocaml-odoc" ,ocaml-odoc)))
  2526. (native-inputs
  2527. `(("ocaml-qtest" ,ocaml-qtest)
  2528. ("ocaml-qcheck" ,ocaml-qcheck)))
  2529. (home-page "https://github.com/c-cube/gen/")
  2530. (synopsis "Iterators for OCaml, both restartable and consumable")
  2531. (description "Gen implements iterators of OCaml, that are both restartable
  2532. and consumable.")
  2533. (license license:bsd-2)))
  2534. (define-public ocaml-sedlex
  2535. (package
  2536. (name "ocaml-sedlex")
  2537. (version "2.3")
  2538. (source (origin
  2539. (method git-fetch)
  2540. (uri (git-reference
  2541. (url "https://github.com/ocaml-community/sedlex")
  2542. (commit (string-append "v" version))))
  2543. (file-name (git-file-name name version))
  2544. (sha256
  2545. (base32
  2546. "0iw3phlaqr27jdf857hmj5v5hdl0vngbb2h37p2ll18sw991fxar"))))
  2547. (build-system dune-build-system)
  2548. (arguments
  2549. `(#:tests? #f ; no tests
  2550. #:package "sedlex"
  2551. #:phases
  2552. (modify-phases %standard-phases
  2553. (add-before 'build 'copy-resources
  2554. (lambda* (#:key inputs #:allow-other-keys)
  2555. (with-directory-excursion "src/generator/data"
  2556. ;; Newer versions of dune emit an error if files it wants to
  2557. ;; build already exist. Delete the dune file so dune doesn't
  2558. ;; complain.
  2559. (delete-file "dune")
  2560. (for-each
  2561. (lambda (file)
  2562. (copy-file (assoc-ref inputs file) file))
  2563. '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
  2564. "PropList.txt")))
  2565. #t))
  2566. (add-before 'build 'chmod
  2567. (lambda _
  2568. (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
  2569. #t)))))
  2570. (native-inputs
  2571. `(("ocamlbuild" ,ocamlbuild)))
  2572. (propagated-inputs
  2573. `(("ocaml-gen" ,ocaml-gen)
  2574. ("ocaml-ppxlib" ,ocaml-ppxlib)
  2575. ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
  2576. ("ocaml-uchar" ,ocaml-uchar)))
  2577. ;; These three files are needed by src/generator/data/dune, but would be
  2578. ;; downloaded using curl at build time.
  2579. (inputs
  2580. `(("DerivedCoreProperties.txt"
  2581. ,(origin
  2582. (method url-fetch)
  2583. (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
  2584. (sha256
  2585. (base32
  2586. "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
  2587. ("DerivedGeneralCategory.txt"
  2588. ,(origin
  2589. (method url-fetch)
  2590. (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
  2591. (sha256
  2592. (base32
  2593. "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
  2594. ("PropList.txt"
  2595. ,(origin
  2596. (method url-fetch)
  2597. (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
  2598. (sha256
  2599. (base32
  2600. "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
  2601. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sedlex))))
  2602. (home-page "https://www.cduce.org/download.html#side")
  2603. (synopsis "Lexer generator for Unicode and OCaml")
  2604. (description "Lexer generator for Unicode and OCaml.")
  2605. (license license:expat)))
  2606. (define-public ocaml4.07-sedlex
  2607. (package-with-ocaml4.07
  2608. (package
  2609. (inherit ocaml-sedlex)
  2610. (name "ocaml-sedlex")
  2611. (version "2.1")
  2612. (source (origin
  2613. (method git-fetch)
  2614. (uri (git-reference
  2615. (url "https://github.com/ocaml-community/sedlex")
  2616. (commit (string-append "v" version))))
  2617. (file-name (git-file-name name version))
  2618. (sha256
  2619. (base32
  2620. "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
  2621. (properties '()))))
  2622. (define-public ocaml-uchar
  2623. (package
  2624. (name "ocaml-uchar")
  2625. (version "0.0.2")
  2626. (source
  2627. (origin
  2628. (method url-fetch)
  2629. (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
  2630. version "/uchar-" version ".tbz"))
  2631. (sha256 (base32
  2632. "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
  2633. (build-system ocaml-build-system)
  2634. (arguments
  2635. `(#:tests? #f
  2636. #:build-flags (list "native=true" "native-dynlink=true")
  2637. #:phases
  2638. (modify-phases %standard-phases
  2639. (delete 'configure))))
  2640. (native-inputs
  2641. `(("ocamlbuild" ,ocamlbuild)
  2642. ("opam" ,opam)))
  2643. (home-page "https://github.com/ocaml/uchar")
  2644. (synopsis "Compatibility library for OCaml's Uchar module")
  2645. (description "The uchar package provides a compatibility library for the
  2646. `Uchar` module introduced in OCaml 4.03.")
  2647. (license license:lgpl2.1)))
  2648. (define-public ocaml-uutf
  2649. (package
  2650. (name "ocaml-uutf")
  2651. (version "1.0.1")
  2652. (source (origin
  2653. (method url-fetch)
  2654. (uri (string-append "http://erratique.ch/software/uutf/releases/"
  2655. "uutf-" version ".tbz"))
  2656. (sha256
  2657. (base32
  2658. "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
  2659. (build-system ocaml-build-system)
  2660. (arguments
  2661. `(#:tests? #f
  2662. #:build-flags (list "build")
  2663. #:phases
  2664. (modify-phases %standard-phases
  2665. (delete 'configure))))
  2666. (native-inputs
  2667. `(("ocamlbuild" ,ocamlbuild)
  2668. ("opam" ,opam)
  2669. ("topkg" ,ocaml-topkg)))
  2670. (propagated-inputs
  2671. `(("uchar" ,ocaml-uchar)
  2672. ("cmdliner" ,ocaml-cmdliner)))
  2673. (home-page "https://erratique.ch/software/uutf")
  2674. (synopsis "Non-blocking streaming Unicode codec for OCaml")
  2675. (description "Uutf is a non-blocking streaming codec to decode and encode
  2676. the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
  2677. work character by character without blocking on IO. Decoders perform character
  2678. position tracking and support newline normalization.
  2679. Functions are also provided to fold over the characters of UTF encoded OCaml
  2680. string values and to directly encode characters in OCaml Buffer.t values.")
  2681. (license license:isc)))
  2682. (define-public ocaml-uunf
  2683. (package
  2684. (name "ocaml-uunf")
  2685. (version "13.0.0")
  2686. (source
  2687. (origin
  2688. (method url-fetch)
  2689. (uri "https://erratique.ch/software/uunf/releases/uunf-13.0.0.tbz")
  2690. (sha256
  2691. (base32
  2692. "1qci04nkp24kdls1z4s8kz5dzgky4nwd5r8345nwdrgwmxhw7ksm"))))
  2693. (build-system ocaml-build-system)
  2694. (arguments
  2695. `(#:build-flags (list "build" "--tests" "true")
  2696. #:phases
  2697. (modify-phases %standard-phases
  2698. (delete 'configure)
  2699. (add-before 'check 'check-data
  2700. (lambda* (#:key inputs #:allow-other-keys)
  2701. (copy-file (assoc-ref inputs "NormalizationTest.txt")
  2702. "test/NormalizationTest.txt")
  2703. #t)))))
  2704. (native-inputs
  2705. `(("ocamlbuild" ,ocamlbuild)
  2706. ("opam" ,opam)
  2707. ("topkg" ,ocaml-topkg)
  2708. ;; Test data is otherwise downloaded wit curl
  2709. ("NormalizationTest.txt"
  2710. ,(origin
  2711. (method url-fetch)
  2712. (uri (string-append "https://www.unicode.org/Public/"
  2713. version
  2714. "/ucd/NormalizationTest.txt"))
  2715. (sha256
  2716. (base32 "07g0ya4f6zfzvpp24ccxkb2yq568kh83gls85rjl950nv5fya3nn"))))))
  2717. (propagated-inputs `(("ocaml-uutf" ,ocaml-uutf)))
  2718. (home-page "https://erratique.ch/software/uunf")
  2719. (synopsis "Unicode text normalization for OCaml")
  2720. (description
  2721. "Uunf is an OCaml library for normalizing Unicode text. It supports all
  2722. Unicode normalization forms. The library is independent from any
  2723. IO mechanism or Unicode text data structure and it can process text
  2724. without a complete in-memory representation.")
  2725. (license license:isc)))
  2726. (define-public ocaml-jsonm
  2727. (package
  2728. (name "ocaml-jsonm")
  2729. (version "1.0.1")
  2730. (source (origin
  2731. (method url-fetch)
  2732. (uri (string-append "http://erratique.ch/software/jsonm/releases/"
  2733. "jsonm-" version ".tbz"))
  2734. (sha256
  2735. (base32
  2736. "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
  2737. (build-system ocaml-build-system)
  2738. (arguments
  2739. `(#:tests? #f
  2740. #:build-flags (list "build")
  2741. #:phases
  2742. (modify-phases %standard-phases
  2743. (delete 'configure))))
  2744. (native-inputs
  2745. `(("ocamlbuild" ,ocamlbuild)
  2746. ("opam" ,opam)
  2747. ("topkg" ,ocaml-topkg)))
  2748. (propagated-inputs
  2749. `(("uutf" ,ocaml-uutf)
  2750. ("cmdliner" ,ocaml-cmdliner)))
  2751. (home-page "https://erratique.ch/software/jsonm")
  2752. (synopsis "Non-blocking streaming JSON codec for OCaml")
  2753. (description "Jsonm is a non-blocking streaming codec to decode and encode
  2754. the JSON data format. It can process JSON text without blocking on IO and
  2755. without a complete in-memory representation of the data.")
  2756. (license license:isc)))
  2757. (define-public ocaml-ocp-indent
  2758. (package
  2759. (name "ocaml-ocp-indent")
  2760. (version "1.8.2")
  2761. (source
  2762. (origin
  2763. (method git-fetch)
  2764. (uri (git-reference
  2765. (url "https://github.com/OCamlPro/ocp-indent")
  2766. (commit version)))
  2767. (file-name (git-file-name name version))
  2768. (sha256
  2769. (base32
  2770. "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
  2771. (build-system dune-build-system)
  2772. (arguments
  2773. `(#:test-target "tests"))
  2774. (propagated-inputs
  2775. `(("ocaml-cmdliner" ,ocaml-cmdliner)))
  2776. (home-page "https://www.typerex.org/ocp-indent.html")
  2777. (synopsis "Tool to indent OCaml programs")
  2778. (description
  2779. "Ocp-indent is based on an approximate, tolerant OCaml parser
  2780. and a simple stack machine. Presets and configuration options are available,
  2781. with the possibility to set them project-wide. It supports the most common
  2782. syntax extensions, and it is extensible for others.
  2783. This package includes:
  2784. @itemize
  2785. @item An indentor program, callable from the command-line or from within editors,
  2786. @item Bindings for popular editors,
  2787. @item A library that can be directly used by editor writers, or just for
  2788. fault-tolerant and approximate parsing.
  2789. @end itemize")
  2790. (license license:lgpl2.1)))
  2791. (define-public ocaml-ocp-index
  2792. (package
  2793. (name "ocaml-ocp-index")
  2794. (version "1.2.1")
  2795. (source
  2796. (origin
  2797. (method git-fetch)
  2798. (uri (git-reference
  2799. (url "https://github.com/OCamlPro/ocp-index")
  2800. (commit version)))
  2801. (file-name (git-file-name name version))
  2802. (sha256
  2803. (base32
  2804. "08r7mxdnxmhff37fw4hmrpjgckgi5kaiiiirwp4rmdl594z0h9c8"))))
  2805. (build-system dune-build-system)
  2806. (arguments
  2807. `(#:package "ocp-index"))
  2808. (propagated-inputs
  2809. `(("ocaml-ocp-indent" ,ocaml-ocp-indent)
  2810. ("ocaml-re" ,ocaml-re)
  2811. ("ocaml-cmdliner" ,ocaml-cmdliner)))
  2812. (native-inputs
  2813. `(("ocaml-cppo" ,ocaml-cppo)))
  2814. (home-page "https://www.typerex.org/ocp-index.html")
  2815. (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
  2816. (description "This package includes only the @code{ocp-index} library
  2817. and command-line tool.")
  2818. ;; All files in libs/ are GNU lgpl2.1
  2819. ;; For static linking, clause 6 of LGPL is lifted
  2820. ;; All other files under GNU gpl3
  2821. (license (list license:gpl3+
  2822. license:lgpl2.1+))))
  2823. (define-public ocaml-ocurl
  2824. (package
  2825. (name "ocaml-ocurl")
  2826. (version "0.9.1")
  2827. (source (origin
  2828. (method url-fetch)
  2829. (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
  2830. version ".tar.gz"))
  2831. (sha256
  2832. (base32
  2833. "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"))))
  2834. (build-system ocaml-build-system)
  2835. (arguments
  2836. `(#:phases
  2837. (modify-phases %standard-phases
  2838. (add-before 'configure 'fix-/bin/sh
  2839. (lambda* (#:key inputs #:allow-other-keys)
  2840. (substitute* "configure"
  2841. (("-/bin/sh") (string-append "-" (which "bash")))))))))
  2842. (native-inputs
  2843. `(("pkg-config" ,pkg-config)))
  2844. (inputs `(("curl" ,curl)))
  2845. (home-page "http://ocurl.forge.ocamlcore.org/")
  2846. (synopsis "OCaml bindings for libcurl")
  2847. (description "Client-side URL transfer library, supporting HTTP and a
  2848. multitude of other network protocols (FTP/SMTP/RTSP/etc).")
  2849. (license license:isc)))
  2850. (define-public ocaml-base64
  2851. (package
  2852. (name "ocaml-base64")
  2853. (version "3.5.0")
  2854. (source (origin
  2855. (method git-fetch)
  2856. (uri (git-reference
  2857. (url "https://github.com/mirage/ocaml-base64")
  2858. (commit (string-append "v" version))))
  2859. (file-name (git-file-name name version))
  2860. (sha256
  2861. (base32
  2862. "068hwdbpl7vx9jjpxdc6a10zqd8xa55j3xx7ga6fnwrlfsbs2pjj"))))
  2863. (build-system dune-build-system)
  2864. (native-inputs
  2865. `(("ocaml-alcotest" ,ocaml-alcotest)
  2866. ("ocaml-bos" ,ocaml-bos)
  2867. ("ocaml-rresult" ,ocaml-rresult)))
  2868. (home-page "https://github.com/mirage/ocaml-base64")
  2869. (synopsis "Base64 encoding for OCaml")
  2870. (description "Base64 is a group of similar binary-to-text encoding schemes
  2871. that represent binary data in an ASCII string format by translating it into a
  2872. radix-64 representation. It is specified in RFC 4648.")
  2873. (license license:isc)))
  2874. (define-public ocamlify
  2875. (package
  2876. (name "ocamlify")
  2877. (version "0.0.2")
  2878. (source
  2879. (origin
  2880. (method url-fetch)
  2881. (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
  2882. version "/ocamlify-" version ".tar.gz"))
  2883. (sha256
  2884. (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
  2885. (build-system ocaml-build-system)
  2886. (arguments
  2887. `(#:tests? #f; no tests
  2888. #:phases
  2889. (modify-phases %standard-phases
  2890. (delete 'configure)
  2891. (replace 'build
  2892. ;; This package uses pre-generated setup.ml by oasis, but is
  2893. ;; a dependency of oasis. the pre-generated setup.ml is broken
  2894. ;; with recent versions of OCaml, so we perform a bootstrap instead.
  2895. (lambda _
  2896. (substitute* "src/OCamlifyConfig.ml.ab"
  2897. (("$pkg_version") ,version))
  2898. (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
  2899. (with-directory-excursion "src"
  2900. (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
  2901. "ocamlify"))
  2902. #t))
  2903. (replace 'install
  2904. (lambda* (#:key outputs #:allow-other-keys)
  2905. (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
  2906. (mkdir-p bin)
  2907. (install-file "src/ocamlify" bin)
  2908. #t))))))
  2909. (home-page "https://forge.ocamlcore.org/projects/ocamlify")
  2910. (synopsis "Include files in OCaml code")
  2911. (description "OCamlify creates OCaml source code by including
  2912. whole files into OCaml string or string list. The code generated can be
  2913. compiled as a standard OCaml file. It allows embedding external resources as
  2914. OCaml code.")
  2915. (license license:lgpl2.1+))); with the OCaml static compilation exception
  2916. (define-public omake
  2917. (package
  2918. (name "omake")
  2919. (version "0.10.3")
  2920. (source (origin
  2921. (method url-fetch)
  2922. (uri (string-append "http://download.camlcity.org/download/"
  2923. "omake-" version ".tar.gz"))
  2924. (sha256
  2925. (base32
  2926. "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
  2927. (patches (search-patches "omake-fix-non-determinism.patch"))))
  2928. (build-system ocaml-build-system)
  2929. (arguments
  2930. `(#:make-flags
  2931. ,#~(list (string-append "PREFIX=" #$output))
  2932. #:tests? #f ; no test target
  2933. #:phases
  2934. (modify-phases %standard-phases
  2935. (add-before 'configure 'fix-makefile
  2936. (lambda* (#:key outputs #:allow-other-keys)
  2937. (substitute* "mk/osconfig_unix.mk"
  2938. (("CC = cc") "CC = gcc")))))))
  2939. (native-inputs `(("hevea" ,hevea)))
  2940. (home-page "http://projects.camlcity.org/projects/omake.html")
  2941. (synopsis "Build system designed for scalability and portability")
  2942. (description "Similar to make utilities you may have used, but it features
  2943. many additional enhancements, including:
  2944. @enumerate
  2945. @item Support for projects spanning several directories or directory hierarchies.
  2946. @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
  2947. with full support for incremental builds.
  2948. @item Dependency analysis takes the command lines into account — whenever the
  2949. command line used to build a target changes, the target is considered
  2950. out-of-date.
  2951. @item Fully scriptable, includes a library that providing support for standard
  2952. tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
  2953. @end enumerate")
  2954. (license (list license:lgpl2.1 ; libmojave
  2955. license:expat ; OMake scripts
  2956. license:gpl2)))) ; OMake itself, with ocaml linking exception
  2957. ; see LICENSE.OMake
  2958. (define-public ocaml-batteries
  2959. (package
  2960. (name "ocaml-batteries")
  2961. (version "2.10.0")
  2962. (source (origin
  2963. (method url-fetch)
  2964. (uri (string-append "https://github.com/ocaml-batteries-team/"
  2965. "batteries-included/releases/download/v"
  2966. version "/batteries-" version ".tar.gz"))
  2967. (sha256
  2968. (base32
  2969. "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
  2970. (build-system ocaml-build-system)
  2971. (native-inputs
  2972. `(("ocamlbuild" ,ocamlbuild)
  2973. ("qtest" ,ocaml-qtest)))
  2974. (propagated-inputs
  2975. `(("ocaml-num" ,ocaml-num)))
  2976. (arguments
  2977. `(#:phases
  2978. (modify-phases %standard-phases
  2979. (delete 'check) ; tests are run by the build phase
  2980. (add-before 'build 'fix-nondeterminism
  2981. (lambda _
  2982. (substitute* "setup.ml"
  2983. (("Sys.readdir dirname")
  2984. "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
  2985. #t))
  2986. (replace 'build
  2987. (lambda* (#:key inputs outputs #:allow-other-keys)
  2988. (let ((files
  2989. (map (lambda (str)
  2990. (substring str 0 (- (string-length str) 1)))
  2991. (append
  2992. (find-files "src" ".*.mliv")
  2993. (find-files "src" ".*.mlv")
  2994. (find-files "src" ".*.mlp")))))
  2995. (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
  2996. "-lflag" "-dllpath-all" files)
  2997. (for-each (lambda (file)
  2998. (copy-file (string-append "_build/" file) file))
  2999. files))
  3000. (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
  3001. "-lflag" "-dllpath-all" "build/mkconf.byte")
  3002. (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
  3003. (invoke "make" "all")
  3004. #t)))))
  3005. (home-page "http://batteries.forge.ocamlcore.org/")
  3006. (synopsis "Development platform for the OCaml programming language")
  3007. (description "Define a standard set of libraries which may be expected on
  3008. every compliant installation of OCaml and organize these libraries into a
  3009. hierarchy of modules.")
  3010. (license license:lgpl2.1+)))
  3011. (define-public ocaml-pcre
  3012. (package
  3013. (name "ocaml-pcre")
  3014. (version "7.4.6")
  3015. (source
  3016. (origin
  3017. (method git-fetch)
  3018. (uri (git-reference
  3019. (url "https://github.com/mmottl/pcre-ocaml")
  3020. (commit version)))
  3021. (file-name (git-file-name name version))
  3022. (sha256
  3023. (base32
  3024. "11mck879p5zvkghps4ky8yslm0isgz52d84adl0dmcfxv2ibvcym"))))
  3025. (build-system dune-build-system)
  3026. (arguments
  3027. ;; No tests.
  3028. '(#:tests? #f))
  3029. (propagated-inputs
  3030. `(("dune-configurator" ,dune-configurator)
  3031. ("pcre" ,pcre)))
  3032. (native-inputs
  3033. `(("pcre:bin" ,pcre "bin")))
  3034. (home-page "https://mmottl.github.io/pcre-ocaml")
  3035. (synopsis
  3036. "Bindings to the Perl Compatibility Regular Expressions library")
  3037. (description "Pcre-ocaml offers library functions for string
  3038. pattern matching and substitution, similar to the functionality
  3039. offered by the Perl language.")
  3040. ;; With static linking exception
  3041. (license license:lgpl2.1+)))
  3042. (define-public ocaml-expect
  3043. (package
  3044. (name "ocaml-expect")
  3045. (version "0.0.6")
  3046. (source (origin
  3047. (method url-fetch)
  3048. (uri (ocaml-forge-uri name version 1736))
  3049. (sha256
  3050. (base32
  3051. "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
  3052. (arguments
  3053. `(#:tests? #f))
  3054. (build-system ocaml-build-system)
  3055. (native-inputs
  3056. `(("ocamlbuild" ,ocamlbuild)
  3057. ("ocaml-num" ,ocaml-num)
  3058. ("ocaml-pcre" ,ocaml-pcre)
  3059. ("ounit" ,ocaml-ounit)))
  3060. (propagated-inputs
  3061. `(("batteries" ,ocaml-batteries)))
  3062. (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
  3063. (synopsis "Simple implementation of expect")
  3064. (description "This package provides utilities for building unitary testing
  3065. of interactive program. You can match the question using a regular expression
  3066. or a timeout.")
  3067. (license license:lgpl2.1+))) ; with the OCaml static compilation exception
  3068. (define-public ocaml-stdlib-shims
  3069. (package
  3070. (name "ocaml-stdlib-shims")
  3071. (version "0.1.0")
  3072. (source (origin
  3073. (method git-fetch)
  3074. (uri (git-reference
  3075. (url "https://github.com/ocaml/stdlib-shims")
  3076. (commit version)))
  3077. (file-name (git-file-name name version))
  3078. (sha256
  3079. (base32
  3080. "007dwywsr5285z0np6a9nr0h8iqmyzfrlx6s5xaqcwj69zabsrjm"))))
  3081. (build-system dune-build-system)
  3082. (home-page "https://github.com/ocaml/stdlib-shims")
  3083. (synopsis "OCaml stdlib features backport to older OCaml compilers")
  3084. (description "This package backports some of the new stdlib features to
  3085. older compilers, such as the Stdlib module. This allows projects that require
  3086. compatibility with older compiler to use these new features in their code.")
  3087. ;; with ocaml-linking exception
  3088. (license license:lgpl2.1+)))
  3089. (define-public ocaml-fileutils
  3090. (package
  3091. (name "ocaml-fileutils")
  3092. (version "0.6.2")
  3093. (source (origin
  3094. (method git-fetch)
  3095. (uri (git-reference
  3096. (url "https://github.com/gildor478/ocaml-fileutils")
  3097. (commit (string-append "v" version))))
  3098. (file-name (git-file-name name version))
  3099. (sha256
  3100. (base32
  3101. "01qf51b8pb7vyfba7y0kb7ajwj1950im25d7f59821zwsibns3d9"))))
  3102. (build-system dune-build-system)
  3103. (propagated-inputs
  3104. `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
  3105. (native-inputs
  3106. `(("ocaml-ounit" ,ocaml-ounit)))
  3107. (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
  3108. (synopsis "Pure OCaml functions to manipulate real file and filename")
  3109. (description "Library to provide pure OCaml functions to manipulate real
  3110. file (POSIX like) and filename.")
  3111. (license license:lgpl2.1+))) ; with the OCaml static compilation exception
  3112. (define-public ocaml-oasis
  3113. (package
  3114. (name "ocaml-oasis")
  3115. (version "0.4.11")
  3116. (source (origin
  3117. (method url-fetch)
  3118. (uri (ocaml-forge-uri name version 1757))
  3119. (sha256
  3120. (base32
  3121. "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
  3122. (modules '((guix build utils)))
  3123. (snippet
  3124. '(begin
  3125. (substitute* "test/test-main/Test.ml"
  3126. ;; most of these tests fail because ld cannot find crti.o, but according
  3127. ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
  3128. ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
  3129. (("TestBaseCompat.tests;") "")
  3130. (("TestExamples.tests;") "")
  3131. (("TestFull.tests;") "")
  3132. (("TestPluginDevFiles.tests;") "")
  3133. (("TestPluginInternal.tests;") "")
  3134. (("TestPluginOCamlbuild.tests;") "")
  3135. (("TestPluginOMake.tests;") ""))
  3136. #t))))
  3137. (build-system ocaml-build-system)
  3138. (arguments
  3139. `(#:tests? #f))
  3140. (native-inputs
  3141. `(("ocamlbuild" ,ocamlbuild)
  3142. ("ocamlify" ,ocamlify)
  3143. ("ocamlmod" ,ocamlmod)))
  3144. (home-page "https://oasis.forge.ocamlcore.org")
  3145. (synopsis "Integrates a configure, build, install system in OCaml projects")
  3146. (description "OASIS is a tool to integrate a configure, build and install
  3147. system in your OCaml projects. It helps to create standard entry points in your
  3148. build system and allows external tools to analyse your project easily.")
  3149. (license license:lgpl2.1+))) ; with ocaml static compilation exception
  3150. (define-public ocaml-cppo
  3151. (package
  3152. (name "ocaml-cppo")
  3153. (version "1.6.8")
  3154. (source
  3155. (origin
  3156. (method git-fetch)
  3157. (uri (git-reference
  3158. (url "https://github.com/mjambon/cppo")
  3159. (commit (string-append "v" version))))
  3160. (file-name (git-file-name name version))
  3161. (sha256 (base32
  3162. "0xjb1dnj8lvdcccskrhrakknd9q4vfy5330sjbqpf4h95dsz90k9"))))
  3163. (build-system dune-build-system)
  3164. (arguments
  3165. `(#:tests? #f))
  3166. (native-inputs
  3167. `(("ocamlbuild" ,ocamlbuild)))
  3168. (home-page "https://github.com/mjambon/cppo")
  3169. (synopsis "Equivalent of the C preprocessor for OCaml programs")
  3170. (description "Cppo is an equivalent of the C preprocessor for OCaml
  3171. programs. It allows the definition of simple macros and file inclusion. Cppo is:
  3172. @enumerate
  3173. @item more OCaml-friendly than @command{cpp}
  3174. @item easy to learn without consulting a manual
  3175. @item reasonably fast
  3176. @item simple to install and to maintain.
  3177. @end enumerate")
  3178. (license license:bsd-3)))
  3179. (define-public ocaml-seq
  3180. (package
  3181. (name "ocaml-seq")
  3182. (version "0.1")
  3183. (source
  3184. (origin
  3185. (method git-fetch)
  3186. (uri (git-reference
  3187. (url "https://github.com/c-cube/seq")
  3188. (commit version)))
  3189. (file-name (git-file-name name version))
  3190. (sha256
  3191. (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
  3192. (build-system ocaml-build-system)
  3193. (arguments
  3194. `(#:tests? #f
  3195. #:phases
  3196. (modify-phases %standard-phases
  3197. (delete 'configure)
  3198. (delete 'build)
  3199. (replace 'install
  3200. (lambda* (#:key outputs #:allow-other-keys)
  3201. (let ((install-dir (string-append (assoc-ref outputs "out")
  3202. "/lib/ocaml/site-lib/seq")))
  3203. (mkdir-p install-dir)
  3204. (with-output-to-file (string-append install-dir "/META")
  3205. (lambda _
  3206. (display "name=\"seq\"
  3207. version=\"[distributed with ocaml]\"
  3208. description=\"dummy package for compatibility\"
  3209. requires=\"\"")))
  3210. #t))))))
  3211. (home-page "https://github.com/c-cube/seq")
  3212. (synopsis "OCaml's standard iterator type")
  3213. (description "This package is a compatibility package for OCaml's
  3214. standard iterator type starting from 4.07.")
  3215. (license license:lgpl2.1+)))
  3216. (define-public ocaml-re
  3217. (package
  3218. (name "ocaml-re")
  3219. (version "1.10.3")
  3220. (source
  3221. (origin
  3222. (method git-fetch)
  3223. (uri (git-reference
  3224. (url "https://github.com/ocaml/ocaml-re")
  3225. (commit version)))
  3226. (file-name (git-file-name name version))
  3227. (sha256
  3228. (base32 "1lj94y3zj6qff1yizf311h5ww15djbmnb1g43wd0jz3afa9gk59m"))))
  3229. (build-system dune-build-system)
  3230. (arguments
  3231. `(#:test-target "."))
  3232. (propagated-inputs
  3233. `(("ocaml-seq" ,ocaml-seq)))
  3234. (native-inputs
  3235. `(("ounit" ,ocaml-ounit)))
  3236. (home-page "https://github.com/ocaml/ocaml-re/")
  3237. (synopsis "Regular expression library for OCaml")
  3238. (description "Pure OCaml regular expressions with:
  3239. @enumerate
  3240. @item Perl-style regular expressions (module Re_perl)
  3241. @item Posix extended regular expressions (module Re_posix)
  3242. @item Emacs-style regular expressions (module Re_emacs)
  3243. @item Shell-style file globbing (module Re_glob)
  3244. @item Compatibility layer for OCaml's built-in Str module (module Re_str)
  3245. @end enumerate")
  3246. (license license:expat)))
  3247. (define-public ocaml-ocplib-endian
  3248. (package
  3249. (name "ocaml-ocplib-endian")
  3250. (version "1.0")
  3251. (source (origin
  3252. (method git-fetch)
  3253. (uri (git-reference
  3254. (url "https://github.com/OCamlPro/ocplib-endian/")
  3255. (commit version)))
  3256. (sha256
  3257. (base32
  3258. "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw"))
  3259. (file-name (git-file-name name version))))
  3260. (build-system ocaml-build-system)
  3261. (native-inputs
  3262. `(("cppo" ,ocaml-cppo)
  3263. ("ocamlbuild" ,ocamlbuild)))
  3264. (home-page "https://github.com/OCamlPro/ocplib-endian")
  3265. (synopsis "Optimised functions to read and write int16/32/64 from strings
  3266. and bigarrays")
  3267. (description "Optimised functions to read and write int16/32/64 from strings
  3268. and bigarrays, based on new primitives added in version 4.01. It works on
  3269. strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
  3270. big- and little-endian, with their unsafe counter-parts.")
  3271. (license license:lgpl2.1)))
  3272. (define-public ocaml-cstruct
  3273. (package
  3274. (name "ocaml-cstruct")
  3275. (version "6.0.1")
  3276. (source (origin
  3277. (method git-fetch)
  3278. (uri (git-reference
  3279. (url "https://github.com/mirage/ocaml-cstruct")
  3280. (commit (string-append "v" version))))
  3281. (file-name (git-file-name name version))
  3282. (sha256
  3283. (base32
  3284. "0gpyr3cf393j1ir7i2m2qhx75l21w6ad7imdd73xn0jy3pjg4wsj"))))
  3285. (build-system dune-build-system)
  3286. (arguments
  3287. `(#:package "cstruct"
  3288. #:test-target "."))
  3289. (propagated-inputs
  3290. `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)))
  3291. (native-inputs
  3292. `(("ocaml-alcotest" ,ocaml-alcotest)))
  3293. (home-page "https://github.com/mirage/ocaml-cstruct")
  3294. (synopsis "Access C structures via a camlp4 extension")
  3295. (description "Cstruct is a library and syntax extension to make it easier
  3296. to access C-like structures directly from OCaml. It supports both reading and
  3297. writing to these structures, and they are accessed via the Bigarray module.")
  3298. (license license:isc)))
  3299. (define-public ocaml-hex
  3300. (package
  3301. (name "ocaml-hex")
  3302. (version "1.4.0")
  3303. (source (origin
  3304. (method git-fetch)
  3305. (uri (git-reference
  3306. (url "https://github.com/mirage/ocaml-hex")
  3307. (commit (string-append "v" version))))
  3308. (file-name (git-file-name name version))
  3309. (sha256
  3310. (base32
  3311. "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
  3312. (build-system dune-build-system)
  3313. (arguments
  3314. `(#:test-target "."))
  3315. (propagated-inputs
  3316. `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
  3317. ("cstruct" ,ocaml-cstruct)))
  3318. (home-page "https://github.com/mirage/ocaml-hex/")
  3319. (synopsis "Minimal library providing hexadecimal converters")
  3320. (description "Hex is a minimal library providing hexadecimal converters.")
  3321. (license license:isc)))
  3322. (define-public ocaml4.07-ezjsonm
  3323. (package
  3324. (name "ocaml4.07-ezjsonm")
  3325. (version "1.1.0")
  3326. (source
  3327. (origin
  3328. (method git-fetch)
  3329. (uri (git-reference
  3330. (url "https://github.com/mirage/ezjsonm")
  3331. (commit (string-append "v" version))))
  3332. (file-name (git-file-name name version))
  3333. (sha256
  3334. (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
  3335. (build-system dune-build-system)
  3336. (arguments
  3337. `(#:package "ezjsonm"
  3338. #:test-target "."
  3339. #:ocaml ,ocaml-4.07
  3340. #:findlib ,ocaml4.07-findlib
  3341. #:dune ,ocaml4.07-dune))
  3342. (native-inputs
  3343. `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))))
  3344. (propagated-inputs
  3345. `(("ocaml-hex" ,(package-with-ocaml4.07 ocaml-hex))
  3346. ("ocaml-jsonm" ,(package-with-ocaml4.07 ocaml-jsonm))
  3347. ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))))
  3348. (home-page "https://github.com/mirage/ezjsonm/")
  3349. (synopsis "Read and write JSON data")
  3350. (description "Ezjsonm provides more convenient (but far less flexible) input
  3351. and output functions that go to and from [string] values than jsonm. This avoids
  3352. the need to write signal code, which is useful for quick scripts that manipulate
  3353. JSON.")
  3354. (license license:isc)))
  3355. (define-public ocaml-uri
  3356. (package
  3357. (name "ocaml-uri")
  3358. (version "4.2.0")
  3359. (home-page "https://github.com/mirage/ocaml-uri")
  3360. (source
  3361. (origin
  3362. (method git-fetch)
  3363. (uri (git-reference
  3364. (url home-page)
  3365. (commit (string-append "v" version))))
  3366. (file-name (git-file-name name version))
  3367. (sha256
  3368. (base32
  3369. "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
  3370. (build-system dune-build-system)
  3371. (arguments '(#:package "uri"
  3372. #:test-target "."))
  3373. (propagated-inputs
  3374. `(("ocaml-stringext" ,ocaml-stringext)
  3375. ("ocaml-angstrom" ,ocaml-angstrom)))
  3376. (native-inputs
  3377. `(("ocaml-ounit" ,ocaml-ounit)
  3378. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
  3379. (properties `((upstream-name . "uri")
  3380. (ocaml4.07-variant ,(delay ocaml4.07-uri))))
  3381. (synopsis "RFC3986 URI/URL parsing library")
  3382. (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
  3383. (license license:isc)))
  3384. (define-public ocaml4.07-uri
  3385. (package
  3386. (name "ocaml4.07-uri")
  3387. (version "2.2.0")
  3388. (source
  3389. (origin
  3390. (method git-fetch)
  3391. (uri (git-reference
  3392. (url "https://github.com/mirage/ocaml-uri")
  3393. (commit (string-append "v" version))))
  3394. (file-name (git-file-name name version))
  3395. (sha256
  3396. (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
  3397. (build-system dune-build-system)
  3398. (arguments
  3399. `(#:test-target "."
  3400. #:phases
  3401. (modify-phases %standard-phases
  3402. (add-before 'build 'update-deprecated
  3403. (lambda _
  3404. (substitute* "lib/uri.ml"
  3405. (("Re.get") "Re.Group.get")))))
  3406. #:ocaml ,ocaml-4.07
  3407. #:findlib ,ocaml4.07-findlib
  3408. #:dune ,ocaml4.07-dune))
  3409. (native-inputs
  3410. `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
  3411. ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))))
  3412. (propagated-inputs
  3413. `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
  3414. ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
  3415. ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
  3416. (properties `((upstream-name . "uri")))
  3417. (home-page "https://github.com/mirage/ocaml-uri")
  3418. (synopsis "RFC3986 URI/URL parsing library")
  3419. (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
  3420. (license license:isc)))
  3421. (define-public ocaml-easy-format
  3422. (package
  3423. (name "ocaml-easy-format")
  3424. (version "1.3.2")
  3425. (source (origin
  3426. (method git-fetch)
  3427. (uri (git-reference
  3428. (url "https://github.com/mjambon/easy-format")
  3429. (commit version)))
  3430. (file-name (git-file-name name version))
  3431. (sha256
  3432. (base32
  3433. "1fc95q2ypck6m6rv3kiawwilh5ac93v2hcp823mj608d5kj79xkb"))))
  3434. (build-system dune-build-system)
  3435. (arguments
  3436. `(#:package "easy-format"
  3437. #:phases
  3438. (modify-phases %standard-phases
  3439. (add-before 'build 'make-writable
  3440. (lambda _
  3441. (for-each
  3442. (lambda (file)
  3443. (chmod file #o644))
  3444. (find-files "." "."))
  3445. #t)))))
  3446. (home-page "https://github.com/mjambon/easy-format")
  3447. (synopsis "Interface to the Format module")
  3448. (description "Easy-format is a high-level and functional interface to the
  3449. Format module of the OCaml standard library.")
  3450. (license license:bsd-3)))
  3451. (define-public ocaml4.07-piqilib
  3452. (package
  3453. (name "ocaml4.07-piqilib")
  3454. (version "0.6.15")
  3455. (source
  3456. (origin
  3457. (method git-fetch)
  3458. (uri (git-reference
  3459. (url "https://github.com/alavrik/piqi")
  3460. (commit (string-append "v" version))))
  3461. (file-name (git-file-name name version))
  3462. (sha256
  3463. (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
  3464. (build-system ocaml-build-system)
  3465. (arguments
  3466. `(#:phases
  3467. (modify-phases %standard-phases
  3468. (add-before 'configure 'fix-ocamlpath
  3469. (lambda _
  3470. (substitute* '("Makefile" "make/Makefile.ocaml")
  3471. (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
  3472. #t))
  3473. (replace 'configure
  3474. (lambda* (#:key outputs #:allow-other-keys)
  3475. (let ((out (assoc-ref outputs "out")))
  3476. (substitute* "make/OCamlMakefile"
  3477. (("/bin/sh") (which "bash")))
  3478. (invoke "./configure" "--prefix" out "--ocaml-libdir"
  3479. (string-append out "/lib/ocaml/site-lib")))
  3480. #t))
  3481. (add-after 'build 'build-ocaml
  3482. (lambda* (#:key outputs #:allow-other-keys)
  3483. (invoke "make" "ocaml")
  3484. #t))
  3485. (add-after 'install 'install-ocaml
  3486. (lambda* (#:key outputs #:allow-other-keys)
  3487. (invoke "make" "ocaml-install")
  3488. #t))
  3489. (add-after 'install-ocaml 'link-stubs
  3490. (lambda* (#:key outputs #:allow-other-keys)
  3491. (let* ((out (assoc-ref outputs "out"))
  3492. (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
  3493. (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
  3494. (mkdir-p stubs)
  3495. (symlink (string-append lib "/dllpiqilib_stubs.so")
  3496. (string-append stubs "/dllpiqilib_stubs.so"))
  3497. #t))))
  3498. #:ocaml ,ocaml-4.07
  3499. #:findlib ,ocaml4.07-findlib))
  3500. (native-inputs
  3501. `(("which" ,which)))
  3502. (propagated-inputs
  3503. `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm))
  3504. ("ocaml-sedlex" ,(package-with-ocaml4.07 ocaml-sedlex))
  3505. ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))
  3506. ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64))))
  3507. (home-page "http://piqi.org")
  3508. (synopsis "Data serialization and conversion library")
  3509. (description "Piqilib is the common library used by the piqi command-line
  3510. tool and piqi-ocaml.")
  3511. (license license:asl2.0)))
  3512. (define-public ocaml-uuidm
  3513. (package
  3514. (name "ocaml-uuidm")
  3515. (version "0.9.7")
  3516. (source (origin
  3517. (method url-fetch)
  3518. (uri (string-append "http://erratique.ch/software/uuidm/"
  3519. "releases/uuidm-" version ".tbz"))
  3520. (sha256
  3521. (base32
  3522. "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"))))
  3523. (build-system ocaml-build-system)
  3524. (arguments
  3525. `(#:build-flags
  3526. (list "build" "--tests" "true" "--with-cmdliner" "true")
  3527. #:phases
  3528. (modify-phases %standard-phases
  3529. (delete 'configure))))
  3530. (native-inputs
  3531. `(("ocamlbuild" ,ocamlbuild)
  3532. ("opam" ,opam)))
  3533. (propagated-inputs
  3534. `(("cmdliner" ,ocaml-cmdliner)
  3535. ("topkg" ,ocaml-topkg)))
  3536. (home-page "https://erratique.ch/software/uuidm")
  3537. (synopsis "Universally unique identifiers for OCaml")
  3538. (description "Uuidm is an OCaml module implementing 128 bits universally
  3539. unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
  3540. and 4 (random based) according to RFC 4122.")
  3541. (license license:isc)))
  3542. (define-public ocaml-graph
  3543. (package
  3544. (name "ocaml-graph")
  3545. (version "1.8.8")
  3546. (source (origin
  3547. (method url-fetch)
  3548. (uri (string-append "http://ocamlgraph.lri.fr/download/"
  3549. "ocamlgraph-" version ".tar.gz"))
  3550. (sha256
  3551. (base32
  3552. "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
  3553. (build-system ocaml-build-system)
  3554. (arguments
  3555. `(#:install-target "install-findlib"
  3556. #:tests? #f
  3557. #:phases
  3558. (modify-phases %standard-phases
  3559. (add-before 'configure 'set-shell
  3560. (lambda* (#:key inputs #:allow-other-keys)
  3561. (setenv "CONFIG_SHELL"
  3562. (search-input-file inputs "/bin/sh")))))))
  3563. (inputs `(("lablgtk" ,lablgtk)))
  3564. (properties `((upstream-name . "ocamlgraph")))
  3565. (home-page "http://ocamlgraph.lri.fr/")
  3566. (synopsis "Graph library for OCaml")
  3567. (description "OCamlgraph is a generic graph library for OCaml.")
  3568. (license license:lgpl2.1)))
  3569. (define-public ocaml4.07-piqi
  3570. (package
  3571. (name "ocaml4.07-piqi")
  3572. (version "0.7.7")
  3573. (source (origin
  3574. (method git-fetch)
  3575. (uri (git-reference
  3576. (url "https://github.com/alavrik/piqi-ocaml")
  3577. (commit (string-append "v" version))))
  3578. (file-name (git-file-name name version))
  3579. (sha256
  3580. (base32
  3581. "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
  3582. (build-system ocaml-build-system)
  3583. (arguments
  3584. `(#:make-flags
  3585. ,#~(list (string-append "DESTDIR=" #$output)
  3586. (string-append "SHELL="
  3587. #+(file-append (canonical-package bash-minimal)
  3588. "/bin/sh")))
  3589. #:phases
  3590. (modify-phases %standard-phases
  3591. (add-after 'unpack 'make-files-writable
  3592. (lambda _
  3593. (for-each make-file-writable (find-files "."))
  3594. #t))
  3595. (delete 'configure))
  3596. #:ocaml ,ocaml-4.07
  3597. #:findlib ,ocaml4.07-findlib))
  3598. (native-inputs
  3599. `(("which" ,which)
  3600. ("protobuf" ,protobuf))) ; for tests
  3601. (propagated-inputs
  3602. `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
  3603. ("ocaml-piqilib" ,ocaml4.07-piqilib)
  3604. ("ocaml-stdlib-shims" ,(package-with-ocaml4.07 ocaml-stdlib-shims))))
  3605. (home-page "https://github.com/alavrik/piqi-ocaml")
  3606. (synopsis "Protocol serialization system for OCaml")
  3607. (description "Piqi is a multi-format data serialization system for OCaml.
  3608. It provides a uniform interface for serializing OCaml data structures to JSON,
  3609. XML and Protocol Buffers formats.")
  3610. (license license:asl2.0)))
  3611. (define-public bap
  3612. (package
  3613. (name "bap")
  3614. (version "2.0.0")
  3615. (home-page "https://github.com/BinaryAnalysisPlatform/bap")
  3616. (source (origin
  3617. (method git-fetch)
  3618. (uri (git-reference
  3619. (url home-page)
  3620. (commit (string-append "v" version))))
  3621. (file-name (git-file-name name version))
  3622. (sha256
  3623. (base32
  3624. "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
  3625. (build-system ocaml-build-system)
  3626. (native-inputs
  3627. `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
  3628. ("clang" ,clang-3.8)
  3629. ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
  3630. (propagated-inputs
  3631. `(("camlzip" ,(package-with-ocaml4.07 camlzip))
  3632. ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
  3633. ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
  3634. ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
  3635. ("ocaml-ezjsonm" ,ocaml4.07-ezjsonm)
  3636. ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
  3637. ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
  3638. ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
  3639. ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
  3640. ("ocaml-piqi" ,ocaml4.07-piqi)
  3641. ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
  3642. ("ocaml-utop" ,ocaml4.07-utop)
  3643. ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
  3644. ("ocaml-uri" ,ocaml4.07-uri)
  3645. ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
  3646. (inputs
  3647. `(("gmp" ,gmp)
  3648. ("llvm" ,llvm-3.8)
  3649. ("ncurses" ,ncurses)))
  3650. (arguments
  3651. `(#:use-make? #t
  3652. #:phases
  3653. (modify-phases %standard-phases
  3654. (add-before 'configure 'fix-ncurses
  3655. (lambda _
  3656. (substitute* "oasis/llvm"
  3657. (("-lcurses") "-lncurses"))
  3658. #t))
  3659. (replace 'configure
  3660. (lambda* (#:key outputs inputs #:allow-other-keys)
  3661. ;; add write for user, to prevent a failure in the install phase
  3662. (for-each
  3663. (lambda (file)
  3664. (let ((stat (stat file)))
  3665. (chmod file (+ #o200 (stat:mode stat)))))
  3666. (find-files "." "."))
  3667. (invoke "./configure" "--prefix"
  3668. (assoc-ref outputs "out")
  3669. "--libdir"
  3670. (string-append
  3671. (assoc-ref outputs "out")
  3672. "/lib/ocaml/site-lib")
  3673. "--with-llvm-version=3.8"
  3674. "--with-llvm-config=llvm-config"
  3675. "--enable-everything"))))
  3676. #:ocaml ,ocaml-4.07
  3677. #:findlib ,ocaml4.07-findlib))
  3678. (synopsis "Binary Analysis Platform")
  3679. (description "Binary Analysis Platform is a framework for writing program
  3680. analysis tools, that target binary files. The framework consists of a plethora
  3681. of libraries, plugins, and frontends. The libraries provide code reusability,
  3682. the plugins facilitate extensibility, and the frontends serve as entry points.")
  3683. (license license:expat)))
  3684. (define-public ocaml-camomile
  3685. (package
  3686. (name "ocaml-camomile")
  3687. (version "1.0.2")
  3688. (home-page "https://github.com/yoriyuki/Camomile")
  3689. (source (origin
  3690. (method url-fetch)
  3691. (uri (string-append home-page "/releases/download/" version
  3692. "/camomile-" version ".tbz"))
  3693. (sha256
  3694. (base32
  3695. "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
  3696. (build-system dune-build-system)
  3697. (arguments
  3698. `(#:test-target "camomile-test"
  3699. #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
  3700. #:phases
  3701. (modify-phases %standard-phases
  3702. (add-before 'build 'fix-usr-share
  3703. (lambda* (#:key outputs #:allow-other-keys)
  3704. (substitute* '("Camomile/dune" "configure.ml")
  3705. (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
  3706. #t)))))
  3707. (synopsis "Comprehensive Unicode library")
  3708. (description "Camomile is a Unicode library for OCaml. Camomile provides
  3709. Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
  3710. 200 encodings, collation and locale-sensitive case mappings, and more. The
  3711. library is currently designed for Unicode Standard 3.2.")
  3712. ;; with an exception for linked libraries to use a different license
  3713. (license license:lgpl2.0+)))
  3714. (define-public ocaml4.07-charinfo-width
  3715. (package
  3716. (name "ocaml4.07-charinfo-width")
  3717. (version "1.1.0")
  3718. (source (origin
  3719. (method url-fetch)
  3720. (uri (string-append "https://bitbucket.org/zandoye/charinfo_width"
  3721. "/get/" version ".tar.gz"))
  3722. (file-name (string-append name "-" version ".tar.gz"))
  3723. (sha256
  3724. (base32
  3725. "00bv4p1yqs8y0z4z07wd9w9yyv669dikp9b04dcjbwpiy2wy0086"))))
  3726. (build-system dune-build-system)
  3727. (arguments
  3728. `(#:ocaml ,ocaml-4.07
  3729. #:findlib ,ocaml4.07-findlib
  3730. #:dune ,ocaml4.07-dune))
  3731. (propagated-inputs
  3732. `(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
  3733. ("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))))
  3734. (native-inputs
  3735. `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))))
  3736. (properties
  3737. `((upstream-name . "charInfo_width")))
  3738. (home-page "https://bitbucket.org/zandoye/charinfo_width/")
  3739. (synopsis "Determine column width for a character")
  3740. (description "This module is implements purely in OCaml a character width
  3741. function that follows the prototype of POSIX's wcwidth.")
  3742. (license license:expat)))
  3743. (define-public ocaml4.07-zed
  3744. (package
  3745. (name "ocaml4.07-zed")
  3746. (version "2.0.3")
  3747. (source
  3748. (origin
  3749. (method git-fetch)
  3750. (uri (git-reference
  3751. (url "https://github.com/diml/zed")
  3752. (commit version)))
  3753. (file-name (git-file-name name version))
  3754. (sha256
  3755. (base32 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
  3756. (build-system dune-build-system)
  3757. (arguments
  3758. `(#:test-target "."
  3759. #:ocaml ,ocaml-4.07
  3760. #:findlib ,ocaml4.07-findlib
  3761. #:dune ,ocaml4.07-dune))
  3762. (propagated-inputs
  3763. `(("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))
  3764. ("ocaml-charinfo-width" ,ocaml4.07-charinfo-width)
  3765. ("ocaml-react" ,(package-with-ocaml4.07 ocaml-react))))
  3766. (home-page "https://github.com/diml/zed")
  3767. (synopsis "Abstract engine for text editing in OCaml")
  3768. (description "Zed is an abstract engine for text edition. It can be used
  3769. to write text editors, edition widgets, readlines, etc. You just have to
  3770. connect an engine to your inputs and rendering functions to get an editor.")
  3771. (license license:bsd-3)))
  3772. (define-public ocaml4.07-lambda-term
  3773. (package
  3774. (name "ocaml4.07-lambda-term")
  3775. (version "2.0.2")
  3776. (source
  3777. (origin
  3778. (method git-fetch)
  3779. (uri (git-reference
  3780. (url "https://github.com/diml/lambda-term")
  3781. (commit version)))
  3782. (file-name (git-file-name name version))
  3783. (sha256
  3784. (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
  3785. (build-system dune-build-system)
  3786. (arguments
  3787. `(#:tests? #f
  3788. #:ocaml ,ocaml-4.07
  3789. #:findlib ,ocaml4.07-findlib
  3790. #:dune ,ocaml4.07-dune))
  3791. (propagated-inputs
  3792. `(("ocaml-lwt" ,(package-with-ocaml4.07 ocaml-lwt))
  3793. ("ocaml-lwt-log" ,(package-with-ocaml4.07 ocaml-lwt-log))
  3794. ("ocaml-lwt-react" ,(package-with-ocaml4.07 ocaml-lwt-react))
  3795. ("ocaml-zed" ,ocaml4.07-zed)))
  3796. (home-page "https://github.com/diml/lambda-term")
  3797. (synopsis "Terminal manipulation library for OCaml")
  3798. (description "Lambda-Term is a cross-platform library for manipulating the
  3799. terminal. It provides an abstraction for keys, mouse events, colors, as well as
  3800. a set of widgets to write curses-like applications. The main objective of
  3801. Lambda-Term is to provide a higher level functional interface to terminal
  3802. manipulation than, for example, ncurses, by providing a native OCaml interface
  3803. instead of bindings to a C library.")
  3804. (license license:bsd-3)))
  3805. (define-public ocaml4.07-utop
  3806. (package
  3807. (name "ocaml4.07-utop")
  3808. (version "2.4.3")
  3809. (source
  3810. (origin
  3811. (method git-fetch)
  3812. (uri (git-reference
  3813. (url "https://github.com/ocaml-community/utop")
  3814. (commit version)))
  3815. (file-name (git-file-name name version))
  3816. (sha256
  3817. (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
  3818. (build-system dune-build-system)
  3819. (arguments
  3820. `(#:test-target "."
  3821. #:ocaml ,ocaml-4.07
  3822. #:findlib ,ocaml4.07-findlib
  3823. #:dune ,ocaml4.07-dune))
  3824. (native-inputs
  3825. `(("cppo" ,(package-with-ocaml4.07 ocaml-cppo))))
  3826. (propagated-inputs
  3827. `(("lambda-term" ,ocaml4.07-lambda-term)
  3828. ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
  3829. ("react" ,(package-with-ocaml4.07 ocaml-react))
  3830. ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
  3831. ("zed" ,ocaml4.07-zed)))
  3832. (home-page "https://github.com/ocaml-community/utop")
  3833. (synopsis "Improved interface to the OCaml toplevel")
  3834. (description "UTop is an improved toplevel for OCaml. It can run in a
  3835. terminal or in Emacs. It supports line editing, history, real-time and context
  3836. sensitive completion, colors, and more.")
  3837. (license license:bsd-3)))
  3838. (define-public ocaml-integers
  3839. (package
  3840. (name "ocaml-integers")
  3841. (version "0.4.0")
  3842. (home-page "https://github.com/ocamllabs/ocaml-integers")
  3843. (source (origin
  3844. (method git-fetch)
  3845. (uri (git-reference
  3846. (url home-page)
  3847. (commit version)))
  3848. (file-name (git-file-name name version))
  3849. (sha256
  3850. (base32
  3851. "0yp3ab0ph7mp5741g7333x4nx8djjvxzpnv3zvsndyzcycspn9dd"))))
  3852. (build-system dune-build-system)
  3853. (arguments
  3854. `(#:tests? #f)) ; no tests
  3855. (synopsis "Various signed and unsigned integer types for OCaml")
  3856. (description "The ocaml-integers library provides a number of 8-, 16-, 32-
  3857. and 64-bit signed and unsigned integer types, together with aliases such as
  3858. long and size_t whose sizes depend on the host platform.")
  3859. (license license:expat)))
  3860. (define-public ocaml-ctypes
  3861. (package
  3862. (name "ocaml-ctypes")
  3863. (version "0.19.1")
  3864. (home-page "https://github.com/ocamllabs/ocaml-ctypes")
  3865. (source (origin
  3866. (method git-fetch)
  3867. (uri (git-reference
  3868. (url home-page)
  3869. (commit version)))
  3870. (file-name (git-file-name name version))
  3871. (sha256
  3872. (base32
  3873. "1xi1a486gssrb23zln3sf7zn0rmyl1k684bdf9iqkhgpz607fq6s"))))
  3874. (build-system ocaml-build-system)
  3875. (arguments
  3876. `(#:make-flags
  3877. (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
  3878. #:phases
  3879. (modify-phases %standard-phases
  3880. (add-after 'unpack 'make-writable
  3881. (lambda _
  3882. (for-each make-file-writable
  3883. (find-files "."))))
  3884. (delete 'configure))))
  3885. (native-inputs
  3886. `(("pkg-config" ,pkg-config)
  3887. ("ounit" ,ocaml-ounit)
  3888. ("lwt" ,ocaml-lwt)))
  3889. (propagated-inputs
  3890. `(("bigarray-compat" ,ocaml-bigarray-compat)
  3891. ("integers" ,ocaml-integers)))
  3892. (inputs
  3893. `(("libffi" ,libffi)))
  3894. (synopsis "Library for binding to C libraries using pure OCaml")
  3895. (description "Ctypes is a library for binding to C libraries using pure
  3896. OCaml. The primary aim is to make writing C extensions as straightforward as
  3897. possible. The core of ctypes is a set of combinators for describing the
  3898. structure of C types -- numeric types, arrays, pointers, structs, unions and
  3899. functions. You can use these combinators to describe the types of the
  3900. functions that you want to call, then bind directly to those functions -- all
  3901. without writing or generating any C!")
  3902. (license license:expat)))
  3903. (define-public ocaml-ocb-stubblr
  3904. (package
  3905. (name "ocaml-ocb-stubblr")
  3906. (version "0.1.1")
  3907. (home-page "https://github.com/pqwy/ocb-stubblr")
  3908. (source (origin
  3909. (method url-fetch)
  3910. (uri (string-append
  3911. home-page "/releases/download/v0.1.1/ocb-stubblr-"
  3912. version ".tbz"))
  3913. (file-name (string-append name "-" version ".tbz"))
  3914. (sha256
  3915. (base32
  3916. "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
  3917. (build-system ocaml-build-system)
  3918. (arguments
  3919. `(#:build-flags (list "build" "--tests" "true")
  3920. #:phases
  3921. (modify-phases %standard-phases
  3922. (delete 'configure)
  3923. (add-before 'build 'fix-for-guix
  3924. (lambda _
  3925. (substitute* "src/ocb_stubblr.ml"
  3926. ;; Do not fail when opam is not present or initialized
  3927. (("error_msgf \"error running opam\"") "\"\"")
  3928. ;; Guix doesn't have cc, but it has gcc
  3929. (("\"cc\"") "\"gcc\""))
  3930. #t)))))
  3931. (inputs
  3932. `(("topkg" ,ocaml-topkg)
  3933. ("opam" ,opam)))
  3934. (native-inputs
  3935. `(("astring" ,ocaml-astring)
  3936. ("ocamlbuild" ,ocamlbuild)))
  3937. (synopsis "OCamlbuild plugin for C stubs")
  3938. (description "Ocb-stubblr is about ten lines of code that you need to
  3939. repeat over, over, over and over again if you are using ocamlbuild to build
  3940. OCaml projects that contain C stubs.")
  3941. (license license:isc)))
  3942. (define-public ocaml-tsdl
  3943. (package
  3944. (name "ocaml-tsdl")
  3945. (version "0.9.7")
  3946. (home-page "https://erratique.ch/software/tsdl")
  3947. (source (origin
  3948. (method url-fetch)
  3949. (uri (string-append home-page "/releases/tsdl-"
  3950. version ".tbz"))
  3951. (file-name (string-append name "-" version ".tar.gz"))
  3952. (sha256
  3953. (base32
  3954. "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"))))
  3955. (build-system ocaml-build-system)
  3956. (arguments
  3957. `(#:build-flags '("build")
  3958. #:tests? #f; tests require a display device
  3959. #:phases
  3960. (modify-phases %standard-phases
  3961. (delete 'configure))))
  3962. (native-inputs
  3963. `(("ocamlbuild" ,ocamlbuild)
  3964. ("ocaml-astring" ,ocaml-astring)
  3965. ("opam" ,opam)
  3966. ("pkg-config" ,pkg-config)))
  3967. (inputs
  3968. `(("topkg" ,ocaml-topkg)
  3969. ("sdl2" ,sdl2)
  3970. ("integers" ,ocaml-integers)
  3971. ("ctypes" ,ocaml-ctypes)))
  3972. (synopsis "Thin bindings to SDL for OCaml")
  3973. (description "Tsdl is an OCaml library providing thin bindings to the
  3974. cross-platform SDL C library.")
  3975. (license license:isc)))
  3976. (define-public dedukti
  3977. (package
  3978. (name "dedukti")
  3979. (version "2.6.0")
  3980. (home-page "https://deducteam.github.io/")
  3981. (source
  3982. (origin
  3983. (method git-fetch)
  3984. (uri (git-reference
  3985. (url "https://github.com/deducteam/dedukti")
  3986. (commit (string-append "v" version))))
  3987. (file-name (git-file-name name version))
  3988. (sha256
  3989. (base32
  3990. "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
  3991. (inputs
  3992. `(("menhir" ,ocaml-menhir)))
  3993. (native-inputs
  3994. `(("ocamlbuild" ,ocamlbuild)))
  3995. (build-system ocaml-build-system)
  3996. (arguments
  3997. `(#:phases
  3998. ,#~(modify-phases %standard-phases
  3999. (delete 'configure)
  4000. (replace 'build
  4001. (lambda _
  4002. (invoke "make")))
  4003. (replace 'check
  4004. (lambda _
  4005. (invoke "make" "tests")))
  4006. (add-before 'install 'set-binpath
  4007. ;; Change binary path in the makefile
  4008. (lambda _
  4009. (substitute* "GNUmakefile"
  4010. (("BINDIR = (.*)$")
  4011. (string-append "BINDIR = " #$output "/bin")))))
  4012. (replace 'install
  4013. (lambda _
  4014. (invoke "make" "install"))))))
  4015. (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
  4016. the λ-calculus")
  4017. (description "Dedukti is a proof-checker for the λΠ-calculus modulo
  4018. theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
  4019. dependent types. The λΠ-calculus modulo theory is itself an extension of the
  4020. λΠ-calculus where the context contains variable declaration as well as rewrite
  4021. rules. This system is not designed to develop proofs, but to check proofs
  4022. developed in other systems. In particular, it enjoys a minimalistic syntax.")
  4023. (license license:cecill-c)))
  4024. (define-public emacs-dedukti-mode
  4025. (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
  4026. (package
  4027. (name "emacs-dedukti-mode")
  4028. (version (git-version "0" "0" commit))
  4029. (home-page "https://github.com/rafoo/dedukti-mode")
  4030. (source (origin
  4031. (method git-fetch)
  4032. (uri (git-reference
  4033. (url home-page)
  4034. (commit commit)))
  4035. (sha256
  4036. (base32
  4037. "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
  4038. (file-name (git-file-name name version))))
  4039. (inputs
  4040. `(("dedukti" ,dedukti)))
  4041. (build-system emacs-build-system)
  4042. (arguments
  4043. '(#:phases
  4044. (modify-phases %standard-phases
  4045. (add-before 'install 'patch-dkpath
  4046. (lambda _
  4047. (let ((dkcheck-path (which "dkcheck")))
  4048. (substitute* "dedukti-mode.el"
  4049. (("dedukti-path \"(.*)\"")
  4050. (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
  4051. (synopsis "Emacs major mode for Dedukti files")
  4052. (description "This package provides an Emacs major mode for editing
  4053. Dedukti files.")
  4054. (license license:cecill-b))))
  4055. (define-public emacs-flycheck-dedukti
  4056. (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
  4057. (package
  4058. (name "emacs-flycheck-dedukti")
  4059. (version (git-version "0" "0" commit))
  4060. (home-page "https://github.com/rafoo/flycheck-dedukti")
  4061. (source (origin
  4062. (method git-fetch)
  4063. (uri (git-reference
  4064. (url home-page)
  4065. (commit commit)))
  4066. (sha256
  4067. (base32
  4068. "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
  4069. (file-name (git-file-name name version))))
  4070. (build-system emacs-build-system)
  4071. (inputs
  4072. `(("dedukti-mode" ,emacs-dedukti-mode)
  4073. ("flycheck-mode" ,emacs-flycheck)))
  4074. (synopsis "Flycheck integration for the dedukti language")
  4075. (description "This package provides a frontend for Flycheck to perform
  4076. syntax checking on dedukti files.")
  4077. (license license:cecill-b))))
  4078. (define-public ocaml-jst-config
  4079. (package
  4080. (name "ocaml-jst-config")
  4081. (version "0.14.0")
  4082. (source
  4083. (janestreet-origin
  4084. "jst-config" version
  4085. "1fppr29vn91zpqda8jlnp8bcssd4bf3rn36ig8fnd1yhjrsvz8f6"))
  4086. (build-system dune-build-system)
  4087. (arguments '(#:tests? #f)) ; no tests
  4088. (propagated-inputs
  4089. `(("ocaml-base" ,ocaml-base)
  4090. ("ocaml-ppx-assert" ,ocaml-ppx-assert)
  4091. ("ocaml-stdio" ,ocaml-stdio)
  4092. ("dune-configurator" ,dune-configurator)))
  4093. (home-page "https://github.com/janestreet/jst-config")
  4094. (synopsis "Compile-time configuration for Jane Street libraries")
  4095. (description "Defines compile-time constants used in Jane Street libraries
  4096. such as Base, Core, and Async. This package has an unstable interface; it is
  4097. intended only to share configuration between different packages from Jane
  4098. Street. Future updates may not be backward-compatible, and we do not
  4099. recommend using this package directly.")
  4100. (license license:expat)))
  4101. (define-public ocaml-jane-street-headers
  4102. (package
  4103. (name "ocaml-jane-street-headers")
  4104. (version "0.14.0")
  4105. (source
  4106. (janestreet-origin
  4107. "jane-street-headers" version
  4108. "028yxb4h3iy025iy89v8653m5brh7flrjshghs4x99pd690pmfs7"))
  4109. (build-system dune-build-system)
  4110. (arguments '(#:tests? #f)) ; no tests
  4111. (home-page "https://github.com/janestreet/jane-street-headers")
  4112. (synopsis "Jane Street C header files")
  4113. (description "C header files shared between the various Jane Street
  4114. packages.")
  4115. (license license:expat)))
  4116. (define-public ocaml-time-now
  4117. (package
  4118. (name "ocaml-time-now")
  4119. (version "0.14.0")
  4120. (source
  4121. (janestreet-origin
  4122. "time_now" version
  4123. "0hkn2jw4dz5gflnsblskl5wp6z7zbrahwjmaxmsskfviwjg82cqh"))
  4124. (build-system dune-build-system)
  4125. (arguments '(#:tests? #f)) ; no tests
  4126. (propagated-inputs
  4127. `(("ocaml-base" ,ocaml-base)
  4128. ("ocaml-jane-street-headers" ,ocaml-jane-street-headers)
  4129. ("ocaml-jst-config" ,ocaml-jst-config)
  4130. ("ocaml-ppx-base" ,ocaml-ppx-base)
  4131. ("ocaml-ppx-optcomp" ,ocaml-ppx-optcomp)))
  4132. (properties `((upstream-name . "time_now")))
  4133. (home-page
  4134. "https://github.com/janestreet/time_now")
  4135. (synopsis "Reports the current time")
  4136. (description
  4137. "Provides a single function to report the current time in nanoseconds
  4138. since the start of the Unix epoch.")
  4139. (license license:expat)))
  4140. (define-public ocaml-ppx-inline-test
  4141. (package
  4142. (name "ocaml-ppx-inline-test")
  4143. (version "0.14.1")
  4144. (home-page "https://github.com/janestreet/ppx_inline_test")
  4145. (source
  4146. (origin
  4147. (method git-fetch)
  4148. (uri (git-reference
  4149. (url (string-append home-page ".git"))
  4150. (commit (string-append "v" version))))
  4151. (file-name (git-file-name name version))
  4152. (sha256
  4153. (base32
  4154. "1ajdna1m9l1l3nfigyy33zkfa3yarfr6s086jdw2pcfwlq1fhhl4"))))
  4155. (build-system dune-build-system)
  4156. (arguments
  4157. `(#:tests? #f)) ;see home page README for further information
  4158. (propagated-inputs
  4159. `(("ocaml-base" ,ocaml-base)
  4160. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4161. ("ocaml-compiler-libs" ,ocaml-compiler-libs)
  4162. ("ocaml-sexplib0" ,ocaml-sexplib0)
  4163. ("ocaml-stdio" ,ocaml-stdio)
  4164. ("ocaml-ppxlib" ,ocaml-ppxlib)
  4165. ("ocaml-time-now" ,ocaml-time-now)))
  4166. (properties `((upstream-name . "ppx_inline_test")
  4167. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
  4168. (synopsis "Syntax extension for writing in-line tests in ocaml code")
  4169. (description "This package contains a syntax extension for writing
  4170. in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
  4171. collection.")
  4172. (license license:expat)))
  4173. (define-public ocaml4.07-ppx-inline-test
  4174. (package-with-ocaml4.07
  4175. (package
  4176. (inherit ocaml-ppx-inline-test)
  4177. (name "ocaml-ppx-inline-test")
  4178. (version "0.12.0")
  4179. (home-page "https://github.com/janestreet/ppx_inline_test")
  4180. (source
  4181. (origin
  4182. (method git-fetch)
  4183. (uri (git-reference
  4184. (url (string-append home-page ".git"))
  4185. (commit (string-append "v" version))))
  4186. (file-name (git-file-name name version))
  4187. (sha256
  4188. (base32
  4189. "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
  4190. (propagated-inputs
  4191. `(("ocaml-base" ,ocaml-base)
  4192. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4193. ("ocaml-compiler-libs" ,ocaml-compiler-libs)
  4194. ("ocaml-sexplib0" ,ocaml-sexplib0)
  4195. ("ocaml-stdio" ,ocaml-stdio)
  4196. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  4197. (properties `((upstream-name . "ppx_inline_test"))))))
  4198. (define-public ocaml-bindlib
  4199. (package
  4200. (name "ocaml-bindlib")
  4201. (version "5.0.1")
  4202. (source
  4203. (origin
  4204. (method git-fetch)
  4205. (uri (git-reference
  4206. (url "https://github.com/rlepigre/ocaml-bindlib")
  4207. (commit (string-append "ocaml-bindlib_" version))))
  4208. (file-name (git-file-name name version))
  4209. (sha256
  4210. (base32
  4211. "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
  4212. (build-system ocaml-build-system)
  4213. (arguments
  4214. `(#:tests? #f ;no tests
  4215. #:use-make? #t
  4216. #:phases
  4217. (modify-phases %standard-phases
  4218. (delete 'configure)
  4219. (replace 'build
  4220. (lambda _
  4221. (invoke "make")))
  4222. (replace 'install
  4223. (lambda _
  4224. (invoke "make" "install"))))))
  4225. (native-inputs
  4226. `(("ocamlbuild" ,ocamlbuild)
  4227. ("ocaml-findlib" ,ocaml-findlib)))
  4228. (home-page "https://rlepigre.github.io/ocaml-bindlib/")
  4229. (synopsis "OCaml Bindlib library for bound variables")
  4230. (description "Bindlib is a library allowing the manipulation of data
  4231. structures with bound variables. It is particularly useful when writing ASTs
  4232. for programming languages, but also for manipulating terms of the λ-calculus
  4233. or quantified formulas.")
  4234. (license license:gpl3+)))
  4235. (define-public ocaml-earley
  4236. (package
  4237. (name "ocaml-earley")
  4238. (version "3.0.0")
  4239. (home-page "https://github.com/rlepigre/ocaml-earley")
  4240. (source
  4241. (origin
  4242. (method git-fetch)
  4243. (uri (git-reference
  4244. (url (string-append home-page ".git"))
  4245. (commit version)))
  4246. (file-name (git-file-name name version))
  4247. (sha256
  4248. (base32
  4249. "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
  4250. (build-system dune-build-system)
  4251. (arguments
  4252. `(#:test-target "."))
  4253. (propagated-inputs
  4254. `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
  4255. (synopsis "Parsing library based on Earley Algorithm")
  4256. (description "Earley is a parser combinator library base on Earley's
  4257. algorithm. It is intended to be used in conjunction with an OCaml syntax
  4258. extension which allows the definition of parsers inside the language. There
  4259. is also support for writing OCaml syntax extensions in a camlp4 style.")
  4260. (license license:cecill-b)))
  4261. (define-public ocaml-timed
  4262. (package
  4263. (name "ocaml-timed")
  4264. (version "1.0")
  4265. (home-page "https://github.com/rlepigre/ocaml-timed")
  4266. (source (origin
  4267. (method git-fetch)
  4268. (uri (git-reference
  4269. (url (string-append home-page ".git"))
  4270. (commit (string-append name "_" version))))
  4271. (sha256
  4272. (base32
  4273. "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
  4274. (file-name (git-file-name name version))))
  4275. (build-system ocaml-build-system)
  4276. (arguments
  4277. '(#:phases
  4278. (modify-phases %standard-phases
  4279. (delete 'configure)
  4280. (replace 'build
  4281. (lambda _
  4282. (invoke "make")))
  4283. (replace 'install
  4284. (lambda _
  4285. (invoke "make" "install")))
  4286. (replace 'check
  4287. (lambda _
  4288. (invoke "make" "tests"))))))
  4289. (synopsis "Timed references for imperative state")
  4290. (description "Timed references for imperative state. This module provides
  4291. an alternative type for references (or mutable cells) supporting undo/redo
  4292. operations. In particular, an abstract notion of time is used to capture the
  4293. state of the references at any given point, so that it can be restored. Note
  4294. that usual reference operations only have a constant time / memory overhead
  4295. (compared to those of the standard library).
  4296. Moreover, we provide an alternative implementation based on the references
  4297. of the standard library (Pervasives module). However, it is less efficient
  4298. than the first one.")
  4299. (license license:expat)))
  4300. (define-public ocaml-biniou
  4301. (package
  4302. (name "ocaml-biniou")
  4303. (version "1.2.1")
  4304. (home-page "https://github.com/mjambon/biniou")
  4305. (source
  4306. (origin
  4307. (method git-fetch)
  4308. (uri (git-reference
  4309. (url (string-append home-page ".git"))
  4310. (commit version)))
  4311. (file-name (git-file-name name version))
  4312. (sha256
  4313. (base32
  4314. "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
  4315. (build-system dune-build-system)
  4316. (arguments
  4317. `(#:phases
  4318. (modify-phases %standard-phases
  4319. (add-before 'build 'make-writable
  4320. (lambda _ (for-each make-file-writable (find-files "." ".")))))))
  4321. (inputs
  4322. `(("ocaml-easy-format" ,ocaml-easy-format)))
  4323. (native-inputs
  4324. `(("which" ,which)))
  4325. (synopsis "Data format designed for speed, safety, ease of use and backward
  4326. compatibility")
  4327. (description "Biniou (pronounced \"be new\" is a binary data format
  4328. designed for speed, safety, ease of use and backward compatibility as
  4329. protocols evolve. Biniou is vastly equivalent to JSON in terms of
  4330. functionality but allows implementations several times faster (4 times faster
  4331. than yojson), with 25-35% space savings.")
  4332. (license license:bsd-3)))
  4333. (define-public ocaml-yojson
  4334. (package
  4335. (name "ocaml-yojson")
  4336. (version "1.7.0")
  4337. (home-page "https://github.com/ocaml-community/yojson")
  4338. (source
  4339. (origin
  4340. (method git-fetch)
  4341. (uri (git-reference
  4342. (url (string-append home-page ".git"))
  4343. (commit version)))
  4344. (file-name (git-file-name name version))
  4345. (sha256
  4346. (base32
  4347. "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
  4348. (build-system dune-build-system)
  4349. (arguments
  4350. `(#:test-target "."))
  4351. (propagated-inputs
  4352. `(("ocaml-biniou" ,ocaml-biniou)
  4353. ("ocaml-easy-format" ,ocaml-easy-format)))
  4354. (native-inputs
  4355. `(("ocaml-alcotest" ,ocaml-alcotest)
  4356. ("ocaml-cppo" ,ocaml-cppo)))
  4357. (synopsis "Low-level JSON library for OCaml")
  4358. (description "Yojson is an optimized parsing and printing library for the
  4359. JSON format. It addresses a few shortcomings of json-wheel including 2x
  4360. speedup, polymorphic variants and optional syntax for tuples and variants.
  4361. @code{ydump} is a pretty printing command-line program provided with the
  4362. yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
  4363. serializers and deserializers from type definitions.")
  4364. (license license:bsd-3)))
  4365. (define-public ocaml-craml
  4366. (package
  4367. (name "ocaml-craml")
  4368. (version "1.0.0")
  4369. (home-page "https://github.com/realworldocaml/craml")
  4370. (source
  4371. (origin
  4372. (method git-fetch)
  4373. (uri (git-reference
  4374. (url (string-append home-page ".git"))
  4375. (commit version)))
  4376. (file-name (git-file-name name version))
  4377. (sha256
  4378. (base32
  4379. "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
  4380. (build-system dune-build-system)
  4381. (arguments
  4382. `(#:phases
  4383. (modify-phases %standard-phases
  4384. (add-before 'build 'upgrade
  4385. (lambda _
  4386. (invoke "dune" "upgrade")
  4387. #t)))))
  4388. (inputs
  4389. `(("ocaml-fmt" ,ocaml-fmt)
  4390. ("ocaml-astring" ,ocaml-astring)
  4391. ("ocaml-logs" ,ocaml-logs)
  4392. ("ocaml-cmdliner" ,ocaml-cmdliner)))
  4393. (synopsis
  4394. "CRAM-testing framework for testing command line applications")
  4395. (description "CRAM is a is functional testing framework for command line
  4396. applications. @code{craml} is freely inspired by the
  4397. Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
  4398. format}. @code{craml} is released as a single binary (called @code{craml}).")
  4399. (license license:isc)))
  4400. (define-public ocaml-dot-merlin-reader
  4401. (package
  4402. (name "ocaml-dot-merlin-reader")
  4403. (version "4.2-411")
  4404. (source
  4405. (origin
  4406. (method git-fetch)
  4407. (uri (git-reference
  4408. (url "https://github.com/ocaml/merlin")
  4409. (commit (string-append "v" version))))
  4410. (file-name (git-file-name name version))
  4411. (sha256
  4412. (base32
  4413. "1vl6p8m2pag5j283h5g2gzxxfm599k6qhyrjkdf3kyc476fc9lw8"))))
  4414. (build-system dune-build-system)
  4415. (arguments '(#:package "dot-merlin-reader"
  4416. #:tests? #f)) ; no tests
  4417. (inputs
  4418. `(("ocaml-yojson" ,ocaml-yojson)
  4419. ("ocaml-csexp" ,ocaml-csexp)
  4420. ("ocaml-result" ,ocaml-result)))
  4421. (home-page "https://ocaml.github.io/merlin/")
  4422. (synopsis "Reads config files for @code{ocaml-merlin}")
  4423. (description "@code{ocaml-dot-merlin-reader} is an external reader for
  4424. @code{ocaml-merlin} configurations.")
  4425. (license license:expat)))
  4426. (define-public ocaml-merlin
  4427. (package
  4428. (inherit ocaml-dot-merlin-reader)
  4429. (name "ocaml-merlin")
  4430. (arguments
  4431. '(#:package "merlin"
  4432. #:phases
  4433. (modify-phases %standard-phases
  4434. (replace 'check
  4435. (lambda* (#:key tests? #:allow-other-keys)
  4436. (when tests?
  4437. (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
  4438. (inputs
  4439. `(("ocaml-yojson" ,ocaml-yojson)
  4440. ("ocaml-csexp" ,ocaml-csexp)
  4441. ("ocaml-result" ,ocaml-result)))
  4442. (native-inputs
  4443. `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader) ; required for tests
  4444. ("ocaml-mdx" ,ocaml-mdx)
  4445. ("jq" ,jq)))
  4446. (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
  4447. (description "Merlin is an editor service that provides modern IDE
  4448. features for OCaml. Emacs and Vim support is provided out-of-the-box.
  4449. External contributors added support for Visual Studio Code, Sublime Text and
  4450. Atom.")
  4451. (license license:expat)))
  4452. ;; ocaml-merlin 3.4.2 can not be built with old version of dune used in
  4453. ;; package-with-ocaml4.07
  4454. (define-public ocaml4.07-merlin
  4455. (package-with-ocaml4.07
  4456. (package
  4457. (inherit ocaml-merlin)
  4458. (name "ocaml-merlin")
  4459. (version "3.2.2")
  4460. (source
  4461. (origin
  4462. (method git-fetch)
  4463. (uri (git-reference
  4464. (url "https://github.com/ocaml/merlin")
  4465. (commit (string-append "v" version))))
  4466. (file-name (git-file-name name version))
  4467. (sha256
  4468. (base32
  4469. "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
  4470. (build-system dune-build-system)
  4471. (inputs
  4472. `(("ocaml-yojson" ,ocaml-yojson)))
  4473. (native-inputs
  4474. `(("ocaml-findlib" ,ocaml-findlib)))
  4475. (arguments
  4476. `(#:package "merlin"
  4477. ;; Errors in tests in version 3.2.2
  4478. #:tests? #f)))))
  4479. (define-public ocaml4.07-gsl
  4480. (package
  4481. (name "ocaml4.07-gsl")
  4482. (version "1.24.0")
  4483. (source
  4484. (origin
  4485. (method url-fetch)
  4486. (uri
  4487. (string-append
  4488. "https://github.com/mmottl/gsl-ocaml/releases/download/"
  4489. version "/gsl-" version ".tbz"))
  4490. (sha256
  4491. (base32
  4492. "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
  4493. (build-system dune-build-system)
  4494. (arguments
  4495. `(#:test-target "."
  4496. #:phases
  4497. (modify-phases %standard-phases
  4498. (add-after 'unpack 'fix-gsl-directory
  4499. (lambda* (#:key inputs #:allow-other-keys)
  4500. (substitute* "src/config/discover.ml"
  4501. (("/usr") (assoc-ref inputs "gsl")))
  4502. #t)))
  4503. #:ocaml ,ocaml-4.07
  4504. #:findlib ,ocaml4.07-findlib
  4505. #:dune ,ocaml4.07-dune))
  4506. (inputs
  4507. `(("gsl" ,gsl)))
  4508. (propagated-inputs
  4509. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  4510. ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
  4511. (home-page "https://mmottl.github.io/gsl-ocaml")
  4512. (synopsis "Bindings to the GNU Scientific Library")
  4513. (description
  4514. "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
  4515. the OCaml language.")
  4516. (license license:gpl3+)))
  4517. (define-public ocaml4.07-gsl-1
  4518. (package
  4519. (inherit ocaml4.07-gsl)
  4520. (version "1.19.3")
  4521. (source (origin
  4522. (method url-fetch)
  4523. (uri (string-append "https://github.com/mmottl/gsl-ocaml"
  4524. "/releases/download/v"
  4525. version "/gsl-ocaml-" version ".tar.gz"))
  4526. (sha256
  4527. (base32
  4528. "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
  4529. (build-system ocaml-build-system)
  4530. (inputs
  4531. `(("gsl" ,gsl)))
  4532. (native-inputs
  4533. `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
  4534. (arguments
  4535. `(#:ocaml ,ocaml-4.07
  4536. #:findlib ,ocaml4.07-findlib))
  4537. (propagated-inputs '())))
  4538. (define-public cubicle
  4539. (package
  4540. (name "cubicle")
  4541. (version "1.1.2")
  4542. (source (origin
  4543. (method url-fetch)
  4544. (uri (string-append "http://cubicle.lri.fr/cubicle-"
  4545. version ".tar.gz"))
  4546. (sha256
  4547. (base32
  4548. "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
  4549. (build-system gnu-build-system)
  4550. (native-inputs
  4551. `(("automake" ,automake)
  4552. ("ocaml" ,ocaml)
  4553. ("which" ,(@@ (gnu packages base) which))))
  4554. (propagated-inputs
  4555. `(("ocaml-num" ,ocaml-num)
  4556. ("z3" ,z3)))
  4557. (arguments
  4558. `(#:configure-flags (list "--with-z3")
  4559. #:make-flags (list "QUIET=")
  4560. #:tests? #f
  4561. #:phases
  4562. (modify-phases %standard-phases
  4563. (add-before 'configure 'make-deterministic
  4564. (lambda _
  4565. (substitute* "Makefile.in"
  4566. (("`date`") "no date for reproducibility"))))
  4567. (add-before 'configure 'configure-for-release
  4568. (lambda _
  4569. (substitute* "Makefile.in"
  4570. (("SVNREV=") "#SVNREV="))
  4571. #t))
  4572. (add-before 'configure 'fix-/bin/sh
  4573. (lambda _
  4574. (substitute* "configure"
  4575. (("-/bin/sh") (string-append "-" (which "sh"))))
  4576. #t))
  4577. (add-before 'configure 'fix-smt-z3wrapper.ml
  4578. (lambda _
  4579. (substitute* "Makefile.in"
  4580. (("\\\\n") ""))
  4581. #t))
  4582. (add-before 'configure 'fix-ocaml-num
  4583. (lambda* (#:key inputs #:allow-other-keys)
  4584. (substitute* "Makefile.in"
  4585. (("nums.cma") "num.cma num_core.cma")
  4586. (("= \\$\\(FUNCTORYLIB\\)")
  4587. (string-append "= -I "
  4588. (assoc-ref inputs "ocaml-num")
  4589. "/lib/ocaml/site-lib/num/core -I "
  4590. (assoc-ref inputs "ocaml-num")
  4591. "/lib/ocaml/site-lib/num"
  4592. " $(FUNCTORYLIB)")))
  4593. #t)))))
  4594. (home-page "http://cubicle.lri.fr/")
  4595. (synopsis "Model checker for array-based systems")
  4596. (description "Cubicle is a model checker for verifying safety properties
  4597. of array-based systems. This is a syntactically restricted class of
  4598. parametrized transition systems with states represented as arrays indexed by
  4599. an arbitrary number of processes. Cache coherence protocols and mutual
  4600. exclusion algorithms are typical examples of such systems.")
  4601. (license license:asl2.0)))
  4602. (define-public ocaml-sexplib0
  4603. (package
  4604. (name "ocaml-sexplib0")
  4605. (version "0.14.0")
  4606. (home-page "https://github.com/janestreet/sexplib0")
  4607. (source
  4608. (janestreet-origin "sexplib0" version
  4609. "0adrc0r1vvvr41dcpj8jwkzh1dfgqf0mks9xlnnskqfm3a51iavg"))
  4610. (build-system dune-build-system)
  4611. (arguments `(#:tests? #f)) ;no tests
  4612. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
  4613. (synopsis "Library containing the definition of S-expressions and some
  4614. base converters")
  4615. (description "Part of Jane Street's Core library The Core suite of
  4616. libraries is an industrial strength alternative to OCaml's standard library
  4617. that was developed by Jane Street, the largest industrial user of OCaml.")
  4618. (license license:expat)))
  4619. (define-public ocaml4.07-sexplib0
  4620. (package-with-ocaml4.07
  4621. (package
  4622. (inherit ocaml-sexplib0)
  4623. (name "ocaml-sexplib0")
  4624. (version "0.11.0")
  4625. (source
  4626. (janestreet-origin "sexplib0" version
  4627. "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
  4628. (arguments `(#:tests? #f)) ; no tests
  4629. (properties '()))))
  4630. (define-public ocaml-parsexp
  4631. (package
  4632. (name "ocaml-parsexp")
  4633. (version "0.14.1")
  4634. (home-page "https://github.com/janestreet/parsexp")
  4635. (source (origin
  4636. (method git-fetch)
  4637. (uri (git-reference
  4638. (url home-page)
  4639. (commit (string-append "v" version))))
  4640. (file-name (git-file-name name version))
  4641. (sha256
  4642. (base32
  4643. "1nr0ncb8l2mkk8pqzknr7fsqw5kpz8y102kyv5bc0x7c36v0d4zy"))))
  4644. (build-system dune-build-system)
  4645. (inputs
  4646. `(("ocaml-sexplib0" ,ocaml-sexplib0)
  4647. ("ocaml-base" ,ocaml-base)))
  4648. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
  4649. (synopsis "S-expression parsing library")
  4650. (description
  4651. "This library provides generic parsers for parsing S-expressions from
  4652. strings or other medium.
  4653. The library is focused on performances but still provide full generic
  4654. parsers that can be used with strings, bigstrings, lexing buffers,
  4655. character streams or any other sources effortlessly.
  4656. It provides three different class of parsers:
  4657. @itemize
  4658. @item
  4659. the normal parsers, producing [Sexp.t] or [Sexp.t list] values
  4660. @item
  4661. the parsers with positions, building compact position sequences so
  4662. that one can recover original positions in order to report properly
  4663. located errors at little cost
  4664. @item
  4665. the Concrete Syntax Tree parsers, produce values of type
  4666. @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
  4667. syntax, including comments
  4668. @end itemize
  4669. This library is portable and doesn't provide IO functions. To read
  4670. s-expressions from files or other external sources, you should use
  4671. parsexp_io.")
  4672. (license license:expat)))
  4673. (define-public ocaml4.07-parsexp
  4674. (package-with-ocaml4.07
  4675. (package
  4676. (inherit ocaml-parsexp)
  4677. (name "ocaml-parsexp")
  4678. (version "0.11.0")
  4679. (source
  4680. (janestreet-origin "parsexp" version
  4681. "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
  4682. (properties '()))))
  4683. (define-public ocaml-sexplib
  4684. (package
  4685. (name "ocaml-sexplib")
  4686. (version "0.14.0")
  4687. (home-page "https://github.com/janestreet/sexplib")
  4688. (source
  4689. (janestreet-origin "sexplib" version
  4690. "12rlnc6fcrjfdn3gs2agi418sj54ighhs6dfll37zcv7mgywblm2"))
  4691. (build-system dune-build-system)
  4692. (propagated-inputs
  4693. `(("ocaml-base" ,ocaml-base)
  4694. ("ocaml-num" ,ocaml-num)
  4695. ("ocaml-parsexp" ,ocaml-parsexp)
  4696. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4697. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
  4698. (synopsis
  4699. "Library for serializing OCaml values to and from S-expressions")
  4700. (description
  4701. "This package is part of Jane Street's Core library. Sexplib contains
  4702. functionality for parsing and pretty-printing s-expressions.")
  4703. (license license:expat)))
  4704. (define-public ocaml4.07-sexplib
  4705. (package-with-ocaml4.07
  4706. (package
  4707. (inherit ocaml-sexplib)
  4708. (version "0.11.0")
  4709. (source
  4710. (janestreet-origin "sexplib" version
  4711. "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
  4712. (properties '()))))
  4713. (define-public ocaml-base
  4714. (package
  4715. (name "ocaml-base")
  4716. (version "0.14.0")
  4717. (home-page "https://github.com/janestreet/base")
  4718. (source
  4719. (janestreet-origin "base" version
  4720. "1rkdhsgbcv0a8p29mwvpd2ldz8cjk97pixl43izm54wyin4lp778"))
  4721. (build-system dune-build-system)
  4722. (propagated-inputs
  4723. `(("ocaml-sexplib0" ,ocaml-sexplib0)))
  4724. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
  4725. (synopsis
  4726. "Full standard library replacement for OCaml")
  4727. (description
  4728. "Base is a complete and portable alternative to the OCaml standard
  4729. library. It provides all standard functionalities one would expect
  4730. from a language standard library. It uses consistent conventions
  4731. across all of its module.
  4732. Base aims to be usable in any context. As a result system dependent
  4733. features such as I/O are not offered by Base. They are instead
  4734. provided by companion libraries such as
  4735. @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
  4736. (license license:expat)))
  4737. (define-public ocaml4.07-base
  4738. (package-with-ocaml4.07
  4739. (package
  4740. (inherit ocaml-base)
  4741. (name "ocaml-base")
  4742. (version "0.11.1")
  4743. (source
  4744. (origin
  4745. ;; version 0.11.1 is not released on ocaml.janestreet.org.
  4746. (method git-fetch)
  4747. (uri (git-reference
  4748. (url "https://github.com/janestreet/base.git")
  4749. (commit (string-append "v" version))))
  4750. (file-name (git-file-name name version))
  4751. (sha256
  4752. (base32
  4753. "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
  4754. (properties '()))))
  4755. (define-public ocaml-compiler-libs
  4756. (package
  4757. (name "ocaml-compiler-libs")
  4758. (version "0.12.3")
  4759. (home-page "https://github.com/janestreet/ocaml-compiler-libs")
  4760. (source
  4761. (origin
  4762. (method git-fetch)
  4763. (uri (git-reference
  4764. (url home-page)
  4765. (commit (string-append "v" version))))
  4766. (file-name (git-file-name name version))
  4767. (sha256
  4768. (base32
  4769. "00nrar7h2pyflbdiq6wwwrb4k5jh9iff0jllihzm6ms8d5pspsg5"))))
  4770. (build-system dune-build-system)
  4771. (arguments `(#:tests? #f)) ;no tests
  4772. (properties `((upstream-name . "ocaml-compiler-libs")
  4773. (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
  4774. (synopsis "Compiler libraries repackaged")
  4775. (description "This package simply repackages the OCaml compiler libraries
  4776. so they don't expose everything at toplevel. For instance, @code{Ast_helper}
  4777. is now @code{Ocaml_common.Ast_helper}.")
  4778. (license license:expat)))
  4779. (define-public ocaml4.07-compiler-libs
  4780. (package-with-ocaml4.07
  4781. (package
  4782. (inherit ocaml-compiler-libs)
  4783. (name "ocaml-compiler-libs")
  4784. (version "0.11.0")
  4785. (home-page "https://github.com/janestreet/ocaml-compiler-libs")
  4786. (source
  4787. (origin
  4788. (method git-fetch)
  4789. (uri (git-reference
  4790. (url home-page)
  4791. (commit (string-append "v" version))))
  4792. (file-name (git-file-name name version))
  4793. (sha256
  4794. (base32
  4795. "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
  4796. (properties `((upstream-name . "ocaml-compiler-libs"))))))
  4797. (define-public ocaml-stdio
  4798. (package
  4799. (name "ocaml-stdio")
  4800. (version "0.14.0")
  4801. (home-page "https://github.com/janestreet/stdio")
  4802. (source
  4803. (janestreet-origin "stdio" version
  4804. "1hj5hraprqy2i90a690l11yjszvb99j818q3d684ryx6p2lddk0l"))
  4805. (build-system dune-build-system)
  4806. (propagated-inputs
  4807. `(("ocaml-base" ,ocaml-base)
  4808. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4809. (arguments `(#:tests? #f)) ;no tests
  4810. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
  4811. (synopsis "Standard IO library for OCaml")
  4812. (description
  4813. "Stdio implements simple input/output functionalities for OCaml. It
  4814. re-exports the input/output functions of the OCaml standard libraries using
  4815. a more consistent API.")
  4816. (license license:expat)))
  4817. (define-public ocaml4.07-stdio
  4818. (package-with-ocaml4.07
  4819. (package
  4820. (inherit ocaml-stdio)
  4821. (version "0.11.0")
  4822. (source
  4823. (janestreet-origin "stdio" version
  4824. "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
  4825. (properties '()))))
  4826. (define-public ocaml-ppx-deriving
  4827. (package
  4828. (name "ocaml-ppx-deriving")
  4829. (version "5.2.1")
  4830. (source
  4831. (origin
  4832. (method git-fetch)
  4833. (uri (git-reference
  4834. (url "https://github.com/ocaml-ppx/ppx_deriving")
  4835. (commit (string-append "v" version))))
  4836. (file-name (git-file-name name version))
  4837. (sha256
  4838. (base32
  4839. "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
  4840. (build-system dune-build-system)
  4841. (arguments
  4842. `(#:test-target "."))
  4843. (propagated-inputs
  4844. `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
  4845. ("ocaml-ppxlib" ,ocaml-ppxlib)
  4846. ("ocaml-result" ,ocaml-result)))
  4847. (native-inputs
  4848. `(("ocaml-cppo" ,ocaml-cppo)
  4849. ("ocaml-ounit2" ,ocaml-ounit2)))
  4850. (properties `((upstream-name . "ppx_deriving")))
  4851. (home-page "https://github.com/ocaml-ppx/ppx_deriving")
  4852. (synopsis "Type-driven code generation for OCaml")
  4853. (description
  4854. "Ppx_deriving provides common infrastructure for generating code based
  4855. on type definitions, and a set of useful plugins for common tasks.")
  4856. (license license:expat)))
  4857. (define-public ocaml-ppx-derivers
  4858. (package
  4859. (name "ocaml-ppx-derivers")
  4860. (version "1.2.1")
  4861. (home-page
  4862. "https://github.com/ocaml-ppx/ppx_derivers")
  4863. (source
  4864. (origin
  4865. (method git-fetch)
  4866. (uri (git-reference
  4867. (url (string-append home-page ".git"))
  4868. (commit version)))
  4869. (file-name (git-file-name name version))
  4870. (sha256
  4871. (base32
  4872. "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
  4873. (build-system dune-build-system)
  4874. (arguments
  4875. '(#:tests? #f)) ;no tests
  4876. (properties `((upstream-name . "ppx_derivers")))
  4877. (synopsis "Shared @code{@@deriving} plugin registry")
  4878. (description
  4879. "Ppx_derivers is a tiny package whose sole purpose is to allow
  4880. ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
  4881. as part of the same ocaml-migrate-parsetree driver.")
  4882. (license license:bsd-3)))
  4883. (define-public ocaml-ppxlib
  4884. (package
  4885. (name "ocaml-ppxlib")
  4886. (version "0.23.0")
  4887. (home-page "https://github.com/ocaml-ppx/ppxlib")
  4888. (source
  4889. (origin
  4890. (method git-fetch)
  4891. (uri (git-reference
  4892. (url home-page)
  4893. (commit version)))
  4894. (file-name (git-file-name name version))
  4895. (sha256
  4896. (base32
  4897. "0jg5v4pssbl66hn5davpin1i57a0r3r54l96vpz5y99xk5w70xi1"))))
  4898. (build-system dune-build-system)
  4899. (propagated-inputs
  4900. `(("ocaml-base" ,ocaml-base)
  4901. ("ocaml-compiler-libs" ,ocaml-compiler-libs)
  4902. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4903. ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
  4904. ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
  4905. ("ocaml-stdio" ,ocaml-stdio)
  4906. ("ocaml-result" ,ocaml-result)
  4907. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4908. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
  4909. (synopsis
  4910. "Base library and tools for ppx rewriters")
  4911. (description
  4912. "A comprehensive toolbox for ppx development. It features:
  4913. @itemize
  4914. @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
  4915. independent of the version of OCaml;
  4916. @item a library for library for ppx rewriters in general, and type-driven code
  4917. generators in particular;
  4918. @item
  4919. a feature-full driver for OCaml AST transformers;
  4920. @item a quotation mechanism allowing to write values representing the
  4921. OCaml AST in the OCaml syntax;
  4922. @item a generator of open recursion classes from type definitions.
  4923. @end itemize")
  4924. (license license:expat)))
  4925. (define-public ocaml4.07-ppxlib
  4926. (package-with-ocaml4.07
  4927. (package
  4928. (inherit ocaml-ppxlib)
  4929. (name "ocaml-ppxlib")
  4930. (version "0.6.0")
  4931. (home-page "https://github.com/ocaml-ppx/ppxlib")
  4932. (source
  4933. (origin
  4934. (method git-fetch)
  4935. (uri (git-reference
  4936. (url home-page)
  4937. (commit version)))
  4938. (file-name (git-file-name name version))
  4939. (sha256
  4940. (base32
  4941. "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
  4942. (build-system dune-build-system)
  4943. (arguments
  4944. `(#:phases
  4945. (modify-phases %standard-phases
  4946. (add-before 'check 'set-topfind
  4947. (lambda* (#:key inputs #:allow-other-keys)
  4948. ;; add the line #directory ".." at the top of each file
  4949. ;; using #use "topfind";; to be able to find topfind
  4950. (let* ((findlib-path (assoc-ref inputs "findlib"))
  4951. (findlib-libdir
  4952. (string-append findlib-path "/lib/ocaml/site-lib")))
  4953. (substitute* '("test/base/test.ml"
  4954. "test/code_path/test.ml"
  4955. "test/deriving/test.ml"
  4956. "test/driver/attributes/test.ml"
  4957. "test/driver/non-compressible-suffix/test.ml"
  4958. "test/driver/transformations/test.ml")
  4959. (("#use \"topfind\";;" all)
  4960. (string-append "#directory \"" findlib-libdir "\"\n"
  4961. all))))
  4962. #t)))))
  4963. (properties '()))))
  4964. (define-public ocaml-ppx-compare
  4965. (package
  4966. (name "ocaml-ppx-compare")
  4967. (version "0.14.0")
  4968. (source
  4969. (janestreet-origin "ppx_compare" version
  4970. "0mqxa2s194nif7x4fjn1p5gd9i3bakr8nv27gf8x1g5nmi8q9pmp"))
  4971. (build-system dune-build-system)
  4972. (arguments
  4973. ;; Tests are currenlty failing
  4974. ;; (see https://github.com/janestreet/ppx_compare/issues/10)
  4975. '(#:tests? #f))
  4976. (propagated-inputs
  4977. `(("ocaml-base" ,ocaml-base)
  4978. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4979. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  4980. (properties `((upstream-name . "ppx_compare")
  4981. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
  4982. (home-page "https://github.com/janestreet/ppx_compare")
  4983. (synopsis "Generation of comparison functions from types")
  4984. (description "Generation of fast comparison functions from type expressions
  4985. and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
  4986. from type representations. The scaffolded functions are usually much faster
  4987. than ocaml's Pervasives.compare. Scaffolding functions also gives you more
  4988. flexibility by allowing you to override them for a specific type and more safety
  4989. by making sure that you only compare comparable values.")
  4990. (license license:asl2.0)))
  4991. (define-public ocaml4.07-ppx-compare
  4992. (package-with-ocaml4.07
  4993. (package
  4994. (inherit ocaml-ppx-compare)
  4995. (name "ocaml-ppx-compare")
  4996. (version "0.11.1")
  4997. (home-page "https://github.com/janestreet/ppx_compare")
  4998. (source (origin
  4999. (method git-fetch)
  5000. (uri (git-reference
  5001. (url home-page)
  5002. (commit (string-append "v" version))))
  5003. (file-name (git-file-name name version))
  5004. (sha256
  5005. (base32
  5006. "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
  5007. (properties `((upstream-name . "ppx_compare"))))))
  5008. (define-public ocaml-fieldslib
  5009. (package
  5010. (name "ocaml-fieldslib")
  5011. (version "0.14.0")
  5012. (source (janestreet-origin
  5013. "fieldslib" version
  5014. "10n5y376fb5jgqk9h8vq158rm1b36h9lzh6p11q33h6xgvb1v6n3"))
  5015. (build-system dune-build-system)
  5016. (arguments `(#:tests? #f)) ; No tests
  5017. (propagated-inputs
  5018. `(("ocaml-base" ,ocaml-base)
  5019. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5020. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5021. (properties `((upstream-name . "fieldslib")
  5022. (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
  5023. (home-page "https://github.com/janestreet/fieldslib")
  5024. (synopsis "Syntax extension to record fields")
  5025. (description "Syntax extension to define first class values representing
  5026. record fields, to get and set record fields, iterate and fold over all fields
  5027. of a record and create new record values.")
  5028. (license license:asl2.0)))
  5029. (define-public ocaml4.07-fieldslib
  5030. (package-with-ocaml4.07
  5031. (package
  5032. (inherit ocaml-fieldslib)
  5033. (version "0.11.0")
  5034. (source (janestreet-origin
  5035. "fieldslib" version
  5036. "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
  5037. (properties `((upstream-name . "fieldslib"))))))
  5038. (define-public ocaml-variantslib
  5039. (package
  5040. (name "ocaml-variantslib")
  5041. (version "0.14.0")
  5042. (source
  5043. (janestreet-origin "variantslib" version
  5044. "11zp27gh282dx9ifbhcp6i7fkc97fvk8amaj58mf1g1hwklc0lm3"))
  5045. (build-system dune-build-system)
  5046. (arguments
  5047. ;; No tests
  5048. `(#:tests? #f))
  5049. (propagated-inputs
  5050. `(("ocaml-base" ,ocaml-base)
  5051. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5052. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5053. (properties `((upstream-name . "variantslib")
  5054. (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
  5055. (home-page "https://github.com/janestreet/variantslib")
  5056. (synopsis "OCaml variants as first class values")
  5057. (description "The Core suite of libraries is an alternative to OCaml's
  5058. standard library.")
  5059. (license license:asl2.0)))
  5060. (define-public ocaml4.07-variantslib
  5061. (package-with-ocaml4.07
  5062. (package
  5063. (inherit ocaml-variantslib)
  5064. (name "ocaml-variantslib")
  5065. (version "0.11.0")
  5066. (source (origin
  5067. (method url-fetch)
  5068. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5069. (version-major+minor version)
  5070. "/files/variantslib-v" version ".tar.gz"))
  5071. (sha256
  5072. (base32
  5073. "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
  5074. (properties `((upstream-name . "variantslib"))))))
  5075. (define-public ocaml-ppx-fields-conv
  5076. (package
  5077. (name "ocaml-ppx-fields-conv")
  5078. (version "0.14.2")
  5079. (home-page "https://github.com/janestreet/ppx_fields_conv")
  5080. (source
  5081. (origin
  5082. (method git-fetch)
  5083. (uri (git-reference
  5084. (url home-page)
  5085. (commit (string-append "v" version))))
  5086. (file-name (git-file-name name version))
  5087. (sha256
  5088. (base32
  5089. "1zwirwqry24b48bg7d4yc845hvcirxyymzbw95aaxdcck84d30n8"))))
  5090. (build-system dune-build-system)
  5091. (propagated-inputs
  5092. `(("ocaml-base" ,ocaml-base)
  5093. ("ocaml-fieldslib" ,ocaml-fieldslib)
  5094. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5095. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5096. (properties `((upstream-name . "ppx_fields_conv")
  5097. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
  5098. (synopsis "Generation of accessor and iteration functions for ocaml records")
  5099. (description "Ppx_fields_conv is a ppx rewriter that can be used to define
  5100. first class values representing record fields, and additional routines, to get
  5101. and set record fields, iterate and fold over all fields of a record and create
  5102. new record values.")
  5103. (license license:asl2.0)))
  5104. (define-public ocaml4.07-ppx-fields-conv
  5105. (package-with-ocaml4.07
  5106. (package
  5107. (inherit ocaml-ppx-fields-conv)
  5108. (version "0.11.0")
  5109. (source (janestreet-origin
  5110. "ppx_fields_conv" version
  5111. "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
  5112. (properties `((upstream-name . "ppx_fields_conv"))))))
  5113. (define-public ocaml-ppx-sexp-conv
  5114. (package
  5115. (name "ocaml-ppx-sexp-conv")
  5116. (version "0.14.3")
  5117. (home-page "https://github.com/janestreet/ppx_sexp_conv")
  5118. (source
  5119. (origin
  5120. (method git-fetch)
  5121. (uri (git-reference
  5122. (url home-page)
  5123. (commit (string-append "v" version))))
  5124. (file-name (git-file-name name version))
  5125. (sha256
  5126. (base32
  5127. "0dbri9d00ydi0dw1cavswnqdmhjaaz80vap29ns2lr6mhhlvyjmj"))))
  5128. (build-system dune-build-system)
  5129. (propagated-inputs
  5130. `(("ocaml-base" ,ocaml-base)
  5131. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5132. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5133. (properties `((upstream-name . "ppx_sexp_conv")
  5134. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
  5135. (synopsis "Generation of S-expression conversion functions from type definitions")
  5136. (description "This package generates S-expression conversion functions from type
  5137. definitions.")
  5138. (license license:asl2.0)))
  5139. (define-public ocaml4.07-ppx-sexp-conv
  5140. (package-with-ocaml4.07
  5141. (package
  5142. (inherit ocaml-ppx-sexp-conv)
  5143. (name "ocaml-ppx-sexp-conv")
  5144. (version "0.11.2")
  5145. (source (origin
  5146. (method git-fetch)
  5147. (uri (git-reference
  5148. (url "https://github.com/janestreet/ppx_sexp_conv")
  5149. (commit (string-append "v" version))))
  5150. (file-name (git-file-name name version))
  5151. (sha256
  5152. (base32
  5153. "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
  5154. (properties `((upstream-name . "ppx_sexp_conv"))))))
  5155. (define-public ocaml-ppx-variants-conv
  5156. (package
  5157. (name "ocaml-ppx-variants-conv")
  5158. (version "0.14.1")
  5159. (source
  5160. (origin
  5161. (method git-fetch)
  5162. (uri (git-reference
  5163. (url "https://github.com/janestreet/ppx_variants_conv")
  5164. (commit (string-append "v" version))))
  5165. (patches
  5166. (search-patches
  5167. ;; Fix build when building with ocaml-ppxlib@0.23.0.
  5168. "ocaml-ppx-variants-ppxlib-api-change.patch"))
  5169. (file-name (git-file-name name version))
  5170. (sha256
  5171. (base32
  5172. "0q6a43zrwqzdz7aja0k44a2llyjjj5xzi2kigwhsnww3g0r5ig84"))))
  5173. (build-system dune-build-system)
  5174. (propagated-inputs
  5175. `(("ocaml-base" ,ocaml-base)
  5176. ("ocaml-variantslib" ,ocaml-variantslib)
  5177. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5178. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5179. (properties
  5180. `((upstream-name . "ppx_variants_conv")
  5181. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
  5182. (home-page
  5183. "https://github.com/janestreet/ppx_variants_conv")
  5184. (synopsis "Generation of accessor and iteration functions for OCaml variant types")
  5185. (description
  5186. "This package generates accessors and iteration functions for OCaml
  5187. variant types.")
  5188. (license license:asl2.0)))
  5189. (define-public ocaml4.07-ppx-variants-conv
  5190. (package-with-ocaml4.07
  5191. (package
  5192. (inherit ocaml-ppx-variants-conv)
  5193. (name "ocaml-ppx-variants-conv")
  5194. (version "0.11.1")
  5195. (source
  5196. (origin
  5197. (method git-fetch)
  5198. (uri (git-reference
  5199. (url "https://github.com/janestreet/ppx_variants_conv")
  5200. (commit (string-append "v" version))))
  5201. (file-name (git-file-name name version))
  5202. (sha256
  5203. (base32
  5204. "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
  5205. (properties `((upstream-name . "ppx_variants_conv"))))))
  5206. (define-public ocaml-ppx-custom-printf
  5207. (package
  5208. (name "ocaml-ppx-custom-printf")
  5209. (version "0.14.1")
  5210. (home-page "https://github.com/janestreet/ppx_custom_printf")
  5211. (source
  5212. (origin
  5213. (method git-fetch)
  5214. (uri (git-reference
  5215. (url home-page)
  5216. (commit (string-append "v" version))))
  5217. (file-name (git-file-name name version))
  5218. (sha256
  5219. (base32
  5220. "0c1m65kn27zvwmfwy7kk46ga76yw2a3ik9jygpy1b6nn6pi026w9"))))
  5221. (build-system dune-build-system)
  5222. (propagated-inputs
  5223. `(("ocaml-base" ,ocaml-base)
  5224. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5225. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5226. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5227. (properties `((upstream-name . "ppx_custom_printf")
  5228. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
  5229. (synopsis "Printf-style format-strings for user-defined string conversion")
  5230. (description "Extensions to printf-style format-strings for user-defined
  5231. string conversion.")
  5232. (license license:asl2.0)))
  5233. (define-public ocaml4.07-ppx-custom-printf
  5234. (package-with-ocaml4.07
  5235. (package
  5236. (inherit ocaml-ppx-custom-printf)
  5237. (version "0.11.0")
  5238. (source
  5239. (janestreet-origin
  5240. "ppx_custom_printf" version
  5241. "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
  5242. (properties `((upstream-name . "ppx_custom_printf"))))))
  5243. (define-public ocaml4.07-bin-prot
  5244. (package
  5245. (name "ocaml4.07-bin-prot")
  5246. (version "0.11.0")
  5247. (source (origin
  5248. (method url-fetch)
  5249. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5250. (version-major+minor version)
  5251. "/files/bin_prot-v" version ".tar.gz"))
  5252. (sha256
  5253. (base32
  5254. "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
  5255. (build-system dune-build-system)
  5256. (inputs
  5257. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5258. ("ocaml-ppx-compare" ,(package-with-ocaml4.07 ocaml-ppx-compare))
  5259. ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
  5260. ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
  5261. ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
  5262. ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
  5263. ("ocaml-migrate-parsetree"
  5264. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
  5265. (arguments
  5266. `(#:ocaml ,ocaml-4.07
  5267. #:findlib ,ocaml4.07-findlib
  5268. #:dune ,ocaml4.07-dune))
  5269. (properties `((upstream-name . "bin_prot")))
  5270. (home-page "https://github.com/janestreet/bin_prot")
  5271. (synopsis "Binary protocol generator")
  5272. (description "This library contains functionality for reading and writing
  5273. OCaml-values in a type-safe binary protocol. It is extremely efficient,
  5274. typically supporting type-safe marshalling and unmarshalling of even highly
  5275. structured values at speeds sufficient to saturate a gigabit connection. The
  5276. protocol is also heavily optimized for size, making it ideal for long-term
  5277. storage of large amounts of data.")
  5278. (license (list
  5279. license:asl2.0
  5280. license:bsd-3))))
  5281. (define-public ocaml-octavius
  5282. (package
  5283. (name "ocaml-octavius")
  5284. (version "1.2.2")
  5285. (source (origin
  5286. (method git-fetch)
  5287. (uri (git-reference
  5288. (url "https://github.com/ocaml-doc/octavius")
  5289. (commit (string-append "v" version))))
  5290. (file-name (git-file-name name version))
  5291. (sha256
  5292. (base32
  5293. "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
  5294. (build-system dune-build-system)
  5295. (arguments
  5296. `(#:phases
  5297. (modify-phases %standard-phases
  5298. (add-before 'build 'make-writable
  5299. (lambda _
  5300. (for-each (lambda (file)
  5301. (chmod file #o644))
  5302. (find-files "." "."))
  5303. #t)))))
  5304. (properties `((upstream-name . "octavius")))
  5305. (home-page "https://github.com/ocaml-doc/octavius")
  5306. (synopsis "Ocamldoc comment syntax parser")
  5307. (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
  5308. (license license:isc)))
  5309. (define-public ocaml-ppx-hash
  5310. (package
  5311. (name "ocaml-ppx-hash")
  5312. (version "0.14.0")
  5313. (source
  5314. (janestreet-origin "ppx_hash" version
  5315. "0x4wgdvhgd8a49bzari52jpkykxpv6ncgp5ncda3xgg0a9r49s8n"))
  5316. (build-system dune-build-system)
  5317. (propagated-inputs
  5318. `(("ocaml-base" ,ocaml-base)
  5319. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5320. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5321. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5322. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5323. (properties `((upstream-name . "ppx_hash")
  5324. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
  5325. (home-page "https://github.com/janestreet/ppx_hash")
  5326. (synopsis "Generation of hash functions from type expressions and definitions")
  5327. (description "This package is a collection of ppx rewriters that generate
  5328. hash functions from type exrpessions and definitions.")
  5329. (license license:asl2.0)))
  5330. (define-public ocaml4.07-ppx-hash
  5331. (package-with-ocaml4.07
  5332. (package
  5333. (inherit ocaml-ppx-hash)
  5334. (name "ocaml-ppx-hash")
  5335. (home-page "https://github.com/janestreet/ppx_hash")
  5336. (version "0.11.1")
  5337. (source (origin
  5338. (method git-fetch)
  5339. (uri (git-reference
  5340. (url home-page)
  5341. (commit (string-append "v" version))))
  5342. (file-name (git-file-name name version))
  5343. (sha256
  5344. (base32
  5345. "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
  5346. (properties `((upstream-name . "ppx_hash"))))))
  5347. (define-public ocaml-ppx-enumerate
  5348. (package
  5349. (name "ocaml-ppx-enumerate")
  5350. (version "0.14.0")
  5351. (source
  5352. (janestreet-origin
  5353. "ppx_enumerate" version
  5354. "1ij6sffgqhnjwnj9brhrrw1c6xgxlh0s6r17x1qkgnyrc73gfsz8"))
  5355. (build-system dune-build-system)
  5356. (arguments
  5357. `(#:tests? #f)) ; no test suite
  5358. (propagated-inputs
  5359. `(("ocaml-base" ,ocaml-base)
  5360. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5361. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5362. (properties `((upstream-name . "ppx_enumerate")
  5363. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
  5364. (home-page "https://github.com/janestreet/ppx_enumerate")
  5365. (synopsis "Generate a list containing all values of a finite type")
  5366. (description "Ppx_enumerate is a ppx rewriter which generates a definition
  5367. for the list of all values of a type (for a type which only has finitely
  5368. many values).")
  5369. (license license:asl2.0)))
  5370. (define-public ocaml4.07-ppx-enumerate
  5371. (package-with-ocaml4.07
  5372. (package
  5373. (inherit ocaml-ppx-enumerate)
  5374. (name "ocaml-ppx-enumerate")
  5375. (version "0.11.1")
  5376. (home-page "https://github.com/janestreet/ppx_enumerate")
  5377. (source (origin
  5378. (method git-fetch)
  5379. (uri (git-reference
  5380. (url home-page)
  5381. (commit (string-append "v" version))))
  5382. (file-name (git-file-name name version))
  5383. (sha256
  5384. (base32
  5385. "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
  5386. (properties `((upstream-name . "ppx_enumerate"))))))
  5387. (define-public ocaml4.07-ppx-bench
  5388. (package
  5389. (name "ocaml4.07-ppx-bench")
  5390. (version "0.11.0")
  5391. (source (origin
  5392. (method url-fetch)
  5393. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5394. (version-major+minor version)
  5395. "/files/ppx_bench-v" version ".tar.gz"))
  5396. (sha256
  5397. (base32
  5398. "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
  5399. (build-system dune-build-system)
  5400. (arguments
  5401. ;; No tests
  5402. `(#:tests? #f
  5403. #:ocaml ,ocaml-4.07
  5404. #:findlib ,ocaml4.07-findlib
  5405. #:dune ,ocaml4.07-dune))
  5406. (propagated-inputs
  5407. `(("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test))
  5408. ("ocaml-migrate-parsetree"
  5409. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5410. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5411. (properties `((upstream-name . "ppx_bench")))
  5412. (home-page "https://github.com/janestreet/ppx_bench")
  5413. (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
  5414. (description "Syntax extension for writing in-line benchmarks in ocaml code.")
  5415. (license license:asl2.0)))
  5416. (define-public ocaml-ppx-here
  5417. (package
  5418. (name "ocaml-ppx-here")
  5419. (version "0.14.0")
  5420. (source
  5421. (janestreet-origin "ppx_here" version
  5422. "0b444djy68v6ji0ypwv5l02pkl151qzrgg96lyhl8dxfrzvj1zkj"))
  5423. (build-system dune-build-system)
  5424. (arguments
  5425. ;; broken tests
  5426. `(#:tests? #f))
  5427. (propagated-inputs
  5428. `(("ocaml-base" ,ocaml-base)
  5429. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5430. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5431. (properties `((upstream-name . "ppx_here")
  5432. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
  5433. (home-page "https://github.com/janestreet/ppx_here")
  5434. (synopsis "Expands [%here] into its location")
  5435. (description
  5436. "Part of the Jane Street's PPX rewriters collection.")
  5437. (license license:asl2.0)))
  5438. (define-public ocaml4.07-ppx-here
  5439. (package-with-ocaml4.07
  5440. (package
  5441. (inherit ocaml-ppx-here)
  5442. (version "0.11.0")
  5443. (source
  5444. (janestreet-origin "ppx_here" version
  5445. "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
  5446. (properties `((upstream-name . "ppx_here"))))))
  5447. (define-public ocaml4.07-typerep
  5448. (package
  5449. (name "ocaml4.07-typerep")
  5450. (version "0.11.0")
  5451. (source (origin
  5452. (method url-fetch)
  5453. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5454. (version-major+minor version)
  5455. "/files/typerep-v" version ".tar.gz"))
  5456. (sha256
  5457. (base32
  5458. "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
  5459. (build-system dune-build-system)
  5460. (arguments
  5461. `(#:tests? #f
  5462. #:ocaml ,ocaml-4.07
  5463. #:findlib ,ocaml4.07-findlib
  5464. #:dune ,ocaml4.07-dune))
  5465. (propagated-inputs `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))))
  5466. (home-page "https://github.com/janestreet/typerep")
  5467. (synopsis "Typerep is a library for runtime types")
  5468. (description "Typerep is a library for runtime types.")
  5469. (license license:asl2.0)))
  5470. (define-public ocaml4.07-ppx-sexp-value
  5471. (package
  5472. (name "ocaml4.07-ppx-sexp-value")
  5473. (version "0.11.0")
  5474. (source (origin
  5475. (method url-fetch)
  5476. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5477. (version-major+minor version)
  5478. "/files/ppx_sexp_value-v" version ".tar.gz"))
  5479. (sha256
  5480. (base32
  5481. "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
  5482. (build-system dune-build-system)
  5483. (arguments
  5484. `(#:ocaml ,ocaml-4.07
  5485. #:findlib ,ocaml4.07-findlib
  5486. #:dune ,ocaml4.07-dune))
  5487. (propagated-inputs
  5488. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5489. ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
  5490. ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
  5491. ("ocaml-migrate-parsetree"
  5492. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5493. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5494. (properties `((upstream-name . "ppx_sexp_value")))
  5495. (home-page "https://github.com/janestreet/ppx_sexp_value")
  5496. (synopsis "Simplify building s-expressions from ocaml values")
  5497. (description "A ppx rewriter that simplifies building s-expressions from
  5498. ocaml values.")
  5499. (license license:asl2.0)))
  5500. (define-public ocaml4.07-ppx-sexp-message
  5501. (package
  5502. (name "ocaml4.07-ppx-sexp-message")
  5503. (version "0.11.0")
  5504. (source (origin
  5505. (method url-fetch)
  5506. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5507. (version-major+minor version)
  5508. "/files/ppx_sexp_message-v" version ".tar.gz"))
  5509. (sha256
  5510. (base32
  5511. "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
  5512. (build-system dune-build-system)
  5513. (arguments
  5514. `(#:ocaml ,ocaml-4.07
  5515. #:findlib ,ocaml4.07-findlib
  5516. #:dune ,ocaml4.07-dune))
  5517. (propagated-inputs
  5518. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5519. ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
  5520. ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
  5521. ("ocaml-migrate-parsetree"
  5522. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5523. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5524. (properties `((upstream-name . "ppx_sexp_message")))
  5525. (home-page "https://github.com/janestreet/ppx_sexp_message")
  5526. (synopsis "A ppx rewriter for easy construction of s-expressions")
  5527. (description "Ppx_sexp_message aims to ease the creation of s-expressions
  5528. in OCaml. This is mainly motivated by writing error and debugging messages,
  5529. where one needs to construct a s-expression based on various element of the
  5530. context such as function arguments.")
  5531. (license license:asl2.0)))
  5532. (define-public ocaml4.07-ppx-pipebang
  5533. (package
  5534. (name "ocaml4.07-ppx-pipebang")
  5535. (version "0.11.0")
  5536. (source (origin
  5537. (method url-fetch)
  5538. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5539. (version-major+minor version)
  5540. "/files/ppx_pipebang-v" version ".tar.gz"))
  5541. (sha256
  5542. (base32
  5543. "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
  5544. (build-system dune-build-system)
  5545. (arguments
  5546. ;; No tests
  5547. `(#:tests? #f
  5548. #:ocaml ,ocaml-4.07
  5549. #:findlib ,ocaml4.07-findlib
  5550. #:dune ,ocaml4.07-dune))
  5551. (propagated-inputs
  5552. `(("ocaml-migrate-parsetree"
  5553. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5554. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5555. (properties `((upstream-name . "ppx_pipebang")))
  5556. (home-page "https://github.com/janestreet/ppx_pipebang")
  5557. (synopsis "Inline reverse application operators `|>` and `|!`")
  5558. (description "A ppx rewriter that inlines reverse application operators
  5559. @code{|>} and @code{|!}.")
  5560. (license license:asl2.0)))
  5561. (define-public ocaml-ppx-optional
  5562. (package
  5563. (name "ocaml-ppx-optional")
  5564. (version "0.14.0")
  5565. (source
  5566. (janestreet-origin
  5567. "ppx_optional" version
  5568. "1hh6ivlp1qpvyn8l0vhrahkkcp3scf7km254sgplprmk10wnyidz"))
  5569. (build-system dune-build-system)
  5570. (arguments `(#:tests? #f)) ; No tests
  5571. (propagated-inputs
  5572. `(("ocaml-base" ,ocaml-base)
  5573. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5574. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5575. (properties `((upstream-name . "ppx_optional")
  5576. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
  5577. (home-page "https://github.com/janestreet/ppx_optional")
  5578. (synopsis "Pattern matching on flat options")
  5579. (description
  5580. "A ppx rewriter that rewrites simple match statements with an if then
  5581. else expression.")
  5582. (license license:asl2.0)))
  5583. (define-public ocaml4.07-ppx-optional
  5584. (package-with-ocaml4.07
  5585. (package
  5586. (inherit ocaml-ppx-optional)
  5587. (version "0.11.0")
  5588. (source
  5589. (janestreet-origin
  5590. "ppx_optional" version
  5591. "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
  5592. (properties `((upstream-name . "ppx_optional"))))))
  5593. (define-public ocaml-ppx-optcomp
  5594. (package
  5595. (name "ocaml-ppx-optcomp")
  5596. (version "0.14.3")
  5597. (home-page "https://github.com/janestreet/ppx_optcomp")
  5598. (source
  5599. (origin
  5600. (method git-fetch)
  5601. (uri (git-reference
  5602. (url home-page)
  5603. (commit (string-append "v" version))))
  5604. (file-name (git-file-name name version))
  5605. (sha256
  5606. (base32
  5607. "1iflgfzs23asw3k6098v84al5zqx59rx2qjw0mhvk56avlx71pkw"))))
  5608. (build-system dune-build-system)
  5609. (propagated-inputs
  5610. `(("ocaml-base" ,ocaml-base)
  5611. ("ocaml-stdio" ,ocaml-stdio)
  5612. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5613. (properties `((upstream-name . "ppx_optcomp")
  5614. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
  5615. (synopsis "Optional compilation for OCaml")
  5616. (description "Ppx_optcomp stands for Optional Compilation. It is a tool
  5617. used to handle optional compilations of pieces of code depending of the word
  5618. size, the version of the compiler, ...")
  5619. (license license:asl2.0)))
  5620. (define-public ocaml4.07-ppx-optcomp
  5621. (package-with-ocaml4.07
  5622. (package
  5623. (inherit ocaml-ppx-optcomp)
  5624. (version "0.11.0")
  5625. (source
  5626. (janestreet-origin
  5627. "ppx_optcomp" version
  5628. "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
  5629. (properties `((upstream-name . "ppx_optcomp"))))))
  5630. (define-public ocaml-ppx-let
  5631. (package
  5632. (name "ocaml-ppx-let")
  5633. (version "0.14.0")
  5634. (source
  5635. (janestreet-origin "ppx_let" version
  5636. "1qcrnd86pbr1di5m6z4ps4p15qawwa02jxwz3xfd82hdbjmdwf1s"))
  5637. (build-system dune-build-system)
  5638. (propagated-inputs
  5639. `(("ocaml-base" ,ocaml-base)
  5640. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5641. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5642. (properties `((upstream-name . "ppx_let")
  5643. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
  5644. (home-page "https://github.com/janestreet/ppx_let")
  5645. (synopsis "Monadic let-bindings")
  5646. (description "A ppx rewriter for monadic and applicative let bindings,
  5647. match expressions, and if expressions.")
  5648. (license license:asl2.0)))
  5649. (define-public ocaml4.07-ppx-let
  5650. (package-with-ocaml4.07
  5651. (package
  5652. (inherit ocaml-ppx-let)
  5653. (version "0.11.0")
  5654. (source
  5655. (janestreet-origin "ppx_let" version
  5656. "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
  5657. (properties `(upstream-name . "ppx_let")))))
  5658. (define-public ocaml4.07-ppx-fail
  5659. (package
  5660. (name "ocaml4.07-ppx-fail")
  5661. (version "0.11.0")
  5662. (source (origin
  5663. (method url-fetch)
  5664. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5665. (version-major+minor version)
  5666. "/files/ppx_fail-v" version ".tar.gz"))
  5667. (sha256
  5668. (base32
  5669. "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
  5670. (build-system dune-build-system)
  5671. (arguments
  5672. `(#:ocaml ,ocaml-4.07
  5673. #:findlib ,ocaml4.07-findlib
  5674. #:dune ,ocaml4.07-dune))
  5675. (propagated-inputs
  5676. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5677. ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
  5678. ("ocaml-migrate-parsetree"
  5679. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5680. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5681. (properties `((upstream-name . "ppx_fail")))
  5682. (home-page "https://github.com/janestreet/ppx_fail")
  5683. (synopsis "Add location to calls to failwiths")
  5684. (description "Syntax extension that makes [failwiths] always include a
  5685. position.")
  5686. (license license:asl2.0)))
  5687. (define-public ocaml-ppx-cold
  5688. (package
  5689. (name "ocaml-ppx-cold")
  5690. (version "0.14.0")
  5691. (home-page "https://github.com/janestreet/ppx_cold")
  5692. (source
  5693. (janestreet-origin "ppx_cold" version
  5694. "1madfzhpir9amnxmg530n70vll0jrl59vyp71miji73i6b9sy6n2"))
  5695. (build-system dune-build-system)
  5696. (arguments `(#:test-target "tests"))
  5697. (propagated-inputs
  5698. `(("ocaml-base" ,ocaml-base)
  5699. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5700. (properties `((upstream-name . "ppx_cold")))
  5701. (synopsis "Syntax extension for indicating cold path")
  5702. (description
  5703. "This package contains an syntax extension to indicate that the code is
  5704. on the cold path and should be kept out of the way to avoid polluting the
  5705. instruction cache on the hot path. See also
  5706. https://github.com/ocaml/ocaml/issues/8563.")
  5707. (license license:expat)))
  5708. (define-public ocaml-ppx-assert
  5709. (package
  5710. (name "ocaml-ppx-assert")
  5711. (version "0.14.0")
  5712. (source
  5713. (janestreet-origin "ppx_assert" version
  5714. "1l2rr4jz2q5b35ryn2z146z7m9v6k8krp5gpn8ilib66mnz5zx15"))
  5715. (build-system dune-build-system)
  5716. (propagated-inputs
  5717. `(("ocaml-base" ,ocaml-base)
  5718. ("ocaml-ppx-cold" ,ocaml-ppx-cold)
  5719. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5720. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5721. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5722. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5723. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5724. (properties `((upstream-name . "ppx_assert")
  5725. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
  5726. (home-page "https://github.com/janestreet/ppx_assert")
  5727. (synopsis "Assert-like extension nodes that raise useful errors on failure")
  5728. (description "This package contains assert-like extension nodes that raise
  5729. useful errors on failure.")
  5730. (license license:asl2.0)))
  5731. (define-public ocaml4.07-ppx-assert
  5732. (package-with-ocaml4.07
  5733. (package
  5734. (inherit ocaml-ppx-assert)
  5735. (version "0.11.0")
  5736. (source
  5737. (janestreet-origin "ppx_assert" version
  5738. "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
  5739. (propagated-inputs
  5740. `(("ocaml-base" ,ocaml-base)
  5741. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5742. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5743. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5744. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5745. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5746. (properties `((upstream-name . "ppx_assert"))))))
  5747. (define-public ocaml-ppx-expect
  5748. (package
  5749. (name "ocaml-ppx-expect")
  5750. (version "0.14.1")
  5751. (source
  5752. (origin
  5753. (method git-fetch)
  5754. (uri (git-reference
  5755. (url "https://github.com/janestreet/ppx_expect")
  5756. (commit (string-append "v" version))))
  5757. (file-name (git-file-name name version))
  5758. (sha256
  5759. (base32
  5760. "0vbbnjrzpyk5p0js21lafr6fcp2wqka89p1876rdf472cmg0l7fv"))))
  5761. (build-system dune-build-system)
  5762. (propagated-inputs
  5763. `(("ocaml-base" ,ocaml-base)
  5764. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5765. ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5766. ("ocaml-stdio" ,ocaml-stdio)
  5767. ("ocaml-ppxlib" ,ocaml-ppxlib)
  5768. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5769. ("ocaml-re" ,ocaml-re)))
  5770. (properties `((upstream-name . "ppx_expect")
  5771. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
  5772. (home-page "https://github.com/janestreet/ppx_expect")
  5773. (synopsis "Cram like framework for OCaml")
  5774. (description "Expect-test is a framework for writing tests in OCaml, similar
  5775. to Cram. Expect-tests mimics the existing inline tests framework with the
  5776. @code{let%expect_test} construct. The body of an expect-test can contain
  5777. output-generating code, interleaved with @code{%expect} extension expressions
  5778. to denote the expected output.")
  5779. (license license:asl2.0)))
  5780. (define-public ocaml4.07-ppx-expect
  5781. (package-with-ocaml4.07
  5782. (package
  5783. (inherit ocaml-ppx-expect)
  5784. (version "0.12.0")
  5785. (source
  5786. (janestreet-origin "ppx_expect" version
  5787. "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
  5788. (propagated-inputs
  5789. `(("ocaml-base" ,ocaml-base)
  5790. ("ocaml-ppx-assert" ,ocaml-ppx-assert)
  5791. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5792. ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
  5793. ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
  5794. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5795. ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5796. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5797. ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
  5798. ("ocaml-stdio" ,ocaml-stdio)
  5799. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5800. ("ocaml-ppxlib" ,ocaml-ppxlib)
  5801. ("ocaml-re" ,ocaml-re)))
  5802. (properties `((upstream-name . "ppx_expect"))))))
  5803. (define-public ocaml-ppx-js-style
  5804. (package
  5805. (name "ocaml-ppx-js-style")
  5806. (version "0.14.0")
  5807. (source
  5808. (janestreet-origin "ppx_js_style" version
  5809. "141fgxfipfn5jdaxc946dmp5y4fcnbhxms9maji9ddywgx82ya7l"))
  5810. (build-system dune-build-system)
  5811. (arguments `(#:tests? #f)) ; No tests
  5812. (propagated-inputs
  5813. `(("ocaml-base" ,ocaml-base)
  5814. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5815. ("ocaml-octavius" ,ocaml-octavius)
  5816. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5817. (properties `((upstream-name . "ppx_js_style")
  5818. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
  5819. (home-page "https://github.com/janestreet/ppx_js_style")
  5820. (synopsis "Code style checker for Jane Street Packages")
  5821. (description "This package is a no-op ppx rewriter. It is used as a
  5822. @code{lint} tool to enforce some coding conventions across all Jane Street
  5823. packages.")
  5824. (license license:asl2.0)))
  5825. (define-public ocaml4.07-ppx-js-style
  5826. (package-with-ocaml4.07
  5827. (package
  5828. (inherit ocaml-ppx-js-style)
  5829. (version "0.11.0")
  5830. (source
  5831. (janestreet-origin "ppx_js_style" version
  5832. "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
  5833. (properties `((upstream-name . "ppx_js_style"))))))
  5834. (define-public ocaml4.07-ppx-typerep-conv
  5835. (package
  5836. (name "ocaml4.07-ppx-typerep-conv")
  5837. (version "0.11.1")
  5838. (source (origin
  5839. (method git-fetch)
  5840. (uri (git-reference
  5841. (url "https://github.com/janestreet/ppx_typerep_conv")
  5842. (commit (string-append "v" version))))
  5843. (file-name (git-file-name name version))
  5844. (sha256
  5845. (base32
  5846. "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
  5847. (build-system dune-build-system)
  5848. (arguments
  5849. `(#:test-target "."
  5850. #:ocaml ,ocaml-4.07
  5851. #:findlib ,ocaml4.07-findlib
  5852. #:dune ,ocaml4.07-dune))
  5853. (propagated-inputs
  5854. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5855. ("ocaml-typerep" ,ocaml4.07-typerep)
  5856. ("ocaml-migrate-parsetree"
  5857. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5858. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5859. (properties `((upstream-name . "ppx_typerep_conv")))
  5860. (home-page "https://github.com/janestreet/ppx_typerep_conv")
  5861. (synopsis "Generation of runtime types from type declarations")
  5862. (description "This package can automatically generate runtime types
  5863. from type definitions.")
  5864. (license license:asl2.0)))
  5865. (define-public ocaml-ppx-base
  5866. (package
  5867. (name "ocaml-ppx-base")
  5868. (version "0.14.0")
  5869. (source
  5870. (janestreet-origin
  5871. "ppx_base" version
  5872. "0b7a3fmi90jk8paz0g36yzaq670fbnrbi1j8r5ibh9wbcfli7ji6"))
  5873. (build-system dune-build-system)
  5874. (arguments
  5875. `(#:test-target "."))
  5876. (propagated-inputs
  5877. `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5878. ("ocaml-ppx-cold" ,ocaml-ppx-cold)
  5879. ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
  5880. ("ocaml-ppx-hash" ,ocaml-ppx-hash)
  5881. ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
  5882. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5883. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5884. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5885. (properties `((upstream-name . "ppx_base")
  5886. (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
  5887. (home-page "https://github.com/janestreet/ppx_base")
  5888. (synopsis "Base set of ppx rewriters")
  5889. (description "Ppx_base is the set of ppx rewriters used for Base.
  5890. Note that Base doesn't need ppx to build, it is only used as a
  5891. verification tool.")
  5892. (license license:asl2.0)))
  5893. (define-public ocaml4.07-ppx-base
  5894. (package-with-ocaml4.07
  5895. (package
  5896. (inherit ocaml-ppx-base)
  5897. (version "0.11.0")
  5898. (source
  5899. (janestreet-origin
  5900. "ppx_base" version
  5901. "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
  5902. (propagated-inputs
  5903. `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5904. ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
  5905. ("ocaml-ppx-hash" ,ocaml-ppx-hash)
  5906. ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
  5907. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5908. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5909. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5910. (properties `((upstream-name . "ppx_base"))))))
  5911. (define-public ocaml4.07-ppx-bin-prot
  5912. (package
  5913. (name "ocaml4.07-ppx-bin-prot")
  5914. (version "0.11.1")
  5915. (source (origin
  5916. (method git-fetch)
  5917. (uri (git-reference
  5918. (url "https://github.com/janestreet/ppx_bin_prot")
  5919. (commit (string-append "v" version))))
  5920. (file-name (git-file-name name version))
  5921. (sha256
  5922. (base32
  5923. "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
  5924. (build-system dune-build-system)
  5925. (arguments
  5926. ;; Cyclic dependency with ocaml-ppx-jane
  5927. `(#:tests? #f
  5928. #:ocaml ,ocaml-4.07
  5929. #:findlib ,ocaml4.07-findlib
  5930. #:dune ,ocaml4.07-dune))
  5931. (propagated-inputs
  5932. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  5933. ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
  5934. ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
  5935. ("ocaml-migrate-parsetree"
  5936. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5937. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5938. (properties `((upstream-name . "ppx_bin_prot")))
  5939. (home-page "https://github.com/janestreet/ppx_bin_prot")
  5940. (synopsis "Generation of bin_prot readers and writers from types")
  5941. (description "Generation of binary serialization and deserialization
  5942. functions from type definitions.")
  5943. (license license:asl2.0)))
  5944. (define-public ocaml4.07-ppx-jane
  5945. (package
  5946. (name "ocaml4.07-ppx-jane")
  5947. (version "0.11.0")
  5948. (source (origin
  5949. (method url-fetch)
  5950. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5951. (version-major+minor version)
  5952. "/files/ppx_jane-v" version ".tar.gz"))
  5953. (sha256
  5954. (base32
  5955. "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
  5956. (build-system dune-build-system)
  5957. (arguments
  5958. `(#:test-target "."
  5959. #:ocaml ,ocaml-4.07
  5960. #:findlib ,ocaml4.07-findlib
  5961. #:dune ,ocaml4.07-dune))
  5962. (propagated-inputs
  5963. `(("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml-ppx-assert))
  5964. ("ocaml-ppx-base" ,(package-with-ocaml4.07 ocaml-ppx-base))
  5965. ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
  5966. ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
  5967. ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
  5968. ("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))
  5969. ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
  5970. ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
  5971. ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
  5972. ("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test))
  5973. ("ocaml-ppx-let" ,(package-with-ocaml4.07 ocaml-ppx-let))
  5974. ("ocaml-ppx-optcomp" ,(package-with-ocaml4.07 ocaml-ppx-optcomp))
  5975. ("ocaml-ppx-optional" ,(package-with-ocaml4.07 ocaml-ppx-optional))
  5976. ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
  5977. ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
  5978. ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
  5979. ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
  5980. ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
  5981. ("ocaml-migrate-parsetree"
  5982. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  5983. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  5984. (properties `((upstream-name . "ppx_jane")))
  5985. (home-page "https://github.com/janestreet/ppx_jane")
  5986. (synopsis "Standard Jane Street ppx rewriters")
  5987. (description "This package installs a ppx-jane executable, which is a ppx
  5988. driver including all standard Jane Street ppx rewriters.")
  5989. (license license:asl2.0)))
  5990. (define-public ocaml4.07-splittable-random
  5991. (package
  5992. (name "ocaml4.07-splittable-random")
  5993. (version "0.11.0")
  5994. (source (origin
  5995. (method url-fetch)
  5996. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5997. (version-major+minor version)
  5998. "/files/splittable_random-v" version ".tar.gz"))
  5999. (sha256
  6000. (base32
  6001. "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
  6002. (build-system dune-build-system)
  6003. (arguments
  6004. `(#:ocaml ,ocaml-4.07
  6005. #:findlib ,ocaml4.07-findlib
  6006. #:dune ,ocaml4.07-dune))
  6007. (propagated-inputs
  6008. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  6009. ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
  6010. ("ocaml-migrate-parsetree"
  6011. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
  6012. (properties `((upstream-name . "splittable_random")))
  6013. (home-page "https://github.com/janestreet/splittable_random")
  6014. (synopsis "PRNG that can be split into independent streams")
  6015. (description "This package provides a splittable
  6016. @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
  6017. be used as a stream of random values; it can also be split to produce a
  6018. second, independent stream of random values.
  6019. This library implements a splittable pseudo-random number generator that sacrifices
  6020. cryptographic-quality randomness in favor of performance.")
  6021. (license license:asl2.0)))
  6022. (define-public ocaml4.07-jane-street-headers
  6023. (package
  6024. (name "ocaml4.07-jane-street-headers")
  6025. (version "0.11.0")
  6026. (source (origin
  6027. (method url-fetch)
  6028. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  6029. (version-major+minor version)
  6030. "/files/jane-street-headers-v" version ".tar.gz"))
  6031. (sha256
  6032. (base32
  6033. "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
  6034. (build-system dune-build-system)
  6035. (arguments
  6036. `(#:test-target "."
  6037. #:ocaml ,ocaml-4.07
  6038. #:findlib ,ocaml4.07-findlib
  6039. #:dune ,ocaml4.07-dune))
  6040. (home-page "https://github.com/janestreet/jane-street-headers")
  6041. (synopsis "Jane Street C header files")
  6042. (description "This package provides C header files shared between the
  6043. various Jane Street packages.")
  6044. (license license:asl2.0)))
  6045. (define-public ocaml4.07-configurator
  6046. (package
  6047. (name "ocaml4.07-configurator")
  6048. (version "0.11.0")
  6049. (source (origin
  6050. (method url-fetch)
  6051. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  6052. (version-major+minor version)
  6053. "/files/configurator-v" version ".tar.gz"))
  6054. (sha256
  6055. (base32
  6056. "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
  6057. (build-system dune-build-system)
  6058. (arguments
  6059. ;; No tests
  6060. `(#:tests? #f
  6061. #:ocaml ,ocaml-4.07
  6062. #:findlib ,ocaml4.07-findlib
  6063. #:dune ,ocaml4.07-dune))
  6064. (propagated-inputs
  6065. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  6066. ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
  6067. (home-page "https://github.com/janestreet/configurator")
  6068. (synopsis "Helper library for gathering system configuration")
  6069. (description "Configurator is a small library that helps writing OCaml
  6070. scripts that test features available on the system, in order to generate config.h
  6071. files for instance.
  6072. Configurator allows one to:
  6073. @itemize
  6074. @item test if a C program compiles
  6075. @item query pkg-config
  6076. @item import #define from OCaml header files
  6077. @item generate config.h file
  6078. @end itemize")
  6079. (license license:asl2.0)))
  6080. (define-public ocaml4.07-spawn
  6081. (package
  6082. (name "ocaml4.07-spawn")
  6083. (version "0.13.0")
  6084. (source (origin
  6085. (method git-fetch)
  6086. (uri (git-reference
  6087. (url "https://github.com/janestreet/spawn")
  6088. (commit (string-append "v" version))))
  6089. (file-name (git-file-name name version))
  6090. (sha256
  6091. (base32
  6092. "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
  6093. (build-system dune-build-system)
  6094. (arguments
  6095. `(#:phases
  6096. (modify-phases %standard-phases
  6097. (add-before 'check 'fix-tests
  6098. (lambda _
  6099. (substitute* "test/tests.ml"
  6100. (("/bin/pwd") (which "pwd"))
  6101. (("/bin/echo") (which "echo")))
  6102. #t)))
  6103. #:ocaml ,ocaml-4.07
  6104. #:findlib ,ocaml4.07-findlib
  6105. #:dune ,ocaml4.07-dune))
  6106. (native-inputs
  6107. `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))))
  6108. (home-page "https://github.com/janestreet/spawn")
  6109. (synopsis "Spawning sub-processes")
  6110. (description
  6111. "Spawn is a small library exposing only one functionality: spawning sub-process.
  6112. It has three main goals:
  6113. @itemize
  6114. @item provide missing features of Unix.create_process such as providing a
  6115. working directory,
  6116. @item provide better errors when a system call fails in the
  6117. sub-process. For instance if a command is not found, you get a proper
  6118. @code{Unix.Unix_error} exception,
  6119. @item improve performances by using vfork when available. It is often
  6120. claimed that nowadays fork is as fast as vfork, however in practice
  6121. fork takes time proportional to the process memory while vfork is
  6122. constant time. In application using a lot of memory, vfork can be
  6123. thousands of times faster than fork.
  6124. @end itemize")
  6125. (license license:asl2.0)))
  6126. (define-public ocaml4.07-core
  6127. (package
  6128. (name "ocaml4.07-core")
  6129. (version "0.11.3")
  6130. (source (origin
  6131. (method git-fetch)
  6132. (uri (git-reference
  6133. (url "https://github.com/janestreet/core")
  6134. (commit (string-append "v" version))))
  6135. (file-name (git-file-name name version))
  6136. (sha256
  6137. (base32
  6138. "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
  6139. (build-system dune-build-system)
  6140. (arguments
  6141. `(#:package "core"
  6142. #:tests? #f; Require a cyclic dependency: core_extended
  6143. #:ocaml ,ocaml-4.07
  6144. #:findlib ,ocaml4.07-findlib
  6145. #:dune ,ocaml4.07-dune))
  6146. (propagated-inputs
  6147. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  6148. ("ocaml-configurator" ,ocaml4.07-configurator)
  6149. ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
  6150. ("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml-ppx-assert))
  6151. ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
  6152. ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
  6153. ("ocaml-spawn" ,ocaml4.07-spawn)
  6154. ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
  6155. ("ocaml-migrate-parsetree"
  6156. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
  6157. ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
  6158. (home-page "https://github.com/janestreet/core")
  6159. (synopsis "Alternative to OCaml's standard library")
  6160. (description "The Core suite of libraries is an alternative to OCaml's
  6161. standard library that was developed by Jane Street.")
  6162. ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
  6163. ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
  6164. (license license:asl2.0)))
  6165. (define-public ocaml4.07-core-kernel
  6166. (package
  6167. (name "ocaml4.07-core-kernel")
  6168. (version "0.11.1")
  6169. (source (origin
  6170. (method git-fetch)
  6171. (uri (git-reference
  6172. (url "https://github.com/janestreet/core_kernel")
  6173. (commit (string-append "v" version))))
  6174. (file-name (git-file-name name version))
  6175. (sha256
  6176. (base32
  6177. "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
  6178. (build-system dune-build-system)
  6179. (arguments
  6180. ;; Cyclic dependency with ocaml-core
  6181. `(#:tests? #f
  6182. #:ocaml ,ocaml-4.07
  6183. #:findlib ,ocaml4.07-findlib
  6184. #:dune ,ocaml4.07-dune))
  6185. (propagated-inputs
  6186. `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  6187. ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
  6188. ("ocaml-configurator" ,ocaml4.07-configurator)
  6189. ("ocaml-fieldslib" ,(package-with-ocaml4.07 ocaml-fieldslib))
  6190. ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
  6191. ("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml-ppx-assert))
  6192. ("ocaml-ppx-base" ,(package-with-ocaml4.07 ocaml-ppx-base))
  6193. ("ocaml-ppx-hash" ,(package-with-ocaml4.07 ocaml-ppx-hash))
  6194. ("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test))
  6195. ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
  6196. ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
  6197. ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
  6198. ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
  6199. ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
  6200. ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
  6201. ("ocaml-typerep" ,ocaml4.07-typerep)
  6202. ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib))
  6203. ("ocaml-migrate-parsetree"
  6204. ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
  6205. (properties `((upstream-name . "core_kernel")))
  6206. (home-page "https://github.com/janestreet/core_kernel")
  6207. (synopsis "Portable standard library for OCaml")
  6208. (description "Core is an alternative to the OCaml standard library.
  6209. Core_kernel is the system-independent part of Core. It is aimed for cases when
  6210. the full Core is not available, such as in Javascript.")
  6211. (license (list
  6212. ;; this package and parts of OCaml, relicensed by janestreet
  6213. license:asl2.0
  6214. ;; MLton and sjs
  6215. license:expat))))
  6216. (define-public ocaml-markup
  6217. (package
  6218. (name "ocaml-markup")
  6219. (version "1.0.2")
  6220. (home-page "https://github.com/aantron/markup.ml")
  6221. (source
  6222. (origin
  6223. (method git-fetch)
  6224. (uri (git-reference
  6225. (url (string-append home-page ".git"))
  6226. (commit version)))
  6227. (file-name (git-file-name name version))
  6228. (sha256
  6229. (base32
  6230. "1kvqwrrcrys5d0kzdwxcj66jpi6sdhfas4pcg02pixx92q87vhqm"))))
  6231. (build-system dune-build-system)
  6232. (arguments
  6233. `(#:package "markup"))
  6234. (propagated-inputs
  6235. `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
  6236. ("ocaml-uchar" ,ocaml-uchar)
  6237. ("ocaml-uutf" ,ocaml-uutf)
  6238. ("ocaml-lwt" ,ocaml-lwt)))
  6239. (native-inputs
  6240. `(("ocaml-ounit2" ,ocaml-ounit2)
  6241. ("pkg-config" ,pkg-config)))
  6242. (properties
  6243. `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
  6244. (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
  6245. (description "Markup.ml provides an HTML parser and an XML parser. The
  6246. parsers are wrapped in a simple interface: they are functions that transform
  6247. byte streams to parsing signal streams. Streams can be manipulated in various
  6248. ways, such as processing by fold, filter, and map, assembly into DOM tree
  6249. structures, or serialization back to HTML or XML.
  6250. Both parsers are based on their respective standards. The HTML parser, in
  6251. particular, is based on the state machines defined in HTML5.
  6252. The parsers are error-recovering by default, and accept fragments. This makes
  6253. it very easy to get a best-effort parse of some input. The parsers can,
  6254. however, be easily configured to be strict, and to accept only full documents.
  6255. Apart from this, the parsers are streaming (do not build up a document in
  6256. memory), non-blocking (can be used with threading libraries), lazy (do not
  6257. consume input unless the signal stream is being read), and process the input in
  6258. a single pass. They automatically detect the character encoding of the input
  6259. stream, and convert everything to UTF-8.")
  6260. (license license:bsd-3)))
  6261. ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
  6262. ;; package-with-ocaml4.07
  6263. (define-public ocaml-markup0.8.0
  6264. (package
  6265. (inherit ocaml-markup)
  6266. (name "ocaml-markup")
  6267. (version "0.8.0")
  6268. (home-page "https://github.com/aantron/markup.ml")
  6269. (source
  6270. (origin
  6271. (method git-fetch)
  6272. (uri (git-reference
  6273. (url (string-append home-page ".git"))
  6274. (commit version)))
  6275. (file-name (git-file-name name version))
  6276. (sha256
  6277. (base32
  6278. "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
  6279. (native-inputs
  6280. `(("ocaml-ounit" ,ocaml-ounit)
  6281. ("pkg-config" ,pkg-config)))
  6282. (properties '())))
  6283. (define-public ocaml-tyxml
  6284. (package
  6285. (name "ocaml-tyxml")
  6286. (version "4.4.0")
  6287. (source
  6288. (origin
  6289. (method git-fetch)
  6290. (uri (git-reference
  6291. (url "https://github.com/ocsigen/tyxml")
  6292. (commit version)))
  6293. (file-name (git-file-name name version))
  6294. (sha256
  6295. (base32
  6296. "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
  6297. (build-system dune-build-system)
  6298. (inputs
  6299. `(("ocaml-re" ,ocaml-re)
  6300. ("ocaml-seq" ,ocaml-seq)
  6301. ("ocaml-uutf" ,ocaml-uutf)
  6302. ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
  6303. ("ocaml-markup" ,ocaml-markup)))
  6304. (native-inputs
  6305. `(("ocaml-alcotest" ,ocaml-alcotest)))
  6306. (arguments `(#:package "tyxml"))
  6307. (home-page "https://github.com/ocsigen/tyxml/")
  6308. (synopsis "TyXML is a library for building correct HTML and SVG documents")
  6309. (description "TyXML provides a set of convenient combinators that uses the
  6310. OCaml type system to ensure the validity of the generated documents. TyXML can
  6311. be used with any representation of HTML and SVG: the textual one, provided
  6312. directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
  6313. (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
  6314. also create your own representation and use it to instantiate a new set of
  6315. combinators.")
  6316. (license license:lgpl2.1)))
  6317. (define-public ocaml-bisect-ppx
  6318. (package
  6319. (name "ocaml-bisect-ppx")
  6320. (version "2.6.1")
  6321. (source
  6322. (origin
  6323. (method git-fetch)
  6324. (uri (git-reference
  6325. (url "https://github.com/aantron/bisect_ppx")
  6326. (commit version)))
  6327. (file-name (git-file-name name version))
  6328. (sha256
  6329. (base32
  6330. "1knglw1b2kjr9jnd8cpfzmm581abxxdcx9l3cd2balg6gnac7qk1"))))
  6331. (build-system dune-build-system)
  6332. (propagated-inputs
  6333. `(("ocaml-ppxlib" ,ocaml-ppxlib)
  6334. ("ocaml-cmdliner" ,ocaml-cmdliner)))
  6335. (arguments
  6336. ;; Tests require ocamlformat which would lead to circular dependencies
  6337. '(#:tests? #f))
  6338. (properties '((upstream-name . "bisect_ppx")))
  6339. (home-page "https://github.com/aantron/bisect_ppx")
  6340. (synopsis "Code coverage for OCaml")
  6341. (description "Bisect_ppx helps you test thoroughly. It is a small
  6342. preprocessor that inserts instrumentation at places in your code, such as
  6343. if-then-else and match expressions. After you run tests, Bisect_ppx gives a
  6344. nice HTML report showing which places were visited and which were missed.
  6345. Usage is simple - add package bisect_ppx when building tests, run your tests,
  6346. then run the Bisect_ppx report tool on the generated visitation files.")
  6347. (license license:mpl2.0)))
  6348. (define-public ocaml-odoc
  6349. (package
  6350. (name "ocaml-odoc")
  6351. (version "1.5.2")
  6352. (source
  6353. (origin
  6354. (method git-fetch)
  6355. (uri (git-reference
  6356. (url "https://github.com/ocaml/odoc")
  6357. (commit version)))
  6358. (file-name (git-file-name name version))
  6359. (sha256
  6360. (base32 "0fqfyz48q7ss5bc4c5phmp4s3ka3vc08b8gfk8fvyryvb4bq27jm"))))
  6361. (build-system dune-build-system)
  6362. (inputs
  6363. `(("ocaml-alcotest" ,ocaml-alcotest)
  6364. ("ocaml-markup" ,ocaml-markup)
  6365. ("ocaml-sexplib" ,ocaml-sexplib)
  6366. ("ocaml-re" ,ocaml-re)
  6367. ("ocaml-uutf" ,ocaml-uutf)))
  6368. (native-inputs
  6369. `(("ocaml-astring" ,ocaml-astring)
  6370. ("ocaml-cmdliner" ,ocaml-cmdliner)
  6371. ("ocaml-cppo" ,ocaml-cppo)
  6372. ("ocaml-fpath" ,ocaml-fpath)
  6373. ("ocaml-result" ,ocaml-result)
  6374. ("ocaml-tyxml" ,ocaml-tyxml)
  6375. ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
  6376. ("tidy-html" ,tidy-html)))
  6377. (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
  6378. (home-page "https://github.com/ocaml/odoc")
  6379. (synopsis "OCaml documentation generator")
  6380. (description "Odoc is a documentation generator for OCaml. It reads
  6381. @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
  6382. @acronym{HTML}.
  6383. Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
  6384. advantage over ocamldoc is an accurate cross-referencer, which handles the
  6385. complexity of the OCaml module system.")
  6386. (license license:isc)))
  6387. (define-public ocaml-odoc-parser
  6388. (package
  6389. (name "ocaml-odoc-parser")
  6390. (version "0.9.0")
  6391. (source
  6392. (origin
  6393. (method git-fetch)
  6394. (uri (git-reference
  6395. (url "https://github.com/ocaml-doc/odoc-parser")
  6396. (commit version)))
  6397. (file-name (git-file-name name version))
  6398. (sha256
  6399. (base32
  6400. "1jlc6dp3v90r1ra7r0jfw0xs8rylwdz9gymw4rd53h0p17cw1wnj"))))
  6401. (build-system dune-build-system)
  6402. (propagated-inputs
  6403. `(("ocaml-astring" ,ocaml-astring)
  6404. ("ocaml-result" ,ocaml-result)))
  6405. (native-inputs
  6406. `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
  6407. (home-page "https://github.com/ocaml-doc/odoc-parser")
  6408. (synopsis "Parser for ocaml documentation comments")
  6409. (description
  6410. "This package provides a library for parsing the contents of OCaml
  6411. documentation comments, formatted using Odoc syntax, an extension of the
  6412. language understood by ocamldoc.")
  6413. (license license:isc)))
  6414. ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
  6415. ;; with old version of dune used in package-with-ocaml4.07
  6416. (define-public ocaml4.07-odoc
  6417. (package-with-ocaml4.07
  6418. (package
  6419. (inherit ocaml-odoc)
  6420. (name "ocaml-odoc")
  6421. (version "1.5.1")
  6422. (source
  6423. (origin
  6424. (method git-fetch)
  6425. (uri (git-reference
  6426. (url "https://github.com/ocaml/odoc")
  6427. (commit version)))
  6428. (file-name (git-file-name name version))
  6429. (sha256
  6430. (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
  6431. (properties '()))))
  6432. (define-public ocaml4.07-fftw3
  6433. (package
  6434. (name "ocaml4.07-fftw3")
  6435. (version "0.8.4")
  6436. (source
  6437. (origin
  6438. (method git-fetch)
  6439. (uri (git-reference
  6440. (url "https://github.com/Chris00/fftw-ocaml")
  6441. (commit version)))
  6442. (file-name (git-file-name name version))
  6443. (sha256
  6444. (base32
  6445. "0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
  6446. (build-system dune-build-system)
  6447. (arguments
  6448. `(#:tests? #t
  6449. #:test-target "tests"
  6450. #:ocaml ,ocaml-4.07
  6451. #:findlib ,ocaml4.07-findlib
  6452. #:dune ,ocaml4.07-dune))
  6453. (propagated-inputs
  6454. `(("fftw" ,fftw)
  6455. ("fftwf" ,fftwf)))
  6456. (native-inputs
  6457. `(("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
  6458. ("ocaml-lacaml" ,ocaml4.07-lacaml)))
  6459. (home-page
  6460. "https://github.com/Chris00/fftw-ocaml")
  6461. (synopsis
  6462. "Bindings to FFTW3")
  6463. (description
  6464. "Bindings providing OCaml support for the seminal Fast Fourier Transform
  6465. library FFTW.")
  6466. (license license:lgpl2.1))) ; with static linking exception.
  6467. (define-public ocaml4.07-lacaml
  6468. (package
  6469. (name "ocaml4.07-lacaml")
  6470. (version "11.0.5")
  6471. (source
  6472. (origin
  6473. (method git-fetch)
  6474. (uri (git-reference
  6475. (url "https://github.com/mmottl/lacaml")
  6476. (commit version)))
  6477. (file-name (git-file-name name version))
  6478. (sha256
  6479. (base32
  6480. "180yb79a3qgx067qcpm50q12hrimjygf06rgkzbish9d1zfm670c"))))
  6481. (build-system dune-build-system)
  6482. (arguments
  6483. `(#:tests? #f ; No test target.
  6484. #:ocaml ,ocaml-4.07
  6485. #:findlib ,ocaml4.07-findlib
  6486. #:dune ,ocaml4.07-dune))
  6487. (native-inputs
  6488. `(("openblas" ,openblas)
  6489. ("lapack" ,lapack)
  6490. ("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
  6491. ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
  6492. (home-page "https://mmottl.github.io/lacaml/")
  6493. (synopsis
  6494. "OCaml-bindings to BLAS and LAPACK")
  6495. (description
  6496. "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
  6497. LAPACK-library (Linear Algebra routines). It also contains many additional
  6498. convenience functions for vectors and matrices.")
  6499. (license license:lgpl2.1)))
  6500. (define-public ocaml-cairo2
  6501. (package
  6502. (name "ocaml-cairo2")
  6503. (version "0.6.2")
  6504. (source (origin
  6505. (method git-fetch)
  6506. (uri (git-reference
  6507. (url "https://github.com/Chris00/ocaml-cairo")
  6508. (commit version)))
  6509. (file-name (git-file-name name version))
  6510. (sha256
  6511. (base32
  6512. "04rp5y1rlq1pw592yywhvqd5x7csmyi9ad4f32g99nakb10s4nhx"))))
  6513. (build-system dune-build-system)
  6514. (arguments
  6515. `(#:test-target "tests"))
  6516. (inputs
  6517. `(("cairo" ,cairo)
  6518. ("gtk+-2" ,gtk+-2)
  6519. ("lablgtk" ,lablgtk)))
  6520. (native-inputs
  6521. `(("pkg-config" ,pkg-config)))
  6522. (home-page "https://github.com/Chris00/ocaml-cairo")
  6523. (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
  6524. (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
  6525. with support for multiple output devices. Currently supported output targets
  6526. include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
  6527. and SVG file output.")
  6528. (license license:lgpl3+)))
  6529. (define-public ocaml-version
  6530. (package
  6531. (name "ocaml-version")
  6532. (version "3.0.0")
  6533. (source
  6534. (origin
  6535. (method git-fetch)
  6536. (uri (git-reference
  6537. (url "https://github.com/ocurrent/ocaml-version")
  6538. (commit (string-append "v" version))))
  6539. (file-name (git-file-name name version))
  6540. (sha256
  6541. (base32
  6542. "13770mp6adjjbx63zsbh6506dqxz241chw8c3y403sxpw45hnaw6"))))
  6543. (build-system dune-build-system)
  6544. (arguments `(#:tests? #f)) ; no tests
  6545. (properties '((upstream-name . "ocaml-version")))
  6546. (home-page
  6547. "https://github.com/ocurrent/ocaml-version")
  6548. (synopsis
  6549. "Manipulate, parse and generate OCaml compiler version strings")
  6550. (description
  6551. "This library provides facilities to parse version numbers of the OCaml
  6552. compiler, and enumerates the various official OCaml releases and configuration
  6553. variants.")
  6554. (license license:isc)))
  6555. (define-public ocaml-mdx
  6556. (package
  6557. (name "ocaml-mdx")
  6558. (version "1.11.0")
  6559. (source (origin
  6560. (method git-fetch)
  6561. (uri (git-reference
  6562. (url "https://github.com/realworldocaml/mdx")
  6563. (commit version)))
  6564. (file-name (git-file-name name version))
  6565. (sha256
  6566. (base32
  6567. "1w2vx4my9z6n57vjvsa3b9vwkbdzs1kq0cc58rf088qrh2lrx2ba"))))
  6568. (build-system dune-build-system)
  6569. (inputs
  6570. `(("ocaml-fmt" ,ocaml-fmt)
  6571. ("ocaml-astring" ,ocaml-astring)
  6572. ("ocaml-logs" ,ocaml-logs)
  6573. ("ocaml-cmdliner" ,ocaml-cmdliner)
  6574. ("ocaml-re" ,ocaml-re)
  6575. ("ocaml-result" ,ocaml-result)
  6576. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)
  6577. ("ocaml-odoc" ,ocaml-odoc)
  6578. ("ocaml-odoc-parser" ,ocaml-odoc-parser)
  6579. ("ocaml-version" ,ocaml-version)))
  6580. (native-inputs
  6581. `(("ocaml-cppo" ,ocaml-cppo)
  6582. ("ocaml-lwt" ,ocaml-lwt)
  6583. ("ocaml-alcotest" ,ocaml-alcotest)))
  6584. (home-page
  6585. "https://github.com/realworldocaml/mdx")
  6586. (synopsis
  6587. "Executable code blocks inside markdown files")
  6588. (description
  6589. "@code{ocaml-mdx} executes code blocks inside markdown files.
  6590. There are (currently) two sub-commands, corresponding
  6591. to two modes of operations: pre-processing (@code{ocaml-mdx pp})
  6592. and tests (@code{ocaml-mdx test}]).
  6593. The pre-processor mode allows mixing documentation and code,
  6594. and to practice @dfn{literate programming} using markdown and OCaml.
  6595. The test mode ensures that shell scripts and OCaml fragments
  6596. in the documentation always stays up-to-date.
  6597. @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
  6598. @code{mdx} which are the same, mdx being the deprecated name, kept for now for
  6599. compatibility.")
  6600. (license license:isc)))
  6601. (define-public ocaml-mparser
  6602. (package
  6603. (name "ocaml-mparser")
  6604. (version "1.3")
  6605. (source
  6606. (origin
  6607. (method git-fetch)
  6608. (uri (git-reference
  6609. (url "https://github.com/murmour/mparser")
  6610. (commit version)))
  6611. (file-name (git-file-name name version))
  6612. (sha256
  6613. (base32
  6614. "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
  6615. (build-system dune-build-system)
  6616. (arguments
  6617. ;; No tests.
  6618. '(#:package "mparser"
  6619. #:tests? #f))
  6620. (home-page "https://github.com/murmour/mparser")
  6621. (synopsis "Simple monadic parser combinator library")
  6622. (description
  6623. "This library implements a rather complete and efficient monadic parser
  6624. combinator library similar to the Parsec library for Haskell by Daan Leijen and
  6625. the FParsec library for FSharp by Stephan Tolksdorf.")
  6626. ;; With static linking exception.
  6627. (license license:lgpl2.1+)))
  6628. (define-public ocaml-mparser-re
  6629. (package
  6630. (inherit ocaml-mparser)
  6631. (name "ocaml-mparser-re")
  6632. (arguments
  6633. ;; No tests.
  6634. '(#:package "mparser-re"
  6635. #:tests? #f))
  6636. (propagated-inputs
  6637. `(("ocaml-mparser" ,ocaml-mparser)
  6638. ("ocaml-re" ,ocaml-re)))
  6639. (synopsis "MParser plugin for RE-based regular expressions")
  6640. (description "This package provides RE-based regular expressions
  6641. support for Mparser.")))
  6642. (define-public ocaml-mparser-pcre
  6643. (package
  6644. (inherit ocaml-mparser)
  6645. (name "ocaml-mparser-pcre")
  6646. (arguments
  6647. ;; No tests.
  6648. '(#:package "mparser-pcre"
  6649. #:tests? #f))
  6650. (propagated-inputs
  6651. `(("ocaml-mparser" ,ocaml-mparser)
  6652. ("ocaml-pcre" ,ocaml-pcre)))
  6653. (synopsis "MParser plugin for PCRE-based regular expressions")
  6654. (description "This package provides PCRE-based regular expressions
  6655. support for Mparser.")))
  6656. (define-public lablgtk3
  6657. (package
  6658. (name "lablgtk")
  6659. (version "3.1.1")
  6660. (source (origin
  6661. (method git-fetch)
  6662. (uri (git-reference
  6663. (url "https://github.com/garrigue/lablgtk")
  6664. (commit version)))
  6665. (file-name (git-file-name name version))
  6666. (sha256
  6667. (base32
  6668. "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
  6669. (build-system dune-build-system)
  6670. (arguments
  6671. `(#:tests? #t
  6672. #:test-target "."
  6673. #:phases
  6674. (modify-phases %standard-phases
  6675. (add-before 'build 'make-writable
  6676. (lambda _
  6677. (for-each (lambda (file)
  6678. (chmod file #o644))
  6679. (find-files "." "."))))
  6680. (add-before 'build 'set-version
  6681. (lambda _
  6682. (substitute* "dune-project"
  6683. (("\\(name lablgtk3\\)")
  6684. (string-append "(name lablgtk3)\n(version " ,version ")"))))))))
  6685. (propagated-inputs
  6686. `(("ocaml-cairo2" ,ocaml-cairo2)))
  6687. (inputs
  6688. `(("camlp5" ,camlp5)
  6689. ("gtk+" ,gtk+)
  6690. ("gtksourceview-3" ,gtksourceview-3)
  6691. ("gtkspell3" ,gtkspell3)))
  6692. (native-inputs
  6693. `(("pkg-config" ,pkg-config)))
  6694. (home-page "https://github.com/garrigue/lablgtk")
  6695. (synopsis "OCaml interface to GTK+3")
  6696. (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
  6697. provides a strongly-typed object-oriented interface that is compatible with the
  6698. dynamic typing of GTK+. Most widgets and methods are available. LablGtk
  6699. also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
  6700. LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
  6701. generate OCaml code from .glade files), libpanel, librsvg and quartz.")
  6702. ;; Version 2 only, with linking exception.
  6703. (license license:lgpl2.0)))
  6704. (define-public ocaml-reactivedata
  6705. ;; Future releases will use dune.
  6706. (package
  6707. (name "ocaml-reactivedata")
  6708. (version "0.2.2")
  6709. (source (origin
  6710. (method git-fetch)
  6711. (uri (git-reference
  6712. (url "https://github.com/ocsigen/reactiveData")
  6713. (commit version)))
  6714. (file-name (git-file-name name version))
  6715. (sha256
  6716. (base32
  6717. "0l5z0fsckqkywjbn2nwy3s55h85yx8scc4hq9qzr9ig3hrq1mfb0"))))
  6718. (arguments
  6719. `(#:phases
  6720. (modify-phases %standard-phases
  6721. (delete 'configure)
  6722. (add-before 'build 'fix-deprecated
  6723. (lambda _
  6724. (substitute*
  6725. "src/reactiveData.ml"
  6726. (("Pervasives.compare") "compare"))
  6727. #t))
  6728. (add-before 'install 'forget-makefile
  6729. ;; Ensure we use opam to install files
  6730. (lambda _
  6731. (delete-file "Makefile")
  6732. #t)))))
  6733. (build-system ocaml-build-system)
  6734. (properties `((upstream-name . "reactiveData")))
  6735. (native-inputs
  6736. `(("ocamlbuild" ,ocamlbuild)
  6737. ("opam" ,opam)))
  6738. (propagated-inputs
  6739. `(("ocaml-react" ,ocaml-react)))
  6740. (home-page "https://github.com/ocsigen/reactiveData")
  6741. (synopsis "Declarative events and signals for OCaml")
  6742. (description
  6743. "React is an OCaml module for functional reactive programming (FRP). It
  6744. provides support to program with time varying values: declarative events and
  6745. signals. React doesn't define any primitive event or signal, it lets the
  6746. client chooses the concrete timeline.")
  6747. (license license:lgpl2.1+)))
  6748. (define-public ocaml-uucd
  6749. (package
  6750. (name "ocaml-uucd")
  6751. (version "13.0.0")
  6752. (source
  6753. (origin
  6754. (method url-fetch)
  6755. (uri (string-append "https://erratique.ch/software/uucd/releases/"
  6756. "uucd-" version ".tbz"))
  6757. (sha256
  6758. (base32
  6759. "1fg77hg4ibidkv1x8hhzl8z3rzmyymn8m4i35jrdibb8adigi8v2"))))
  6760. (build-system ocaml-build-system)
  6761. (arguments
  6762. '(#:build-flags '("build" "--tests" "true")
  6763. #:phases
  6764. (modify-phases %standard-phases
  6765. (delete 'configure))))
  6766. (propagated-inputs
  6767. `(("ocaml-xmlm" ,ocaml-xmlm)))
  6768. (native-inputs
  6769. `(("opam" ,opam)
  6770. ("ocaml-findlib" ,ocaml-findlib)
  6771. ("ocamlbuild" ,ocamlbuild)
  6772. ("ocaml-topkg" ,ocaml-topkg)))
  6773. (home-page "https://erratique.ch/software/uucd")
  6774. (synopsis "Unicode character database decoder for OCaml")
  6775. (description "Uucd is an OCaml module to decode the data of the Unicode
  6776. character database from its XML representation. It provides high-level (but
  6777. not necessarily efficient) access to the data so that efficient
  6778. representations can be extracted.")
  6779. (license license:isc)))
  6780. (define-public ocaml-uucp
  6781. (package
  6782. (name "ocaml-uucp")
  6783. (version "13.0.0")
  6784. (source
  6785. (origin
  6786. (method url-fetch)
  6787. (uri (string-append "https://erratique.ch/software/uucp/releases/"
  6788. "uucp-" version ".tbz"))
  6789. (sha256
  6790. (base32
  6791. "19kf8ypxaakacgg1dwwfzkc2zicaj88cmw11fw2z7zl24dn4gyiq"))))
  6792. (build-system ocaml-build-system)
  6793. (arguments
  6794. '(#:build-flags '("build" "--tests" "true")
  6795. #:phases
  6796. (modify-phases %standard-phases
  6797. (delete 'configure))))
  6798. (native-inputs
  6799. `(("opam" ,opam)
  6800. ("ocaml-findlib" ,ocaml-findlib)
  6801. ("ocamlbuild" ,ocamlbuild)
  6802. ("ocaml-topkg" ,ocaml-topkg)
  6803. ("ocaml-uucd" ,ocaml-uucd)
  6804. ("ocaml-uunf" ,ocaml-uunf)
  6805. ("ocaml-uutf" ,ocaml-uutf)))
  6806. (home-page "https://erratique.ch/software/uucp")
  6807. (synopsis "Unicode character properties for OCaml")
  6808. (description "Uucp is an OCaml library providing efficient access to a
  6809. selection of character properties of the Unicode character database.")
  6810. (license license:isc)))
  6811. (define-public ocaml-uuseg
  6812. (package
  6813. (name "ocaml-uuseg")
  6814. (version "13.0.0")
  6815. (source
  6816. (origin
  6817. (method url-fetch)
  6818. (uri (string-append "https://erratique.ch/software/uuseg/releases/"
  6819. "uuseg-" version ".tbz"))
  6820. (sha256
  6821. (base32
  6822. "1a635j8ra6p27g1ivfln3387lhwqmf6vq4r6bn7b6n1qsqyi1rls"))))
  6823. (build-system ocaml-build-system)
  6824. (arguments
  6825. '(#:build-flags '("build" "--tests" "true")
  6826. #:phases
  6827. (modify-phases %standard-phases
  6828. (delete 'configure))))
  6829. (propagated-inputs
  6830. `(("ocaml-uucp" ,ocaml-uucp)
  6831. ("ocaml-uutf" ,ocaml-uutf)
  6832. ("ocaml-cmdliner" ,ocaml-cmdliner)))
  6833. (native-inputs
  6834. `(("opam" ,opam)
  6835. ("ocaml-findlib" ,ocaml-findlib)
  6836. ("ocamlbuild" ,ocamlbuild)
  6837. ("ocaml-topkg" ,ocaml-topkg)))
  6838. (home-page "https://erratique.ch/software/uuseg")
  6839. (synopsis "Unicode text segmentation for OCaml")
  6840. (description "Uuseg is an OCaml library for segmenting Unicode text. It
  6841. implements the locale independent Unicode text segmentation algorithms to
  6842. detect grapheme cluster, word and sentence boundaries and the Unicode line
  6843. breaking algorithm to detect line break opportunities.
  6844. The library is independent from any IO mechanism or Unicode text data
  6845. structure and it can process text without a complete in-memory
  6846. representation.")
  6847. (license license:isc)))
  6848. (define-public ocaml-fix
  6849. (package
  6850. (name "ocaml-fix")
  6851. (version "20201120")
  6852. (source
  6853. (origin
  6854. (method git-fetch)
  6855. (uri (git-reference
  6856. (url "https://gitlab.inria.fr/fpottier/fix")
  6857. (commit version)))
  6858. (file-name (git-file-name name version))
  6859. (sha256
  6860. (base32
  6861. "1j40mg1gy03c0djzx3nzmpvnl984s14n04zwcmp2xnlidq48kvs4"))))
  6862. (build-system dune-build-system)
  6863. (arguments
  6864. ;; No tests.
  6865. '(#:tests? #f))
  6866. (home-page "https://gitlab.inria.fr/fpottier/fix")
  6867. (synopsis "Facilities for memoization and fixed points")
  6868. (description "This package provides helpers with various constructions
  6869. that involve memoization and recursion.")
  6870. (license license:lgpl2.0)))
  6871. (define-public ocaml-dune-build-info
  6872. (package
  6873. (inherit dune)
  6874. (name "ocaml-dune-build-info")
  6875. (build-system dune-build-system)
  6876. (arguments
  6877. '(#:package "dune-build-info"
  6878. ;; No separate test suite from dune.
  6879. #:tests? #f))
  6880. (propagated-inputs
  6881. `(("ocaml-odoc" ,ocaml-odoc)))
  6882. (synopsis "Embed build information inside an executable")
  6883. (description "This package allows one to access information about how the
  6884. executable was built, such as the version of the project at which it was built
  6885. or the list of statically linked libraries with their versions. It supports
  6886. reporting the version from the version control system during development to
  6887. get an precise reference of when the executable was built.")))
  6888. (define-public ocamlformat
  6889. (package
  6890. (name "ocamlformat")
  6891. (version "0.19.0")
  6892. (source
  6893. (origin
  6894. (method git-fetch)
  6895. (uri (git-reference
  6896. (url "https://github.com/ocaml-ppx/ocamlformat")
  6897. (commit version)))
  6898. (file-name (git-file-name name version))
  6899. (sha256
  6900. (base32
  6901. "0dp4pkznz9yvqx9gxwbid1z2b8ajkr8i27zay9ghx69624hz3i4z"))))
  6902. (build-system dune-build-system)
  6903. (arguments
  6904. '(#:package "ocamlformat"
  6905. ;; FIXME: The expected format is slightly different than what the
  6906. ;; produced format is for test/cli/stdin.t
  6907. #:tests? #f))
  6908. (propagated-inputs
  6909. `(("ocaml-version" ,ocaml-version)
  6910. ("ocaml-base" ,ocaml-base)
  6911. ("ocaml-cmdliner" ,ocaml-cmdliner)
  6912. ("ocaml-dune-build-info" ,ocaml-dune-build-info)
  6913. ("ocaml-fix" ,ocaml-fix)
  6914. ("ocaml-fpath" ,ocaml-fpath)
  6915. ("ocaml-menhir" ,ocaml-menhir)
  6916. ("ocaml-odoc" ,ocaml-odoc)
  6917. ("ocaml-ppxlib" ,ocaml-ppxlib)
  6918. ("ocaml-re" ,ocaml-re)
  6919. ("ocaml-odoc-parser" ,ocaml-odoc-parser)
  6920. ("ocaml-stdio" ,ocaml-stdio)
  6921. ("ocaml-uuseg" ,ocaml-uuseg)
  6922. ("ocaml-uutf" ,ocaml-uutf)))
  6923. (native-inputs
  6924. `(("ocaml-alcotest" ,ocaml-alcotest)
  6925. ("ocaml-ocp-indent" ,ocaml-ocp-indent)
  6926. ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)))
  6927. (home-page "https://github.com/ocaml-ppx/ocamlformat")
  6928. (synopsis "Auto-formatter for OCaml code")
  6929. (description "OCamlFormat is a tool to automatically format OCaml code in
  6930. a uniform style.")
  6931. (license license:expat)))
  6932. (define-public ocaml-bigstringaf
  6933. (package
  6934. (name "ocaml-bigstringaf")
  6935. (version "0.8.0")
  6936. (home-page "https://github.com/inhabitedtype/bigstringaf")
  6937. (source
  6938. (origin
  6939. (method git-fetch)
  6940. (uri (git-reference
  6941. (url home-page)
  6942. (commit version)))
  6943. (file-name (git-file-name name version))
  6944. (sha256
  6945. (base32
  6946. "0z69g3bpgw4p7z9h5j70w75rnxfrd8c7nlhqq6xvvkkgbxafm1ll"))))
  6947. (build-system dune-build-system)
  6948. (arguments
  6949. '(#:test-target "."))
  6950. (propagated-inputs
  6951. `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)))
  6952. (native-inputs
  6953. `(("ocaml-alcotest" ,ocaml-alcotest)
  6954. ("pkg-config" ,pkg-config)))
  6955. (synopsis
  6956. "Bigstring intrinsics and fast blits based on memcpy/memmove")
  6957. (description
  6958. "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
  6959. not widely-known, sometimes misused, and so programs that use Bigstrings are
  6960. slower than they have to be. And even if a library got that part right and
  6961. exposed the intrinsics properly, the compiler doesn't have any fast blits
  6962. between Bigstrings and other string-like types. @code{bigstringaf} provides
  6963. these missing pieces.")
  6964. (license license:bsd-3)))
  6965. (define-public ocaml-syntax-shims
  6966. (package
  6967. (name "ocaml-syntax-shims")
  6968. (version "1.0.0")
  6969. (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
  6970. (source
  6971. (origin
  6972. (method git-fetch)
  6973. (uri (git-reference
  6974. (url home-page)
  6975. (commit version)))
  6976. (file-name (git-file-name name version))
  6977. (sha256
  6978. (base32
  6979. "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
  6980. (build-system dune-build-system)
  6981. (properties
  6982. `((upstream-name . "ocaml-syntax-shims")))
  6983. (synopsis
  6984. "Backport new syntax to older OCaml versions")
  6985. (description
  6986. "This packages backports new features of the language to older
  6987. compilers, such as let+.")
  6988. (license license:expat)))
  6989. (define-public ocaml-angstrom
  6990. (package
  6991. (name "ocaml-angstrom")
  6992. (version "0.15.0")
  6993. (home-page "https://github.com/inhabitedtype/angstrom")
  6994. (source
  6995. (origin
  6996. (method git-fetch)
  6997. (uri (git-reference
  6998. (url home-page)
  6999. (commit version)))
  7000. (file-name (git-file-name name version))
  7001. (sha256
  7002. (base32
  7003. "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
  7004. (build-system dune-build-system)
  7005. (arguments
  7006. ;; Only build the base angstrom package.
  7007. '(#:package "angstrom"
  7008. #:test-target "."))
  7009. (propagated-inputs
  7010. `(("ocaml-bigstringaf" ,ocaml-bigstringaf)))
  7011. (native-inputs
  7012. `(("ocaml-alcotest" ,ocaml-alcotest)
  7013. ("ocaml-ppx-let" ,ocaml-ppx-let)
  7014. ("ocaml-syntax-shims" ,ocaml-syntax-shims)))
  7015. (synopsis "Parser combinators built for speed and memory-efficiency")
  7016. (description
  7017. "Angstrom is a parser-combinator library that makes it easy to write
  7018. efficient, expressive, and reusable parsers suitable for high-performance
  7019. applications. It exposes monadic and applicative interfaces for composition,
  7020. and supports incremental input through buffered and unbuffered interfaces.
  7021. Both interfaces give the user total control over the blocking behavior of
  7022. their application, with the unbuffered interface enabling zero-copy IO.
  7023. Parsers are backtracking by default and support unbounded lookahead.")
  7024. (license license:bsd-3)))
  7025. (define-public ocaml-graphics
  7026. (package
  7027. (name "ocaml-graphics")
  7028. (version "5.1.2")
  7029. (home-page "https://github.com/ocaml/graphics")
  7030. (source
  7031. (origin
  7032. (method git-fetch)
  7033. (uri (git-reference
  7034. (url home-page)
  7035. (commit version)))
  7036. (file-name (git-file-name name version))
  7037. (sha256
  7038. (base32
  7039. "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
  7040. (build-system dune-build-system)
  7041. (propagated-inputs
  7042. `(("libx11" ,libx11)))
  7043. (synopsis "The OCaml graphics library")
  7044. (description
  7045. "The graphics library provides a set of portable drawing primitives.
  7046. Drawing takes place in a separate window that is created when
  7047. Graphics.open_graph is called. This library used to be distributed with OCaml
  7048. up to OCaml 4.08.")
  7049. (license license:lgpl2.1+)))
  7050. (define-public ocaml-uri-sexp
  7051. (package
  7052. (inherit ocaml-uri)
  7053. (name "ocaml-uri-sexp")
  7054. (arguments
  7055. '(#:package "uri-sexp"
  7056. #:test-target "."))
  7057. (propagated-inputs
  7058. `(("ocaml-uri" ,ocaml-uri)
  7059. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  7060. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  7061. (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
  7062. (synopsis "RFC3986 URI/URL parsing library")
  7063. (description "This package adds S-exp support to @code{ocaml-uri}.")))
  7064. (define-public ocaml-cohttp
  7065. (package
  7066. (name "ocaml-cohttp")
  7067. (version "4.0.0")
  7068. (source
  7069. (origin
  7070. (method git-fetch)
  7071. (uri (git-reference
  7072. (url "https://github.com/mirage/ocaml-cohttp")
  7073. (commit (string-append "v" version))))
  7074. (file-name (git-file-name name version))
  7075. (sha256
  7076. (base32
  7077. "02d7417yy1i62by368w3wyw3756047pbrw69spcvz3cd1z7vqaci"))))
  7078. (build-system dune-build-system)
  7079. (arguments
  7080. '(#:package "cohttp"
  7081. #:test-target "cohttp_test/src"))
  7082. (propagated-inputs
  7083. `(("ocaml-re" ,ocaml-re)
  7084. ("ocaml-uri" ,ocaml-uri)
  7085. ("ocaml-uri-sexp" ,ocaml-uri-sexp)
  7086. ("ocaml-sexplib0" ,ocaml-sexplib0)
  7087. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  7088. ("ocaml-stringext" ,ocaml-stringext)
  7089. ("ocaml-base64" ,ocaml-base64)))
  7090. (native-inputs
  7091. `(("ocaml-fmt" ,ocaml-fmt)
  7092. ("ocaml-jsonm" ,ocaml-jsonm)
  7093. ("ocaml-alcotest" ,ocaml-alcotest)))
  7094. (home-page "https://github.com/mirage/ocaml-cohttp")
  7095. (synopsis "OCaml library for HTTP clients and servers")
  7096. (description
  7097. "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
  7098. HTTP parser, and implementations using various asynchronous programming
  7099. libraries.")
  7100. (license license:isc)))
  7101. (define-public js-of-ocaml
  7102. (package
  7103. (name "js-of-ocaml")
  7104. (version "3.9.1")
  7105. (source
  7106. (origin
  7107. (method git-fetch)
  7108. (uri (git-reference
  7109. (url "https://github.com/ocsigen/js_of_ocaml")
  7110. (commit version)))
  7111. (file-name (git-file-name name version))
  7112. (sha256
  7113. (base32 "00hdjaj94j3nc6f6wbbpx59h4yc79siphs34i1hry11r56paaqyk"))))
  7114. (build-system dune-build-system)
  7115. (arguments `(#:test-target "."))
  7116. (propagated-inputs
  7117. `(("ocaml-ppxlib" ,ocaml-ppxlib)
  7118. ("ocaml-uchar" ,ocaml-uchar)
  7119. ("ocaml-menhir" ,ocaml-menhir)
  7120. ("ocaml-reactivedata" ,ocaml-reactivedata)
  7121. ("ocaml-cmdliner" ,ocaml-cmdliner)
  7122. ("ocaml-lwt" ,ocaml-lwt)
  7123. ("ocaml-tyxml" ,ocaml-tyxml)
  7124. ("ocaml-re" ,ocaml-re)
  7125. ("ocaml-uutf" ,ocaml-uutf)
  7126. ("ocaml-graphics" ,ocaml-graphics)
  7127. ("ocaml-yojson" ,ocaml-yojson)))
  7128. (native-inputs
  7129. ;; for tests
  7130. `(("node" ,node)
  7131. ("ocaml-ppx-expect" ,ocaml-ppx-expect)
  7132. ("ocaml-num" ,ocaml-num)))
  7133. (properties `((upstream-name . "js_of_ocaml")))
  7134. (home-page "https://ocsigen.org/js_of_ocaml/")
  7135. (synopsis "Compiler from OCaml bytecode to Javascript")
  7136. (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
  7137. It makes it possible to run pure OCaml programs in JavaScript environment like
  7138. browsers and Node.js.")
  7139. (license license:lgpl2.1+)))
  7140. (define-public ocaml-bibtex2html
  7141. (package
  7142. (name "ocaml-bibtex2html")
  7143. (version "1.99")
  7144. (source
  7145. (origin
  7146. (method url-fetch)
  7147. (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
  7148. (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
  7149. (build-system ocaml-build-system)
  7150. (arguments
  7151. `(#:phases
  7152. (modify-phases %standard-phases
  7153. (add-after 'unpack 'patch-/bin/sh
  7154. (lambda _
  7155. (substitute* "configure" (("/bin/sh") (which "bash")))
  7156. (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
  7157. #t)))))
  7158. (native-inputs
  7159. `(("which" ,which)
  7160. ("texlive" ,(texlive-updmap.cfg
  7161. (list texlive-fonts-ec texlive-preprint
  7162. texlive-hyperref texlive-bibtex)))))
  7163. (propagated-inputs
  7164. `(("hevea" ,hevea)))
  7165. (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
  7166. (synopsis "BibTeX to HTML translator")
  7167. (description "This package allows you to produce, from a set of
  7168. bibliography files in BibTeX format, a bibliography in HTML format.")
  7169. (license license:gpl2)))