ocaml.scm 235 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147
  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 Efraim Flashner <efraim@flashner.co.il>
  9. ;;; Copyright © 2016-2018 Julien Lepiller <julien@lepiller.eu>
  10. ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
  11. ;;; Copyright © 2017, 2018 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. ;;;
  17. ;;; This file is part of GNU Guix.
  18. ;;;
  19. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  20. ;;; under the terms of the GNU General Public License as published by
  21. ;;; the Free Software Foundation; either version 3 of the License, or (at
  22. ;;; your option) any later version.
  23. ;;;
  24. ;;; GNU Guix is distributed in the hope that it will be useful, but
  25. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  26. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. ;;; GNU General Public License for more details.
  28. ;;;
  29. ;;; You should have received a copy of the GNU General Public License
  30. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  31. (define-module (gnu packages ocaml)
  32. #:use-module (gnu packages)
  33. #:use-module (gnu packages autotools)
  34. #:use-module (gnu packages base)
  35. #:use-module (gnu packages bison)
  36. #:use-module (gnu packages boost)
  37. #:use-module (gnu packages compression)
  38. #:use-module (gnu packages curl)
  39. #:use-module (gnu packages emacs)
  40. #:use-module (gnu packages emacs-xyz)
  41. #:use-module (gnu packages flex)
  42. #:use-module (gnu packages gcc)
  43. #:use-module (gnu packages ghostscript)
  44. #:use-module (gnu packages glib)
  45. #:use-module (gnu packages gnome)
  46. #:use-module (gnu packages gtk)
  47. #:use-module (gnu packages libevent)
  48. #:use-module (gnu packages libffi)
  49. #:use-module (gnu packages llvm)
  50. #:use-module (gnu packages m4)
  51. #:use-module (gnu packages maths)
  52. #:use-module (gnu packages multiprecision)
  53. #:use-module (gnu packages ncurses)
  54. #:use-module (gnu packages pcre)
  55. #:use-module (gnu packages perl)
  56. #:use-module (gnu packages pkg-config)
  57. #:use-module (gnu packages protobuf)
  58. #:use-module (gnu packages python)
  59. #:use-module (gnu packages sdl)
  60. #:use-module (gnu packages sqlite)
  61. #:use-module (gnu packages tex)
  62. #:use-module (gnu packages texinfo)
  63. #:use-module (gnu packages time)
  64. #:use-module (gnu packages tls)
  65. #:use-module (gnu packages version-control)
  66. #:use-module (gnu packages virtualization)
  67. #:use-module (gnu packages web-browsers)
  68. #:use-module (gnu packages xml)
  69. #:use-module (gnu packages xorg)
  70. #:use-module (guix build-system dune)
  71. #:use-module (guix build-system emacs)
  72. #:use-module (guix build-system gnu)
  73. #:use-module (guix build-system ocaml)
  74. #:use-module (guix download)
  75. #:use-module (guix git-download)
  76. #:use-module ((guix licenses) #:prefix license:)
  77. #:use-module (guix packages)
  78. #:use-module (guix svn-download)
  79. #:use-module (guix utils)
  80. #:use-module ((srfi srfi-1) #:hide (zip)))
  81. ;; A shortcut for files from ocaml forge. Downloaded files are computed from
  82. ;; their number, not their name.
  83. (define (ocaml-forge-uri name version file-number)
  84. (string-append "https://forge.ocamlcore.org/frs/download.php/"
  85. (number->string file-number) "/" name "-" version
  86. ".tar.gz"))
  87. ;; Janestreet packages are found in a similar way and all need the same patch.
  88. (define (janestreet-origin name version hash)
  89. (origin (method url-fetch)
  90. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
  91. (version-major+minor version) "/files/"
  92. name "-" version ".tar.gz"))
  93. (sha256 (base32 hash))
  94. (modules '((guix build utils)))
  95. (snippet
  96. (let ((pattern (string-append "lib/" name)))
  97. `(begin
  98. ;; install.ml contains an invalid reference to the ppx file and
  99. ;; propagates this error to the generated META file. It
  100. ;; looks for it in the "lib" directory, but it is installed in
  101. ;; "lib/ocaml/site-lib/package". This substitute does not change
  102. ;; this file for non ppx packages.
  103. (substitute* "install.ml"
  104. ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
  105. ;; The standard Makefile would try to install janestreet modules
  106. ;; in OCaml's directory in the store, which is read-only.
  107. (substitute* "Makefile"
  108. (("--prefix")
  109. "--libdir $(LIBDIR) --prefix"))
  110. #t)))))
  111. ;; They also require almost the same set of arguments
  112. (define janestreet-arguments
  113. `(#:use-make? #t
  114. #:make-flags
  115. (list (string-append "CONFIGUREFLAGS=--prefix "
  116. (assoc-ref %outputs "out")
  117. " --enable-tests")
  118. (string-append "LIBDIR="
  119. (assoc-ref %outputs "out")
  120. "/lib/ocaml/site-lib")
  121. ;; for ocaml-bin-prot, otherwise ignored
  122. (string-append "OCAML_TOPLEVEL_PATH="
  123. (assoc-ref %build-inputs "findlib")
  124. "/lib/ocaml/site-lib"))
  125. #:phases (modify-phases %standard-phases (delete 'configure))))
  126. (define-public ocaml-4.02
  127. (package
  128. (name "ocaml")
  129. (version "4.02.3")
  130. (source (origin
  131. (method url-fetch)
  132. (uri (string-append
  133. "http://caml.inria.fr/pub/distrib/ocaml-"
  134. (version-major+minor version)
  135. "/ocaml-" version ".tar.xz"))
  136. (sha256
  137. (base32
  138. "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
  139. (patches
  140. (search-patches
  141. "ocaml-CVE-2015-8869.patch"
  142. "ocaml-Add-a-.file-directive.patch"
  143. "ocaml-enable-ocamldoc-reproducibility.patch"))))
  144. (build-system gnu-build-system)
  145. (native-search-paths
  146. (list (search-path-specification
  147. (variable "OCAMLPATH")
  148. (files (list "lib/ocaml" "lib/ocaml/site-lib")))
  149. (search-path-specification
  150. (variable "CAML_LD_LIBRARY_PATH")
  151. (files (list "lib/ocaml/site-lib/stubslibs"
  152. "lib/ocaml/site-lib/stublibs")))))
  153. (native-inputs
  154. `(("perl" ,perl)
  155. ("pkg-config" ,pkg-config)))
  156. (inputs
  157. `(("libx11" ,libx11)
  158. ;; For libiberty, needed for objdump support.
  159. ("gcc:lib" ,(canonical-package gcc) "lib")
  160. ("zlib" ,zlib))) ;also needed for objdump support
  161. (arguments
  162. `(#:modules ((guix build gnu-build-system)
  163. (guix build utils)
  164. (web server))
  165. #:phases
  166. (modify-phases %standard-phases
  167. (add-after 'unpack 'patch-/bin/sh-references
  168. (lambda* (#:key inputs #:allow-other-keys)
  169. (let* ((sh (string-append (assoc-ref inputs "bash")
  170. "/bin/sh"))
  171. (quoted-sh (string-append "\"" sh "\"")))
  172. (with-fluids ((%default-port-encoding #f))
  173. (for-each
  174. (lambda (file)
  175. (substitute* file
  176. (("\"/bin/sh\"")
  177. (begin
  178. (format (current-error-port) "\
  179. patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
  180. file quoted-sh)
  181. quoted-sh))))
  182. (find-files "." "\\.ml$"))
  183. #t))))
  184. (replace 'configure
  185. (lambda* (#:key outputs #:allow-other-keys)
  186. (let* ((out (assoc-ref outputs "out"))
  187. (mandir (string-append out "/share/man")))
  188. ;; Custom configure script doesn't recognize
  189. ;; --prefix=<PREFIX> syntax (with equals sign).
  190. (invoke "./configure"
  191. "--prefix" out
  192. "--mandir" mandir))))
  193. (replace 'build
  194. (lambda _
  195. (invoke "make" "-j" (number->string (parallel-job-count))
  196. "world.opt")))
  197. (delete 'check)
  198. (add-after 'install 'check
  199. (lambda _
  200. (with-directory-excursion "testsuite"
  201. (invoke "make" "all"))))
  202. (add-before 'check 'prepare-socket-test
  203. (lambda _
  204. (format (current-error-port)
  205. "Spawning local test web server on port 8080~%")
  206. (when (zero? (primitive-fork))
  207. (run-server (lambda (request request-body)
  208. (values '((content-type . (text/plain)))
  209. "Hello!"))
  210. 'http '(#:port 8080)))
  211. (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
  212. (format (current-error-port)
  213. "Patching ~a to use localhost port 8080~%"
  214. file)
  215. (substitute* file
  216. (("caml.inria.fr") "localhost")
  217. (("80") "8080")
  218. (("HTTP1.0") "HTTP/1.0"))
  219. #t))))))
  220. (home-page "https://ocaml.org/")
  221. (synopsis "The OCaml programming language")
  222. (description
  223. "OCaml is a general purpose industrial-strength programming language with
  224. an emphasis on expressiveness and safety. Developed for more than 20 years at
  225. Inria it benefits from one of the most advanced type systems and supports
  226. functional, imperative and object-oriented styles of programming.")
  227. ;; The compiler is distributed under qpl1.0 with a change to choice of
  228. ;; law: the license is governed by the laws of France. The library is
  229. ;; distributed under lgpl2.0.
  230. (license (list license:qpl license:lgpl2.0))))
  231. (define-public ocaml-4.07
  232. (package
  233. (inherit ocaml-4.02)
  234. (version "4.07.1")
  235. (source (origin
  236. (method url-fetch)
  237. (uri (string-append
  238. "http://caml.inria.fr/pub/distrib/ocaml-"
  239. (version-major+minor version)
  240. "/ocaml-" version ".tar.xz"))
  241. (sha256
  242. (base32
  243. "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
  244. (arguments
  245. (substitute-keyword-arguments (package-arguments ocaml-4.02)
  246. ((#:phases phases)
  247. `(modify-phases ,phases
  248. (delete 'prepare-socket-test)
  249. (replace 'check
  250. (lambda _
  251. (with-directory-excursion "testsuite"
  252. (invoke "make" "all"))
  253. #t))))))))
  254. (define-public ocaml ocaml-4.07)
  255. (define-public ocamlbuild
  256. (package
  257. (name "ocamlbuild")
  258. (version "0.13.1")
  259. (source (origin
  260. (method url-fetch)
  261. (uri (string-append "https://github.com/ocaml/ocamlbuild/archive/"
  262. version ".tar.gz"))
  263. (file-name (string-append name "-" version ".tar.gz"))
  264. (sha256
  265. (base32
  266. "1320cfkixs1xlng5av04pa5qjb3ynvi2kl3k1ngqzg5fpi29b0vr"))))
  267. (build-system gnu-build-system)
  268. (arguments
  269. `(#:test-target "test"
  270. #:tests? #f; tests require findlib
  271. #:make-flags
  272. (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
  273. (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
  274. "/bin")
  275. (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
  276. "/lib/ocaml/site-lib")
  277. (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
  278. "/share/man"))
  279. #:phases
  280. (modify-phases %standard-phases
  281. (delete 'bootstrap)
  282. (delete 'configure)
  283. (add-before 'build 'findlib-environment
  284. (lambda* (#:key outputs #:allow-other-keys)
  285. (let* ((out (assoc-ref outputs "out")))
  286. (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
  287. (setenv "OCAMLFIND_LDCONF" "ignore")
  288. #t))))))
  289. (native-inputs
  290. `(("ocaml" ,ocaml)))
  291. (home-page "https://github.com/ocaml/ocamlbuild")
  292. (synopsis "OCaml build tool")
  293. (description "OCamlbuild is a generic build tool, that has built-in rules
  294. for building OCaml library and programs.")
  295. (license license:lgpl2.1+)))
  296. (define-public opam
  297. (package
  298. (name "opam")
  299. (version "2.0.1")
  300. (source (origin
  301. (method url-fetch)
  302. ;; Use the '-full' version, which includes all the dependencies.
  303. (uri (string-append
  304. "https://github.com/ocaml/opam/releases/download/"
  305. version "/opam-full-" version ".tar.gz")
  306. ;; (string-append "https://github.com/ocaml/opam/archive/"
  307. ;; version ".tar.gz")
  308. )
  309. (sha256
  310. (base32
  311. "0z6r9qr4awcdn7wyrl5y5jm34jsjlnzd00py893f1hd0c6vg3xw1"))))
  312. (build-system gnu-build-system)
  313. (arguments
  314. '(;; Sometimes, 'make -jX' would fail right after ./configure with
  315. ;; "Fatal error: exception End_of_file".
  316. #:parallel-build? #f
  317. ;; For some reason, 'ocp-build' needs $TERM to be set.
  318. #:make-flags `("TERM=screen"
  319. ,(string-append "SHELL="
  320. (assoc-ref %build-inputs "bash")
  321. "/bin/sh"))
  322. #:test-target "tests"
  323. ;; FIXME: There's an obscure test failure:
  324. ;; …/_obuild/opam/opam.asm install P1' failed.
  325. #:tests? #f
  326. #:phases (modify-phases %standard-phases
  327. (add-before 'build 'pre-build
  328. (lambda* (#:key inputs make-flags #:allow-other-keys)
  329. (let ((bash (assoc-ref inputs "bash"))
  330. (bwrap (string-append (assoc-ref inputs "bubblewrap")
  331. "/bin/bwrap")))
  332. (substitute* "src/core/opamSystem.ml"
  333. (("\"/bin/sh\"")
  334. (string-append "\"" bash "/bin/sh\""))
  335. (("getconf")
  336. (which "getconf")))
  337. ;; Use bwrap from the store directly.
  338. (substitute* "src/state/shellscripts/bwrap.sh"
  339. (("-v bwrap") (string-append "-v " bwrap))
  340. (("exec bwrap") (string-append "exec " bwrap))
  341. ;; Mount /gnu and /run/current-system in the
  342. ;; isolated environment when building with opam.
  343. ;; This is necessary for packages to find external
  344. ;; dependencies, such as a C compiler, make, etc...
  345. (("^add_mounts ro /usr")
  346. "add_mounts ro /gnu /run/current-system /usr"))
  347. (substitute* "src/client/opamInitDefaults.ml"
  348. (("\"bwrap\"") (string-append "\"" bwrap "\"")))
  349. ;; Build dependencies
  350. (apply invoke "make" "lib-ext" make-flags)
  351. #t)))
  352. (add-before 'check 'pre-check
  353. (lambda _
  354. (setenv "HOME" (getcwd))
  355. (invoke "git" "config" "--global" "user.email" "guix@gnu.org")
  356. (invoke "git" "config" "--global" "user.name" "Guix")
  357. #t)))))
  358. (native-inputs
  359. `(("git" ,git) ;for the tests
  360. ("python" ,python) ;for the tests
  361. ("camlp4" ,camlp4)))
  362. (inputs
  363. `(("ocaml" ,ocaml)
  364. ("ncurses" ,ncurses)
  365. ("curl" ,curl)
  366. ("bubblewrap" ,bubblewrap)))
  367. (home-page "http://opam.ocamlpro.com/")
  368. (synopsis "Package manager for OCaml")
  369. (description
  370. "OPAM is a tool to manage OCaml packages. It supports multiple
  371. simultaneous compiler installations, flexible package constraints, and a
  372. Git-friendly development workflow.")
  373. ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
  374. (license license:lgpl3)))
  375. (define-public camlp4-4.02
  376. (package
  377. (name "camlp4")
  378. (version "4.02+6")
  379. (source (origin
  380. (method url-fetch)
  381. (uri (string-append "https://github.com/ocaml/camlp4/archive/"
  382. version ".tar.gz"))
  383. (sha256
  384. (base32
  385. "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
  386. (file-name (string-append name "-" version ".tar.gz"))))
  387. (build-system gnu-build-system)
  388. (native-inputs `(("ocaml" ,ocaml-4.02)
  389. ("which" ,which)))
  390. (inputs `(("ocaml" ,ocaml-4.02)))
  391. (arguments
  392. '(#:tests? #f ;no documented test target
  393. ;; a race-condition will lead byte and native targets to mkdir _build
  394. ;; which fails on the second attempt.
  395. #:parallel-build? #f
  396. #:make-flags '("all")
  397. #:phases
  398. (modify-phases %standard-phases
  399. (replace 'configure
  400. (lambda* (#:key outputs #:allow-other-keys)
  401. ;; This is a home-made 'configure' script.
  402. (let ((out (assoc-ref outputs "out")))
  403. (invoke "./configure"
  404. (string-append "--libdir=" out
  405. "/lib/ocaml/site-lib")
  406. (string-append "--bindir=" out "/bin")
  407. (string-append "--pkgdir=" out
  408. "/lib/ocaml/site-lib")))))
  409. (add-after 'install 'install-meta
  410. (lambda* (#:key outputs #:allow-other-keys)
  411. (let ((out (assoc-ref outputs "out")))
  412. (substitute* "camlp4/META.in"
  413. (("directory = .*")
  414. (string-append "directory = \"" out
  415. "/lib/ocaml/site-lib/camlp4\"\n")))
  416. (invoke "make" "install-META")))))))
  417. (home-page "https://github.com/ocaml/camlp4")
  418. (synopsis "Write parsers in OCaml")
  419. (description
  420. "Camlp4 is a software system for writing extensible parsers for
  421. programming languages. It provides a set of OCaml libraries that are used to
  422. define grammars as well as loadable syntax extensions of such grammars.
  423. Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
  424. important applications is the definition of domain-specific extensions of the
  425. syntax of OCaml.")
  426. ;; This is LGPLv2 with an exception that allows packages statically-linked
  427. ;; against the library to be released under any terms.
  428. (license license:lgpl2.0)))
  429. (define-public camlp4-4.07
  430. (package
  431. (inherit camlp4-4.02)
  432. (name "camlp4")
  433. (version "4.07+1")
  434. (source (origin
  435. (method url-fetch)
  436. (uri (string-append "https://github.com/ocaml/camlp4/archive/"
  437. version ".tar.gz"))
  438. (sha256
  439. (base32
  440. "143hhxv1i6aq413z0i1pynrjcfl2g5gnh5r3863v6h9z0riqknzc"))
  441. (file-name (string-append name "-" version ".tar.gz"))))
  442. (properties
  443. `((ocaml4.02-variant . ,(delay camlp4-4.02))))
  444. (native-inputs
  445. `(("ocaml" ,ocaml-4.07)
  446. ("ocamlbuild" ,ocamlbuild)
  447. ("which" ,which)))
  448. (inputs
  449. `(("ocaml" ,ocaml-4.07)))))
  450. (define-public camlp4 camlp4-4.07)
  451. (define-public camlp5
  452. (package
  453. (name "camlp5")
  454. (version "7.07")
  455. (source (origin
  456. (method url-fetch)
  457. (uri (string-append "https://github.com/camlp5/camlp5/archive/rel"
  458. (string-delete #\. version) ".tar.gz"))
  459. (file-name (string-append name "-" version ".tar.gz"))
  460. (sha256
  461. (base32
  462. "148r6p93xlxi6v7kbsqv8i70r6av04cyn0109pwss5xj6fw97i52"))))
  463. (build-system gnu-build-system)
  464. (inputs
  465. `(("ocaml" ,ocaml)))
  466. (arguments
  467. `(#:tests? #f ; XXX TODO figure out how to run the tests
  468. #:phases
  469. (modify-phases %standard-phases
  470. (replace 'configure
  471. (lambda* (#:key outputs #:allow-other-keys)
  472. (let* ((out (assoc-ref outputs "out"))
  473. (mandir (string-append out "/share/man")))
  474. ;; Custom configure script doesn't recognize
  475. ;; --prefix=<PREFIX> syntax (with equals sign).
  476. (invoke "./configure"
  477. "--prefix" out
  478. "--mandir" mandir))))
  479. (add-before 'build 'fix-/bin-references
  480. (lambda _
  481. (substitute* "config/Makefile"
  482. (("/bin/rm") "rm"))
  483. #t))
  484. (replace 'build
  485. (lambda _
  486. (invoke "make" "-j" (number->string
  487. (parallel-job-count))
  488. "world.opt")))
  489. ;; Required for findlib to find camlp5's libraries
  490. (add-after 'install 'install-meta
  491. (lambda* (#:key outputs #:allow-other-keys)
  492. (install-file "etc/META" (string-append (assoc-ref outputs "out")
  493. "/lib/ocaml/camlp5/"))
  494. #t)))))
  495. (home-page "http://camlp5.gforge.inria.fr/")
  496. (synopsis "Pre-processor Pretty Printer for OCaml")
  497. (description
  498. "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
  499. tools for syntax (Stream Parsers and Grammars) and the ability to modify the
  500. concrete syntax of the language (Quotations, Syntax Extensions).")
  501. ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
  502. (license (list license:bsd-3 license:qpl))))
  503. (define-public hevea
  504. (package
  505. (name "hevea")
  506. (version "2.32")
  507. (source (origin
  508. (method url-fetch)
  509. (uri (string-append "http://hevea.inria.fr/old/"
  510. name "-" version ".tar.gz"))
  511. (sha256
  512. (base32
  513. "1s4yqphfcr1pf5mcj5c84mvmd107k525iiym5jdwsxz0ka0ccmfy"))))
  514. (build-system gnu-build-system)
  515. (inputs
  516. `(("ocaml" ,ocaml)))
  517. (native-inputs
  518. `(("ocamlbuild" ,ocamlbuild)))
  519. (arguments
  520. `(#:tests? #f ; no test suite
  521. #:make-flags (list (string-append "PREFIX=" %output))
  522. #:phases (modify-phases %standard-phases
  523. (delete 'configure)
  524. (add-before 'build 'patch-/bin/sh
  525. (lambda _
  526. (substitute* "_tags"
  527. (("/bin/sh") (which "sh")))
  528. #t)))))
  529. (home-page "http://hevea.inria.fr/")
  530. (synopsis "LaTeX to HTML translator")
  531. (description
  532. "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
  533. written in Objective Caml.")
  534. (license license:qpl)))
  535. (define-public ocaml-num
  536. (package
  537. (name "ocaml-num")
  538. (version "1.1")
  539. (source (origin
  540. (method url-fetch)
  541. (uri (string-append "https://github.com/ocaml/num/archive/v"
  542. version ".tar.gz"))
  543. (file-name (string-append name "-" version ".tar.gz"))
  544. (sha256
  545. (base32
  546. "1xlkd0svc0mgq5s7nrm2rjrsvg15i9wxqkc1kvwjp6sv8vv8bb04"))))
  547. (build-system ocaml-build-system)
  548. (arguments
  549. `(#:phases
  550. (modify-phases %standard-phases
  551. (delete 'configure)
  552. (add-before 'build 'fix-makefile
  553. (lambda* (#:key outputs #:allow-other-keys)
  554. ;; This package supposes we install to the same directory as
  555. ;; the ocaml package.
  556. (substitute* "src/META"
  557. (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
  558. "/lib/ocaml/site-lib\"")))
  559. (substitute* "src/Makefile"
  560. (("\\) \\$\\(STDLIBDIR\\)")
  561. (string-append ") " (assoc-ref outputs "out")
  562. "/lib/ocaml/site-lib")))
  563. #t))
  564. (add-after 'install 'fix-stubslib
  565. (lambda* (#:key outputs #:allow-other-keys)
  566. (format #t "~a~%" (find-files "." ".*.so"))
  567. (let ((stubdir (string-append (assoc-ref outputs "out")
  568. "/lib/ocaml/site-lib")))
  569. (mkdir-p stubdir)
  570. (install-file "src/dllnums.so" stubdir))
  571. #t)))))
  572. (home-page "https://github.com/ocaml/num")
  573. (synopsis "Arbitrary-precision integer and rational arithmetic")
  574. (description "OCaml-Num contains the legacy Num library for
  575. arbitrary-precision integer and rational arithmetic that used to be part of
  576. the OCaml core distribution.")
  577. (license license:lgpl2.1+))); with linking exception
  578. (define-public emacs-tuareg
  579. (package
  580. (name "emacs-tuareg")
  581. (version "2.2.0")
  582. (source (origin
  583. (method url-fetch)
  584. (uri (string-append "https://github.com/ocaml/tuareg/archive/"
  585. version ".tar.gz"))
  586. (file-name (string-append name "-" version ".tar.gz"))
  587. (sha256
  588. (base32
  589. "1ynpfc170f9jqx49biji9npfkvfpflbm29xf24wc7fnxxayr49ig"))))
  590. (build-system gnu-build-system)
  591. (native-inputs `(("emacs" ,emacs-minimal)
  592. ("opam" ,opam)))
  593. (arguments
  594. `(#:phases
  595. (modify-phases %standard-phases
  596. (delete 'configure)
  597. (add-before 'install 'fix-install-path
  598. (lambda* (#:key outputs #:allow-other-keys)
  599. (substitute* "Makefile"
  600. (("/emacs/site-lisp")
  601. (string-append (assoc-ref %outputs "out")
  602. "/share/emacs/site-lisp/")))
  603. #t))
  604. (add-after 'install 'post-install
  605. (lambda* (#:key outputs #:allow-other-keys)
  606. (symlink "tuareg.el"
  607. (string-append (assoc-ref outputs "out")
  608. "/share/emacs/site-lisp/"
  609. "tuareg-autoloads.el"))
  610. #t)))))
  611. (home-page "https://github.com/ocaml/tuareg")
  612. (synopsis "OCaml programming mode, REPL, debugger for Emacs")
  613. (description "Tuareg helps editing OCaml code, to highlight important
  614. parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
  615. Emacs.")
  616. (license license:gpl2+)))
  617. (define-public ocaml-menhir
  618. (package
  619. (name "ocaml-menhir")
  620. (version "20161115")
  621. (source (origin
  622. (method url-fetch)
  623. (uri (string-append
  624. "http://gallium.inria.fr/~fpottier/menhir/"
  625. "menhir-" version ".tar.gz"))
  626. (sha256
  627. (base32
  628. "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
  629. (build-system gnu-build-system)
  630. (inputs
  631. `(("ocaml" ,ocaml)))
  632. (native-inputs
  633. `(("ocamlbuild" ,ocamlbuild)))
  634. (arguments
  635. `(#:parallel-build? #f ; Parallel build causes failure
  636. #:tests? #f ; No check target
  637. #:phases
  638. (modify-phases %standard-phases
  639. (replace 'configure
  640. (lambda* (#:key outputs #:allow-other-keys)
  641. (let ((out (assoc-ref outputs "out")))
  642. (setenv "PREFIX" out))
  643. #t)))))
  644. (properties
  645. `((ocaml4.02-variant . ,(delay ocaml4.02-menhir))))
  646. (home-page "http://gallium.inria.fr/~fpottier/menhir")
  647. (synopsis "Parser generator")
  648. (description "Menhir is a parser generator. It turns high-level grammar
  649. specifications, decorated with semantic actions expressed in the OCaml
  650. programming language into parsers, again expressed in OCaml. It is based on
  651. Knuth’s LR(1) parser construction technique.")
  652. ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
  653. ;; that have an *.ml or *.mli extension are GPL licensed. All other files
  654. ;; are QPL licensed.
  655. (license (list license:gpl2+ license:qpl))))
  656. (define-public ocaml4.02-menhir
  657. (package
  658. (inherit ocaml-menhir)
  659. (name "ocaml4.02-menhir")
  660. (inputs `(("ocaml" ,ocaml-4.02)))
  661. (native-inputs '())))
  662. (define-public lablgtk
  663. (package
  664. (name "lablgtk")
  665. (version "2.18.6")
  666. (source (origin
  667. (method url-fetch)
  668. (uri (ocaml-forge-uri name version 1726))
  669. (sha256
  670. (base32
  671. "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d"))))
  672. (build-system gnu-build-system)
  673. (properties
  674. `((ocaml4.02-variant . ,(delay ocaml4.02-lablgtk))))
  675. (native-inputs
  676. `(("camlp4" ,camlp4)
  677. ("ocaml" ,ocaml)
  678. ("findlib" ,ocaml-findlib)
  679. ("pkg-config" ,pkg-config)))
  680. ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
  681. ;; and gtk+-quartz-2.0 once available.
  682. (inputs
  683. `(("gtk+" ,gtk+-2)
  684. ("gtksourceview" ,gtksourceview-2)
  685. ("libgnomecanvas" ,libgnomecanvas)
  686. ("libgnomeui" ,libgnomeui)
  687. ("libglade" ,libglade)
  688. ("librsvg" ,librsvg)))
  689. (arguments
  690. `(#:tests? #f ; no check target
  691. ;; opt: also install cmxa files
  692. #:make-flags (list "all" "opt"
  693. (string-append "FINDLIBDIR="
  694. (assoc-ref %outputs "out")
  695. "/lib/ocaml"))
  696. ;; Occasionally we would get "Error: Unbound module GtkThread" when
  697. ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
  698. #:parallel-build? #f
  699. #:phases
  700. (modify-phases %standard-phases
  701. (add-before 'install 'prepare-install
  702. (lambda* (#:key inputs outputs #:allow-other-keys)
  703. (let ((out (assoc-ref outputs "out"))
  704. (ocaml (assoc-ref inputs "ocaml")))
  705. ;; Install into the output and not the ocaml directory.
  706. (mkdir-p (string-append out "/lib/ocaml"))
  707. (substitute* "config.make"
  708. ((ocaml) out))
  709. #t))))))
  710. (home-page "http://lablgtk.forge.ocamlcore.org/")
  711. (synopsis "GTK+ bindings for OCaml")
  712. (description
  713. "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
  714. a strongly-typed object-oriented interface that is compatible with the
  715. dynamic typing of GTK+. Most widgets and methods are available. LablGtk
  716. also provides bindings to
  717. gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
  718. gnomeui, gtksourceview, gtkspell,
  719. libglade (and it an generate OCaml code from .glade files),
  720. libpanel, librsvg and quartz.")
  721. (license license:lgpl2.1)))
  722. (define-public ocaml4.02-lablgtk
  723. (package
  724. (inherit lablgtk)
  725. (name "ocaml4.02-lablgtk")
  726. (version "2.18.5")
  727. (source (origin
  728. (method url-fetch)
  729. (uri (ocaml-forge-uri name version 1627))
  730. (sha256
  731. (base32
  732. "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
  733. (native-inputs
  734. `(("camlp4" ,camlp4-4.02)
  735. ("ocaml" ,ocaml-4.02)
  736. ("findlib" ,ocaml4.02-findlib)
  737. ("pkg-config" ,pkg-config)))))
  738. (define-public unison
  739. (package
  740. (name "unison")
  741. (version "2.51.2")
  742. (source (origin
  743. (method git-fetch)
  744. (uri (git-reference
  745. (url "https://github.com/bcpierce00/unison.git")
  746. (commit (string-append "v" version))))
  747. (file-name (git-file-name name version))
  748. (sha256
  749. (base32
  750. "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))))
  751. (build-system gnu-build-system)
  752. (outputs '("out"
  753. "doc")) ; 1.9 MiB of documentation
  754. (native-inputs
  755. `(("ocaml" ,ocaml)
  756. ;; For documentation
  757. ("ghostscript" ,ghostscript)
  758. ("texlive" ,texlive-tiny)
  759. ("hevea" ,hevea)
  760. ("lynx" ,lynx)
  761. ("which" ,which)))
  762. (arguments
  763. `(#:parallel-build? #f
  764. #:parallel-tests? #f
  765. #:test-target "selftest"
  766. #:tests? #f ; Tests require writing to $HOME.
  767. ; If some $HOME is provided, they fail with the message
  768. ; "Fatal error: Skipping some tests -- remove me!"
  769. #:phases
  770. (modify-phases %standard-phases
  771. (delete 'configure)
  772. (add-before 'install 'prepare-install
  773. (lambda* (#:key outputs #:allow-other-keys)
  774. (let* ((out (assoc-ref outputs "out"))
  775. (bin (string-append out "/bin")))
  776. (mkdir-p bin)
  777. (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
  778. #t)))
  779. (add-after 'install 'install-fsmonitor
  780. (lambda* (#:key outputs #:allow-other-keys)
  781. (let* ((out (assoc-ref outputs "out"))
  782. (bin (string-append out "/bin")))
  783. ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
  784. (install-file "src/unison-fsmonitor" bin)
  785. #t)))
  786. (add-after 'install 'install-doc
  787. (lambda* (#:key outputs #:allow-other-keys)
  788. (let ((doc (string-append (assoc-ref outputs "doc")
  789. "/share/doc/unison")))
  790. (mkdir-p doc)
  791. ;; This is a workaround to prevent a build failure. Running
  792. ;; make docs somehow allows it to pass, but the generated
  793. ;; documentation is not pretty.
  794. (catch #t
  795. (lambda _
  796. (invoke "make" "docs"
  797. "TEXDIRECTIVES=\\\\draftfalse"))
  798. (lambda _ #t))
  799. ;; This file needs write-permissions, because it's
  800. ;; overwritten by 'docs' during documentation generation.
  801. (chmod "src/strings.ml" #o600)
  802. (invoke "make" "docs"
  803. "TEXDIRECTIVES=\\\\draftfalse")
  804. (for-each (lambda (f)
  805. (install-file f doc))
  806. (map (lambda (ext)
  807. (string-append "doc/unison-manual." ext))
  808. ;; Install only html documentation,
  809. ;; since the build is currently
  810. ;; non-reproducible with the ps, pdf,
  811. ;; and dvi docs.
  812. '(;; "ps" "pdf" "dvi"
  813. "html")))
  814. #t))))))
  815. (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
  816. (synopsis "File synchronizer")
  817. (description
  818. "Unison is a file-synchronization tool. It allows two replicas of
  819. a collection of files and directories to be stored on different hosts
  820. (or different disks on the same host), modified separately, and then
  821. brought up to date by propagating the changes in each replica
  822. to the other.")
  823. (license license:gpl3+)))
  824. (define-public ocaml-findlib
  825. (package
  826. (name "ocaml-findlib")
  827. (version "1.8.0")
  828. (source (origin
  829. (method url-fetch)
  830. (uri (string-append "http://download.camlcity.org/download/"
  831. "findlib" "-" version ".tar.gz"))
  832. (sha256
  833. (base32
  834. "1b97zqjdriqd2ikgh4rmqajgxwdwn013riji5j53y3xvcmnpsyrb"))))
  835. (build-system gnu-build-system)
  836. (native-inputs
  837. `(("camlp4" ,camlp4)
  838. ("m4" ,m4)
  839. ("ocaml" ,ocaml)))
  840. (arguments
  841. `(#:tests? #f ; no test suite
  842. #:parallel-build? #f
  843. #:make-flags (list "all" "opt")
  844. #:phases (modify-phases %standard-phases
  845. (replace
  846. 'configure
  847. (lambda* (#:key inputs outputs #:allow-other-keys)
  848. (let ((out (assoc-ref outputs "out")))
  849. (invoke
  850. "./configure"
  851. "-bindir" (string-append out "/bin")
  852. "-config" (string-append out "/etc/ocamfind.conf")
  853. "-mandir" (string-append out "/share/man")
  854. "-sitelib" (string-append out "/lib/ocaml/site-lib")
  855. "-with-toolbox"))))
  856. (replace 'install
  857. (lambda* (#:key outputs #:allow-other-keys)
  858. (let ((out (assoc-ref outputs "out")))
  859. (invoke "make" "install"
  860. (string-append "OCAML_CORE_STDLIB="
  861. out "/lib/ocaml/site-lib")))))
  862. (add-after 'install 'remove-camlp4
  863. (lambda* (#:key outputs #:allow-other-keys)
  864. (let ((out (assoc-ref outputs "out")))
  865. (delete-file-recursively
  866. (string-append out "/lib/ocaml/site-lib/camlp4"))
  867. #t))))))
  868. (home-page "http://projects.camlcity.org/projects/findlib.html")
  869. (synopsis "Management tool for OCaml libraries")
  870. (description
  871. "The \"findlib\" library provides a scheme to manage reusable software
  872. components (packages), and includes tools that support this scheme. Packages
  873. are collections of OCaml modules for which metainformation can be stored. The
  874. packages are kept in the file system hierarchy, but with strict directory
  875. structure. The library contains functions to look the directory up that
  876. stores a package, to query metainformation about a package, and to retrieve
  877. dependency information about multiple packages. There is also a tool that
  878. allows the user to enter queries on the command-line. In order to simplify
  879. compilation and linkage, there are new frontends of the various OCaml
  880. compilers that can directly deal with packages.")
  881. (license license:x11)))
  882. (define-public ocaml4.02-findlib
  883. (package
  884. (inherit ocaml-findlib)
  885. (name "ocaml4.02-findlib")
  886. (native-inputs
  887. `(("camlp4" ,camlp4-4.02)
  888. ("m4" ,m4)
  889. ("ocaml" ,ocaml-4.02)))))
  890. ;; note that some tests may hang for no obvious reason.
  891. (define-public ocaml-ounit
  892. (package
  893. (name "ocaml-ounit")
  894. (version "2.0.8")
  895. (source (origin
  896. (method url-fetch)
  897. (uri (ocaml-forge-uri "ounit" version 1749))
  898. (sha256
  899. (base32
  900. "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
  901. (build-system ocaml-build-system)
  902. (native-inputs
  903. `(("libxml2" ,libxml2) ; for xmllint
  904. ("ocamlbuild" ,ocamlbuild)))
  905. (arguments
  906. `(#:phases
  907. (modify-phases %standard-phases
  908. (delete 'check)))) ; tests are run during build
  909. (home-page "http://ounit.forge.ocamlcore.org")
  910. (synopsis "Unit testing framework for OCaml")
  911. (description "Unit testing framework for OCaml. It is similar to JUnit and
  912. other XUnit testing frameworks.")
  913. (license license:expat)))
  914. (define-public ocaml4.02-ounit
  915. (package-with-ocaml4.02 ocaml-ounit))
  916. (define-public camlzip
  917. (package
  918. (name "camlzip")
  919. (version "1.0.6")
  920. (source (origin
  921. (method url-fetch)
  922. (uri (ocaml-forge-uri name version 1616))
  923. (sha256
  924. (base32
  925. "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
  926. (build-system ocaml-build-system)
  927. (inputs
  928. `(("zlib" ,zlib)))
  929. (arguments
  930. `(#:phases
  931. (modify-phases %standard-phases
  932. (delete 'configure)
  933. (add-after 'install 'install-camlzip
  934. (lambda* (#:key outputs #:allow-other-keys)
  935. (let* ((out (assoc-ref outputs "out"))
  936. (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
  937. (mkdir-p dir)
  938. (call-with-output-file (string-append dir "/META")
  939. (lambda (port)
  940. (format port "version=\"1.06\"\n")
  941. (format port "requires=\"unix\"\n")
  942. (format port "archive(byte)=\"zip.cma\"\n")
  943. (format port "archive(native)=\"zip.cmxa\"\n")
  944. (format port "archive(native,plugin)=\"zip.cmxs\"\n")
  945. (format port "directory=\"../zip\"\n")))))))
  946. #:install-target "install-findlib"
  947. #:make-flags
  948. (list "all" "allopt"
  949. (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
  950. "/lib/ocaml"))))
  951. (home-page "http://forge.ocamlcore.org/projects/camlzip")
  952. (synopsis "Provides easy access to compressed files")
  953. (description "Provides easy access to compressed files in ZIP, GZIP and
  954. JAR format. It provides functions for reading from and writing to compressed
  955. files in these formats.")
  956. (license license:lgpl2.1+)))
  957. (define-public ocaml4.02-camlzip
  958. (package-with-ocaml4.02 camlzip))
  959. (define-public ocamlmod
  960. (package
  961. (name "ocamlmod")
  962. (version "0.0.9")
  963. (source (origin
  964. (method url-fetch)
  965. (uri (ocaml-forge-uri name version 1702))
  966. (sha256
  967. (base32
  968. "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
  969. (build-system ocaml-build-system)
  970. (native-inputs
  971. `(("ounit" ,ocaml-ounit)
  972. ("ocamlbuild" ,ocamlbuild)))
  973. (arguments
  974. `(#:phases
  975. (modify-phases %standard-phases
  976. ;; Tests are done during build.
  977. (delete 'check))))
  978. (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
  979. (synopsis "Generate modules from OCaml source files")
  980. (description "Generate modules from OCaml source files.")
  981. (license license:lgpl2.1+))) ; with an exception
  982. (define-public ocaml4.02-ocamlmod
  983. (package-with-ocaml4.02 ocamlmod))
  984. (define-public ocaml-zarith
  985. (package
  986. (name "ocaml-zarith")
  987. (version "1.4.1")
  988. (source (origin
  989. (method url-fetch)
  990. (uri (ocaml-forge-uri "zarith" version 1574))
  991. (sha256
  992. (base32
  993. "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
  994. (build-system ocaml-build-system)
  995. (native-inputs
  996. `(("perl" ,perl)))
  997. (inputs
  998. `(("gmp" ,gmp)))
  999. (arguments
  1000. `(#:tests? #f ; no test target
  1001. #:phases
  1002. (modify-phases %standard-phases
  1003. (replace 'configure
  1004. (lambda _ (invoke "./configure"))))))
  1005. (home-page "https://forge.ocamlcore.org/projects/zarith/")
  1006. (synopsis "Implements arbitrary-precision integers")
  1007. (description "Implements arithmetic and logical operations over
  1008. arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
  1009. over big integers. Small integers are represented as Caml unboxed integers,
  1010. for speed and space economy.")
  1011. (license license:lgpl2.1+))) ; with an exception
  1012. (define-public ocaml4.02-zarith
  1013. (package-with-ocaml4.02 ocaml-zarith))
  1014. (define-public ocaml-frontc
  1015. (package
  1016. (name "ocaml-frontc")
  1017. (version "3.4")
  1018. (source (origin
  1019. (method url-fetch)
  1020. (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
  1021. "frontc/Frontc-" version ".tgz"))
  1022. (sha256
  1023. (base32
  1024. "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
  1025. (build-system ocaml-build-system)
  1026. (arguments
  1027. `(#:ocaml ,ocaml-4.02
  1028. #:findlib ,ocaml4.02-findlib
  1029. #:phases
  1030. (modify-phases %standard-phases
  1031. (delete 'configure)
  1032. (add-after 'install 'install-meta
  1033. (lambda* (#:key outputs #:allow-other-keys)
  1034. (let ((out (assoc-ref outputs "out")))
  1035. (with-output-to-file
  1036. (string-append out "/lib/ocaml/frontc/META")
  1037. (lambda _
  1038. (display
  1039. (string-append
  1040. "description = \"Parser for the C language\"
  1041. version = \"" ,version "\"
  1042. requires = \"unix\"
  1043. archive(byte) = \"frontc.cma\"
  1044. archive(native) = \"frontc.cmxa\""))))
  1045. (symlink (string-append out "/lib/ocaml/frontc")
  1046. (string-append out "/lib/ocaml/FrontC"))))))
  1047. #:make-flags (list (string-append "PREFIX="
  1048. (assoc-ref %outputs "out"))
  1049. "OCAML_SITE=$(LIB_DIR)/ocaml/")))
  1050. (home-page "https://www.irit.fr/FrontC")
  1051. (synopsis "C parser and lexer library")
  1052. (description "FrontC is an OCAML library providing a C parser and lexer.
  1053. The result is a syntactic tree easy to process with usual OCAML tree management.
  1054. It provides support for ANSI C syntax, old-C K&R style syntax and the standard
  1055. GNU CC attributes. It provides also a C pretty printer as an example of use.")
  1056. (license license:lgpl2.1)))
  1057. (define-public ocaml-qcheck
  1058. (package
  1059. (name "ocaml-qcheck")
  1060. (version "0.5.3.1")
  1061. (source (origin
  1062. (method url-fetch)
  1063. (uri (string-append "https://github.com/c-cube/qcheck/archive/"
  1064. version ".tar.gz"))
  1065. (file-name (string-append name "-" version ".tar.gz"))
  1066. (sha256
  1067. (base32
  1068. "1zs1pg5cb1iry554v3cdmmiglsrwmsqa9x8zxmzb118fnk5d3ha6"))))
  1069. (build-system ocaml-build-system)
  1070. (native-inputs
  1071. `(("ounit" ,ocaml-ounit)
  1072. ("ocamlbuild" ,ocamlbuild)))
  1073. (home-page "https://github.com/c-cube/qcheck")
  1074. (synopsis "QuickCheck inspired property-based testing for OCaml")
  1075. (description "QuickCheck inspired property-based testing for OCaml. This
  1076. module allows to check invariants (properties of some types) over randomly
  1077. generated instances of the type. It provides combinators for generating
  1078. instances and printing them.")
  1079. (license license:lgpl3+)))
  1080. (define-public ocaml4.02-qcheck
  1081. (package-with-ocaml4.02 ocaml-qcheck))
  1082. (define-public ocaml-qtest
  1083. (package
  1084. (name "ocaml-qtest")
  1085. (version "2.8")
  1086. (source (origin
  1087. (method url-fetch)
  1088. (uri (string-append "https://github.com/vincent-hugot/qtest/"
  1089. "archive/" version ".tar.gz"))
  1090. (file-name (string-append name "-" version ".tar.gz"))
  1091. (sha256
  1092. (base32
  1093. "1ff4if64mc9c7wmhjdgnlnh6k6a713piqzr4043zzj4s5pw7smxk"))))
  1094. (build-system ocaml-build-system)
  1095. (native-inputs
  1096. `(("ocamlbuild" ,ocamlbuild)))
  1097. (propagated-inputs
  1098. `(("ounit" ,ocaml-ounit)
  1099. ("qcheck" ,ocaml-qcheck)))
  1100. (arguments
  1101. `(#:tests? #f ; No test target.
  1102. #:make-flags
  1103. (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
  1104. #:phases
  1105. (modify-phases %standard-phases
  1106. (delete 'configure))))
  1107. (home-page "https://github.com/vincent-hugot/qtest")
  1108. (synopsis "Inline (Unit) Tests for OCaml")
  1109. (description "Qtest extracts inline unit tests written using a special
  1110. syntax in comments. Those tests are then run using the oUnit framework and the
  1111. qcheck library. The possibilities range from trivial tests -- extremely simple
  1112. to use -- to sophisticated random generation of test cases.")
  1113. (license license:lgpl3+)))
  1114. (define-public ocaml4.02-qtest
  1115. (package-with-ocaml4.02 ocaml-qtest))
  1116. (define-public ocaml-stringext
  1117. (package
  1118. (name "ocaml-stringext")
  1119. (version "1.4.3")
  1120. (source (origin
  1121. (method url-fetch)
  1122. (uri (string-append "https://github.com/rgrinberg/stringext"
  1123. "/archive/v" version ".tar.gz"))
  1124. (file-name (string-append name "-" version ".tar.gz"))
  1125. (sha256
  1126. (base32
  1127. "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
  1128. (build-system ocaml-build-system)
  1129. (native-inputs
  1130. `(("ocamlbuild" ,ocamlbuild)
  1131. ("qtest" ,ocaml-qtest)))
  1132. (home-page "https://github.com/rgrinberg/stringext")
  1133. (synopsis "Extra string functions for OCaml")
  1134. (description "Provides a single module named Stringext that provides a grab
  1135. bag of often used but missing string functions from the stdlib. E.g, split,
  1136. full_split, cut, rcut, etc..")
  1137. ;; the only mention of a license in this project is in its `opam' file
  1138. ;; where it says `mit'.
  1139. (license license:expat)))
  1140. (define-public ocaml4.02-stringext
  1141. (package-with-ocaml4.02 ocaml-stringext))
  1142. (define-public ocaml-bisect
  1143. (package
  1144. (name "ocaml-bisect")
  1145. (version "1.3.1")
  1146. (source (origin
  1147. (method url-fetch)
  1148. (uri (string-append "https://github.com/gasche/bisect/archive/"
  1149. version ".tar.gz"))
  1150. (file-name (string-append name "-" version ".tar.gz"))
  1151. (sha256
  1152. (base32
  1153. "0p67fppk5ifb63b00kxwrb1xg75hrqhknng3bsdyw3gxxqyjlpmx"))
  1154. (patches
  1155. (search-patches
  1156. "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
  1157. (build-system ocaml-build-system)
  1158. (native-inputs
  1159. `(("camlp4" ,camlp4)
  1160. ("libxml2" ,libxml2)
  1161. ("ocamlbuild" ,ocamlbuild)
  1162. ("which" ,which)))
  1163. (propagated-inputs
  1164. `(("camlp4" ,camlp4)))
  1165. (arguments
  1166. `(#:test-target "tests"
  1167. #:make-flags
  1168. (list "all" (string-append "CAMLP4_LIBDIR="
  1169. (assoc-ref %build-inputs "camlp4")
  1170. "/lib/ocaml/site-lib/camlp4"))
  1171. #:phases
  1172. (modify-phases %standard-phases
  1173. (replace 'configure
  1174. (lambda* (#:key inputs outputs #:allow-other-keys)
  1175. (invoke "./configure" "-prefix" (assoc-ref outputs "out")
  1176. "-ocaml-prefix" (assoc-ref inputs "ocaml")
  1177. "-camlp4-prefix" (assoc-ref inputs "camlp4"))
  1178. #t)))))
  1179. (home-page "http://bisect.x9c.fr")
  1180. (synopsis "Code coverage tool for the OCaml language")
  1181. (description "Bisect is a code coverage tool for the OCaml language. It is
  1182. a camlp4-based tool that allows to instrument your application before running
  1183. tests. After application execution, it is possible to generate a report in HTML
  1184. format that is the replica of the application source code annotated with code
  1185. coverage information.")
  1186. (properties
  1187. `((ocaml4.02-variant . ,(delay ocaml4.02-bisect))))
  1188. (license license:gpl3+)))
  1189. (define-public ocaml4.02-bisect
  1190. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bisect))))
  1191. (package
  1192. (inherit base)
  1193. (native-inputs
  1194. `(("camlp4" ,camlp4-4.02)
  1195. ("libxml2" ,libxml2)
  1196. ("which" ,which)))
  1197. (propagated-inputs
  1198. `(("camlp4" ,camlp4-4.02))))))
  1199. (define-public dune
  1200. (package
  1201. (name "dune")
  1202. (version "1.6.3")
  1203. (source (origin
  1204. (method url-fetch)
  1205. (uri (string-append "https://github.com/ocaml/dune/releases/"
  1206. "download/" version "/dune-" version ".tbz"))
  1207. (sha256
  1208. (base32
  1209. "0dmf0wbfmgdy5plz1bjiisc2hjgblvxsnrqjmw2c8y45v1h23mdz"))))
  1210. (build-system ocaml-build-system)
  1211. (arguments
  1212. `(#:tests? #f; require odoc
  1213. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  1214. #:phases
  1215. (modify-phases %standard-phases
  1216. (replace 'configure
  1217. (lambda* (#:key outputs #:allow-other-keys)
  1218. (invoke "./configure")
  1219. #t)))))
  1220. (home-page "https://github.com/ocaml/dune")
  1221. (synopsis "OCaml build system")
  1222. (description "Dune is a build system that was designed to simplify the
  1223. release of Jane Street packages. It reads metadata from @file{dune} files
  1224. following a very simple s-expression syntax.")
  1225. (license license:expat)))
  1226. (define-public ocaml-migrate-parsetree
  1227. (package
  1228. (name "ocaml-migrate-parsetree")
  1229. (version "1.2.0")
  1230. (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
  1231. (source
  1232. (origin
  1233. (method git-fetch)
  1234. (uri (git-reference
  1235. (url (string-append home-page ".git"))
  1236. (commit (string-append "v" version))))
  1237. (sha256
  1238. (base32
  1239. "16kas19iwm4afijv3yxd250s08absabmdcb4yj57wc8r4fmzv5dm"))))
  1240. (build-system dune-build-system)
  1241. (arguments
  1242. `(#:tests? #f))
  1243. (propagated-inputs
  1244. `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
  1245. ("ocamlbuild" ,ocamlbuild)
  1246. ("ocaml-result" ,ocaml-result)))
  1247. (synopsis "OCaml parsetree convertor")
  1248. (description "This library converts between parsetrees of different OCaml
  1249. versions. For each version, there is a snapshot of the parsetree and conversion
  1250. functions to the next and/or previous version.")
  1251. (license license:lgpl2.1+)))
  1252. (define-public ocaml-ppx-tools-versioned
  1253. (package
  1254. (name "ocaml-ppx-tools-versioned")
  1255. (version "5.2.1")
  1256. (source (origin
  1257. (method url-fetch)
  1258. (uri (string-append "https://github.com/ocaml-ppx/"
  1259. "ppx_tools_versioned/archive/"
  1260. version ".tar.gz"))
  1261. (file-name (string-append name "-" version ".tar.gz"))
  1262. (sha256
  1263. (base32
  1264. "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh"))))
  1265. (build-system dune-build-system)
  1266. (arguments
  1267. `(#:test-target "."))
  1268. (propagated-inputs
  1269. `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
  1270. (home-page "https://github.com/let-def/ppx_tools_versioned")
  1271. (synopsis "Variant of ppx_tools")
  1272. (description "This package is a variant of ppx_tools based on
  1273. ocaml-migrate-parsetree")
  1274. (license license:expat)))
  1275. (define-public ocaml-bitstring
  1276. (package
  1277. (name "ocaml-bitstring")
  1278. (version "3.1.0")
  1279. (source (origin
  1280. (method url-fetch)
  1281. (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
  1282. "get/v" version ".tar.gz"))
  1283. (file-name (string-append name "-" version ".tar.gz"))
  1284. (sha256
  1285. (base32
  1286. "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
  1287. (build-system dune-build-system)
  1288. (native-inputs
  1289. `(("camlp4" ,camlp4)
  1290. ("time" ,time)
  1291. ("autoconf" ,autoconf)
  1292. ("automake" ,automake)
  1293. ("bisect" ,ocaml-bisect)))
  1294. (propagated-inputs
  1295. `(("camlp4" ,camlp4)
  1296. ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
  1297. (arguments
  1298. `(#:tests? #f; Tests fail to build
  1299. #:jbuild? #t))
  1300. (properties
  1301. `((ocaml4.02-variant . ,(delay ocaml4.02-bitstring))))
  1302. (home-page "https://github.com/xguerin/bitstring")
  1303. (synopsis "Bitstrings and bitstring matching for OCaml")
  1304. (description "Adds Erlang-style bitstrings and matching over bitstrings as
  1305. a syntax extension and library for OCaml. You can use this module to both parse
  1306. and generate binary formats, files and protocols. Bitstring handling is added
  1307. as primitives to the language, making it exceptionally simple to use and very
  1308. powerful.")
  1309. (license license:isc)))
  1310. (define-public ocaml4.02-bitstring
  1311. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bitstring))))
  1312. (package
  1313. (inherit base)
  1314. (version "2.1.1")
  1315. (source (origin
  1316. (method url-fetch)
  1317. (uri (string-append "https://github.com/xguerin/bitstring"
  1318. "/archive/v" version ".tar.gz"))
  1319. (file-name (string-append "ocaml-bitstring-" version ".tar.gz"))
  1320. (sha256
  1321. (base32
  1322. "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"))
  1323. (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
  1324. (build-system ocaml-build-system)
  1325. (arguments
  1326. `(#:ocaml ,ocaml-4.02
  1327. #:findlib ,ocaml4.02-findlib
  1328. #:configure-flags
  1329. (list "CAMLP4OF=camlp4of" "--enable-coverage")
  1330. #:make-flags
  1331. (list (string-append "BISECTLIB="
  1332. (assoc-ref %build-inputs "bisect")
  1333. "/lib/ocaml/site-lib")
  1334. (string-append "OCAMLCFLAGS=-g -I "
  1335. (assoc-ref %build-inputs "camlp4")
  1336. "/lib/ocaml/site-lib/camlp4 -I "
  1337. "$(BISECTLIB)/bisect")
  1338. (string-append "OCAMLOPTFLAGS=-g -I "
  1339. (assoc-ref %build-inputs "camlp4")
  1340. "/lib/ocaml/site-lib/camlp4 -I "
  1341. "$(BISECTLIB)/bisect"))
  1342. #:phases
  1343. (modify-phases %standard-phases
  1344. (add-after 'install 'link-lib
  1345. (lambda* (#:key outputs #:allow-other-keys)
  1346. (let* ((out (assoc-ref outputs "out"))
  1347. (stubs (string-append out
  1348. "/lib/ocaml/site-lib/stubslibs"))
  1349. (lib (string-append out
  1350. "/lib/ocaml/site-lib/bitstring")))
  1351. (mkdir-p stubs)
  1352. (symlink (string-append lib "/dllbitstring.so")
  1353. (string-append stubs "/dllbitstring.so")))
  1354. #t))
  1355. (add-before 'configure 'fix-configure
  1356. (lambda* (#:key inputs #:allow-other-keys)
  1357. (substitute* "Makefile.in"
  1358. (("@abs_top_builddir@")
  1359. (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
  1360. (substitute* "configure"
  1361. (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
  1362. "/bin/sh"))))))))
  1363. (native-inputs
  1364. `(("camlp4" ,camlp4-4.02)
  1365. ("time" ,time)
  1366. ("autoconf" ,autoconf)
  1367. ("automake" ,automake)
  1368. ("bisect" ,ocaml4.02-bisect)))
  1369. (propagated-inputs
  1370. `(("camlp4" ,camlp4-4.02))))))
  1371. (define-public ocaml-result
  1372. (package
  1373. (name "ocaml-result")
  1374. (version "1.2")
  1375. (source (origin
  1376. (method url-fetch)
  1377. (uri (string-append "https://github.com/janestreet/result"
  1378. "/archive/" version ".tar.gz"))
  1379. (file-name (string-append name "-" version ".tar.gz"))
  1380. (sha256
  1381. (base32
  1382. "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
  1383. (build-system ocaml-build-system)
  1384. (arguments
  1385. `(#:tests? #f
  1386. #:phases
  1387. (modify-phases %standard-phases
  1388. (delete 'configure))))
  1389. (home-page "https://github.com/janestreet/result")
  1390. (synopsis "Compatibility Result module")
  1391. (description "Uses the new result type defined in OCaml >= 4.03 while
  1392. staying compatible with older version of OCaml should use the Result module
  1393. defined in this library.")
  1394. (license license:bsd-3)))
  1395. (define-public ocaml4.02-result
  1396. (package-with-ocaml4.02 ocaml-result))
  1397. (define-public ocaml-topkg
  1398. (package
  1399. (name "ocaml-topkg")
  1400. (version "0.8.1")
  1401. (source (origin
  1402. (method url-fetch)
  1403. (uri (string-append "http://erratique.ch/software/topkg/releases/"
  1404. "topkg-" version ".tbz"))
  1405. (sha256
  1406. (base32
  1407. "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
  1408. (build-system ocaml-build-system)
  1409. (native-inputs
  1410. `(("opam" ,opam)
  1411. ("ocamlbuild" ,ocamlbuild)))
  1412. (propagated-inputs
  1413. `(("result" ,ocaml-result)))
  1414. (arguments
  1415. `(#:tests? #f
  1416. #:build-flags '("build")
  1417. #:phases
  1418. (modify-phases %standard-phases
  1419. (delete 'configure))))
  1420. (home-page "http://erratique.ch/software/topkg")
  1421. (synopsis "Transitory OCaml software packager")
  1422. (description "Topkg is a packager for distributing OCaml software. It
  1423. provides an API to describe the files a package installs in a given build
  1424. configuration and to specify information about the package's distribution,
  1425. creation and publication procedures.")
  1426. (license license:isc)))
  1427. (define-public ocaml4.02-topkg
  1428. (package-with-ocaml4.02 ocaml-topkg))
  1429. (define-public ocaml-rresult
  1430. (package
  1431. (name "ocaml-rresult")
  1432. (version "0.5.0")
  1433. (source (origin
  1434. (method url-fetch)
  1435. (uri (string-append "http://erratique.ch/software/rresult/releases/"
  1436. "rresult-" version ".tbz"))
  1437. (sha256
  1438. (base32
  1439. "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
  1440. (build-system ocaml-build-system)
  1441. (native-inputs
  1442. `(("opam" ,opam)
  1443. ("ocamlbuild" ,ocamlbuild)))
  1444. (propagated-inputs
  1445. `(("topkg" ,ocaml-topkg)))
  1446. (arguments
  1447. `(#:tests? #f
  1448. #:build-flags '("build")
  1449. #:phases
  1450. (modify-phases %standard-phases
  1451. (delete 'configure))))
  1452. (home-page "http://erratique.ch/software/rresult")
  1453. (synopsis "Result value combinators for OCaml")
  1454. (description "Handle computation results and errors in an explicit and
  1455. declarative manner, without resorting to exceptions. It defines combinators
  1456. to operate on the result type available from OCaml 4.03 in the standard
  1457. library.")
  1458. (license license:isc)))
  1459. (define-public ocaml4.02-rresult
  1460. (package-with-ocaml4.02 ocaml-rresult))
  1461. (define-public ocaml-sqlite3
  1462. (package
  1463. (name "ocaml-sqlite3")
  1464. (version "4.1.2")
  1465. (source
  1466. (origin
  1467. (method url-fetch)
  1468. (uri (string-append
  1469. "https://github.com/mmottl/sqlite3-ocaml/releases/download/v"
  1470. version "/sqlite3-ocaml-" version ".tar.gz"))
  1471. (sha256
  1472. (base32
  1473. "14c1nir7c6bivajg0vyx853y7la7r5d25g1v5hjb2wfi73r15p1m"))))
  1474. (build-system ocaml-build-system)
  1475. (native-inputs
  1476. `(("ocamlbuild" ,ocamlbuild)
  1477. ("pkg-config" ,pkg-config)))
  1478. (inputs
  1479. `(("sqlite" ,sqlite)))
  1480. (home-page "https://mmottl.github.io/sqlite3-ocaml")
  1481. (synopsis "SQLite3 Bindings for OCaml")
  1482. (description
  1483. "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
  1484. API. Sqlite3 is a self-contained, serverless, zero-configuration,
  1485. transactional SQL database engine with outstanding performance for many use
  1486. cases. These bindings are written in a way that enables a friendly
  1487. coexistence with the old (version 2) SQLite and its OCaml wrapper
  1488. @code{ocaml-sqlite}.")
  1489. (license license:expat)))
  1490. (define-public ocaml4.02-sqlite3
  1491. (package-with-ocaml4.02 ocaml-sqlite3))
  1492. (define-public ocaml-csv
  1493. (package
  1494. (name "ocaml-csv")
  1495. (version "1.6")
  1496. (source
  1497. (origin
  1498. (method url-fetch)
  1499. (uri
  1500. (string-append
  1501. "https://github.com/Chris00/ocaml-csv/releases/download/"
  1502. version "/csv-" version ".tar.gz"))
  1503. (sha256
  1504. (base32
  1505. "0rv7x843vn6scxj87hzl01yqrl26rc27lr8s7z6rp9vs745g05zj"))))
  1506. (build-system ocaml-build-system)
  1507. (native-inputs
  1508. `(("ocamlbuild" ,ocamlbuild)))
  1509. (home-page "https://github.com/Chris00/ocaml-csv")
  1510. (synopsis "Pure OCaml functions to read and write CSV")
  1511. (description
  1512. "@dfn{Comma separated values} (CSV) is a simple tabular format supported
  1513. by all major spreadsheets. This library implements pure OCaml functions to
  1514. read and write files in this format as well as some convenience functions to
  1515. manipulate such data.")
  1516. (license (package-license camlp4))))
  1517. (define-public ocaml4.02-csv
  1518. (package-with-ocaml4.02 ocaml-csv))
  1519. (define-public ocaml-mtime
  1520. (package
  1521. (name "ocaml-mtime")
  1522. (version "0.8.3")
  1523. (source (origin
  1524. (method url-fetch)
  1525. (uri (string-append "http://erratique.ch/software/mtime/releases/"
  1526. "mtime-" version ".tbz"))
  1527. (sha256
  1528. (base32
  1529. "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
  1530. (build-system ocaml-build-system)
  1531. (native-inputs
  1532. `(("ocamlbuild" ,ocamlbuild)
  1533. ("opam" ,opam)))
  1534. (propagated-inputs
  1535. `(("topkg" ,ocaml-topkg)))
  1536. (arguments
  1537. `(#:tests? #f
  1538. #:build-flags
  1539. '("native=true" "native-dynlink=true" "jsoo=false")
  1540. #:phases
  1541. (modify-phases %standard-phases
  1542. (delete 'configure))))
  1543. (home-page "http://erratique.ch/software/mtime")
  1544. (synopsis "Monotonic wall-clock time for OCaml")
  1545. (description "Access monotonic wall-clock time. It allows to measure time
  1546. spans without being subject to operating system calendar time adjustments.")
  1547. (license license:isc)))
  1548. (define-public ocaml4.02-mtime
  1549. (package-with-ocaml4.02 ocaml-mtime))
  1550. (define-public ocaml-cmdliner
  1551. (package
  1552. (name "ocaml-cmdliner")
  1553. (version "1.0.2")
  1554. (source (origin
  1555. (method url-fetch)
  1556. (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
  1557. "cmdliner-" version ".tbz"))
  1558. (sha256
  1559. (base32
  1560. "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"))))
  1561. (build-system ocaml-build-system)
  1562. (inputs
  1563. `(("ocaml-result" ,ocaml-result)))
  1564. (native-inputs
  1565. `(("ocamlbuild" ,ocamlbuild)
  1566. ("opam" ,opam)))
  1567. (arguments
  1568. `(#:tests? #f
  1569. #:build-flags '("native=true" "native-dynlink=true")
  1570. #:phases
  1571. (modify-phases %standard-phases
  1572. (replace 'install
  1573. ;; The makefile says 'adjust on cli invocation'
  1574. (lambda* (#:key outputs #:allow-other-keys)
  1575. (let ((out (assoc-ref outputs "out")))
  1576. (invoke "make" "install" (string-append "PREFIX=" out))
  1577. #t)))
  1578. (delete 'configure))))
  1579. (home-page "http://erratique.ch/software/cmdliner")
  1580. (synopsis "Declarative definition of command line interfaces for OCaml")
  1581. (description "Cmdliner is a module for the declarative definition of command
  1582. line interfaces. It provides a simple and compositional mechanism to convert
  1583. command line arguments to OCaml values and pass them to your functions. The
  1584. module automatically handles syntax errors, help messages and UNIX man page
  1585. generation. It supports programs with single or multiple commands and respects
  1586. most of the POSIX and GNU conventions.")
  1587. (license license:bsd-3)))
  1588. (define-public ocaml4.02-cmdliner
  1589. (package-with-ocaml4.02 ocaml-cmdliner))
  1590. (define-public ocaml-fmt
  1591. (package
  1592. (name "ocaml-fmt")
  1593. (version "0.8.5")
  1594. (source
  1595. (origin
  1596. (method url-fetch)
  1597. (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
  1598. version ".tbz"))
  1599. (sha256 (base32
  1600. "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"))))
  1601. (build-system ocaml-build-system)
  1602. (native-inputs
  1603. `(("ocamlbuild" ,ocamlbuild)
  1604. ("opam" ,opam)
  1605. ("topkg" ,ocaml-topkg)))
  1606. (propagated-inputs
  1607. `(("result" ,ocaml-result)
  1608. ("ocaml-uchar" ,ocaml-uchar)
  1609. ("cmdliner" ,ocaml-cmdliner)))
  1610. (arguments `(#:tests? #f
  1611. #:build-flags (list "build" "--with-base-unix" "true"
  1612. "--with-cmdliner" "true")
  1613. #:phases
  1614. (modify-phases %standard-phases
  1615. (delete 'configure))))
  1616. (home-page "http://erratique.ch/software/fmt")
  1617. (synopsis "OCaml Format pretty-printer combinators")
  1618. (description "Fmt exposes combinators to devise Format pretty-printing
  1619. functions.")
  1620. (license license:isc)))
  1621. (define-public ocaml4.02-fmt
  1622. (package-with-ocaml4.02 ocaml-fmt))
  1623. (define-public ocaml-astring
  1624. (package
  1625. (name "ocaml-astring")
  1626. (version "0.8.3")
  1627. (source
  1628. (origin
  1629. (method url-fetch)
  1630. (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
  1631. version ".tbz"))
  1632. (sha256 (base32
  1633. "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
  1634. (build-system ocaml-build-system)
  1635. (native-inputs
  1636. `(("ocamlbuild" ,ocamlbuild)
  1637. ("opam" ,opam)
  1638. ("topkg" ,ocaml-topkg)))
  1639. (arguments
  1640. `(#:tests? #f
  1641. #:build-flags (list "build")
  1642. #:phases
  1643. (modify-phases %standard-phases
  1644. (delete 'configure))))
  1645. (home-page "http://erratique.ch/software/astring")
  1646. (synopsis "Alternative String module for OCaml")
  1647. (description "Astring exposes an alternative String module for OCaml. This
  1648. module balances minimality and expressiveness for basic, index-free, string
  1649. processing and provides types and functions for substrings, string sets and
  1650. string maps. The String module exposed by Astring has exception safe functions,
  1651. removes deprecated and rarely used functions, alters some signatures and names,
  1652. adds a few missing functions and fully exploits OCaml's newfound string
  1653. immutability.")
  1654. (license license:isc)))
  1655. (define-public ocaml4.02-astring
  1656. (package-with-ocaml4.02 ocaml-astring))
  1657. (define-public ocaml-alcotest
  1658. (package
  1659. (name "ocaml-alcotest")
  1660. (version "0.7.2")
  1661. (source (origin
  1662. (method url-fetch)
  1663. (uri (string-append "https://github.com/mirage/alcotest/releases/"
  1664. "download/" version "/alcotest-" version ".tbz"))
  1665. (sha256
  1666. (base32
  1667. "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
  1668. (build-system ocaml-build-system)
  1669. (arguments
  1670. `(#:tests? #f
  1671. #:build-flags (list "build")
  1672. #:phases
  1673. (modify-phases %standard-phases
  1674. (delete 'configure))))
  1675. (native-inputs
  1676. `(("ocamlbuild" ,ocamlbuild)
  1677. ("opam" ,opam)
  1678. ("topkg" ,ocaml-topkg)))
  1679. (propagated-inputs
  1680. `(("fmt" ,ocaml-fmt)
  1681. ("astring" ,ocaml-astring)))
  1682. (home-page "https://github.com/mirage/alcotest")
  1683. (synopsis "Lightweight OCaml test framework")
  1684. (description "Alcotest exposes simple interface to perform unit tests. It
  1685. exposes a simple TESTABLE module type, a check function to assert test
  1686. predicates and a run function to perform a list of unit -> unit test callbacks.
  1687. Alcotest provides a quiet and colorful output where only faulty runs are fully
  1688. displayed at the end of the run (with the full logs ready to inspect), with a
  1689. simple (yet expressive) query language to select the tests to run.")
  1690. (license license:isc)))
  1691. (define-public ocaml4.02-alcotest
  1692. (package-with-ocaml4.02 ocaml-alcotest))
  1693. (define-public ocaml-ppx-tools
  1694. (package
  1695. (name "ocaml-ppx-tools")
  1696. (version "5.1+4.06.0")
  1697. (source
  1698. (origin
  1699. (method url-fetch)
  1700. (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
  1701. version ".tar.gz"))
  1702. (sha256 (base32
  1703. "0mncpy9v2mcjgnj7s2vqpp2b1ixv54djicfx66ic9wny9d202gj1"))))
  1704. (build-system ocaml-build-system)
  1705. (arguments
  1706. `(#:phases (modify-phases %standard-phases (delete 'configure))
  1707. #:tests? #f))
  1708. (properties
  1709. `((ocaml4.02-variant . ,(delay ocaml4.02-ppx-tools))))
  1710. (home-page "https://github.com/alainfrisch/ppx_tools")
  1711. (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
  1712. (description "Tools for authors of ppx rewriters and other syntactic tools.")
  1713. (license license:expat)))
  1714. (define-public ocaml4.02-ppx-tools
  1715. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-ppx-tools))))
  1716. (package
  1717. (inherit base)
  1718. (version "5.0+4.02.0")
  1719. (source
  1720. (origin
  1721. (method url-fetch)
  1722. (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
  1723. version ".tar.gz"))
  1724. (sha256 (base32
  1725. "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc")))))))
  1726. (define-public ocaml-react
  1727. (package
  1728. (name "ocaml-react")
  1729. (version "1.2.0")
  1730. (source
  1731. (origin
  1732. (method url-fetch)
  1733. (uri (string-append "http://erratique.ch/software/react/releases/react-"
  1734. version ".tbz"))
  1735. (sha256 (base32
  1736. "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
  1737. (build-system ocaml-build-system)
  1738. (native-inputs
  1739. `(("ocamlbuild" ,ocamlbuild)
  1740. ("opam" ,opam)))
  1741. (arguments
  1742. `(#:tests? #f
  1743. #:build-flags (list "native=true" "native-dynlink=true")
  1744. #:phases
  1745. (modify-phases %standard-phases
  1746. (delete 'configure))))
  1747. (home-page "http://erratique.ch/software/react")
  1748. (synopsis "Declarative events and signals for OCaml")
  1749. (description "React is an OCaml module for functional reactive programming
  1750. (FRP). It provides support to program with time varying values: declarative
  1751. events and signals. React doesn't define any primitive event or signal, it
  1752. lets the client choose the concrete timeline.")
  1753. (license license:bsd-3)))
  1754. (define-public ocaml4.02-react
  1755. (package-with-ocaml4.02 ocaml-react))
  1756. (define-public ocaml-ssl
  1757. (package
  1758. (name "ocaml-ssl")
  1759. (version "0.5.5")
  1760. (source
  1761. (origin
  1762. (method git-fetch)
  1763. (uri (git-reference
  1764. (url "https://github.com/savonet/ocaml-ssl.git")
  1765. (commit version)))
  1766. (file-name (git-file-name name version))
  1767. (sha256 (base32
  1768. "0fviq8xhp3qk7pmkl7knchywsipxgb7p0z489hj8qnf2sx8xzdmy"))))
  1769. (build-system ocaml-build-system)
  1770. (arguments
  1771. `(#:tests? #f
  1772. #:make-flags (list "OCAMLFIND_LDCONF=ignore")
  1773. #:phases
  1774. (modify-phases %standard-phases
  1775. (add-after 'unpack 'bootstrap
  1776. (lambda* (#:key #:allow-other-keys)
  1777. (system* "sh" "bootstrap")
  1778. (substitute* "src/OCamlMakefile"
  1779. (("/bin/sh") (which "bash")))
  1780. (substitute* "configure"
  1781. (("/bin/sh") (which "bash")))
  1782. #t)))))
  1783. (native-inputs
  1784. `(("autoconf" ,autoconf)
  1785. ("automake" ,automake)
  1786. ("which" ,which)))
  1787. (propagated-inputs `(("openssl" ,openssl)))
  1788. (home-page "https://github.com/savonet/ocaml-ssl/")
  1789. (synopsis "OCaml bindings for OpenSSL")
  1790. (description
  1791. "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
  1792. through Transport Layer Security (@dfn{TLS}) encrypted connections.")
  1793. (license license:lgpl2.1)))
  1794. (define-public ocaml4.02-ssl
  1795. (package-with-ocaml4.02 ocaml-ssl))
  1796. (define-public ocaml-lwt
  1797. (package
  1798. (name "ocaml-lwt")
  1799. (version "4.1.0")
  1800. (source
  1801. (origin
  1802. (method url-fetch)
  1803. (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
  1804. ".tar.gz"))
  1805. (file-name (string-append name "-" version ".tar.gz"))
  1806. (sha256 (base32
  1807. "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
  1808. (build-system dune-build-system)
  1809. (arguments
  1810. `(#:tests? #f; require lwt_ppx
  1811. #:jbuild? #t
  1812. #:phases
  1813. (modify-phases %standard-phases
  1814. (add-before 'build 'configure
  1815. (lambda _
  1816. (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
  1817. #t)))))
  1818. (native-inputs
  1819. `(("ocaml-cppo" ,ocaml-cppo)
  1820. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  1821. ("pkg-config" ,pkg-config)
  1822. ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
  1823. (inputs
  1824. `(("libev" ,libev)
  1825. ("glib" ,glib)))
  1826. (propagated-inputs
  1827. `(("result" ,ocaml-result)
  1828. ("ocaml-ssl" ,ocaml-ssl)
  1829. ("ocaml-react" ,ocaml-react)))
  1830. (home-page "https://github.com/ocsigen/lwt")
  1831. (synopsis "Cooperative threads and I/O in monadic style")
  1832. (description "Lwt provides typed, composable cooperative threads. These
  1833. make it easy to run normally-blocking I/O operations concurrently in a single
  1834. process. Also, in many cases, Lwt threads can interact without the need for
  1835. locks or other synchronization primitives.")
  1836. (license license:lgpl2.1)))
  1837. (define-public ocaml4.02-lwt
  1838. (package-with-ocaml4.02 ocaml-lwt))
  1839. (define-public ocaml-lwt-log
  1840. (package
  1841. (name "ocaml-lwt-log")
  1842. (version "1.1.0")
  1843. (source
  1844. (origin
  1845. (method url-fetch)
  1846. (uri (string-append "https://github.com/aantron/lwt_log/archive/" version
  1847. ".tar.gz"))
  1848. (file-name (string-append name "-" version ".tar.gz"))
  1849. (sha256 (base32
  1850. "1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2"))))
  1851. (build-system dune-build-system)
  1852. (arguments
  1853. `(#:tests? #f; require lwt_ppx
  1854. #:jbuild? #t))
  1855. (propagated-inputs
  1856. `(("lwt" ,ocaml-lwt)))
  1857. (home-page "https://github.com/aantron/lwt_log")
  1858. (synopsis "Logging library")
  1859. (description "This package provides a deprecated logging component for
  1860. ocaml lwt.")
  1861. (license license:lgpl2.1)))
  1862. (define-public ocaml4.02-lwt-log
  1863. (package-with-ocaml4.02 ocaml-lwt-log))
  1864. (define-public ocaml-logs
  1865. (package
  1866. (name "ocaml-logs")
  1867. (version "0.6.2")
  1868. (source (origin
  1869. (method url-fetch)
  1870. (uri (string-append "http://erratique.ch/software/logs/releases/"
  1871. "logs-" version ".tbz"))
  1872. (sha256
  1873. (base32
  1874. "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
  1875. (build-system ocaml-build-system)
  1876. (arguments
  1877. `(#:tests? #f
  1878. #:build-flags (list "build" "--with-js_of_ocaml" "false")
  1879. #:phases
  1880. (modify-phases %standard-phases
  1881. (delete 'configure))))
  1882. (native-inputs
  1883. `(("ocamlbuild" ,ocamlbuild)
  1884. ("opam" ,opam)))
  1885. (propagated-inputs
  1886. `(("fmt" ,ocaml-fmt)
  1887. ("lwt" ,ocaml-lwt)
  1888. ("mtime" ,ocaml-mtime)
  1889. ("result" ,ocaml-result)
  1890. ("cmdliner" ,ocaml-cmdliner)
  1891. ("topkg" ,ocaml-topkg)))
  1892. (home-page "http://erratique.ch/software/logs")
  1893. (synopsis "Logging infrastructure for OCaml")
  1894. (description "Logs provides a logging infrastructure for OCaml. Logging is
  1895. performed on sources whose reporting level can be set independently. Log
  1896. message report is decoupled from logging and is handled by a reporter.")
  1897. (license license:isc)))
  1898. (define-public ocaml4.02-logs
  1899. (package-with-ocaml4.02 ocaml-logs))
  1900. (define-public ocaml-fpath
  1901. (package
  1902. (name "ocaml-fpath")
  1903. (version "0.7.1")
  1904. (source (origin
  1905. (method url-fetch)
  1906. (uri (string-append "http://erratique.ch/software/fpath/releases/"
  1907. "fpath-" version ".tbz"))
  1908. (sha256
  1909. (base32
  1910. "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
  1911. (build-system ocaml-build-system)
  1912. (arguments
  1913. `(#:tests? #f
  1914. #:build-flags (list "build")
  1915. #:phases
  1916. (modify-phases %standard-phases
  1917. (delete 'configure))))
  1918. (native-inputs
  1919. `(("ocamlbuild" ,ocamlbuild)
  1920. ("opam" ,opam)))
  1921. (propagated-inputs
  1922. `(("topkg" ,ocaml-topkg)
  1923. ("astring" ,ocaml-astring)))
  1924. (home-page "http://erratique.ch/software/fpath")
  1925. (synopsis "File system paths for OCaml")
  1926. (description "Fpath is an OCaml module for handling file system paths with
  1927. POSIX or Windows conventions. Fpath processes paths without accessing the
  1928. file system and is independent from any system library.")
  1929. (license license:isc)))
  1930. (define-public ocaml4.02-fpath
  1931. (package-with-ocaml4.02 ocaml-fpath))
  1932. (define-public ocaml-bos
  1933. (package
  1934. (name "ocaml-bos")
  1935. (version "0.1.4")
  1936. (source (origin
  1937. (method url-fetch)
  1938. (uri (string-append "http://erratique.ch/software/bos/releases/"
  1939. "bos-" version ".tbz"))
  1940. (sha256
  1941. (base32
  1942. "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
  1943. (build-system ocaml-build-system)
  1944. (arguments
  1945. `(#:tests? #f
  1946. #:build-flags (list "build")
  1947. #:phases
  1948. (modify-phases %standard-phases
  1949. (delete 'configure))))
  1950. (native-inputs
  1951. `(("ocamlbuild" ,ocamlbuild)
  1952. ("opam" ,opam)))
  1953. (propagated-inputs
  1954. `(("topkg" ,ocaml-topkg)
  1955. ("astring" ,ocaml-astring)
  1956. ("fmt" ,ocaml-fmt)
  1957. ("fpath" ,ocaml-fpath)
  1958. ("logs" ,ocaml-logs)
  1959. ("rresult" ,ocaml-rresult)))
  1960. (home-page "http://erratique.ch/software/bos")
  1961. (synopsis "Basic OS interaction for OCaml")
  1962. (description "Bos provides support for basic and robust interaction with
  1963. the operating system in OCaml. It has functions to access the process
  1964. environment, parse command line arguments, interact with the file system and
  1965. run command line programs.")
  1966. (license license:isc)))
  1967. (define-public ocaml4.02-bos
  1968. (package-with-ocaml4.02 ocaml-bos))
  1969. (define-public ocaml-xmlm
  1970. (package
  1971. (name "ocaml-xmlm")
  1972. (version "1.3.0")
  1973. (source (origin
  1974. (method url-fetch)
  1975. (uri (string-append "http://erratique.ch/software/xmlm/releases/"
  1976. "xmlm-" version ".tbz"))
  1977. (sha256
  1978. (base32
  1979. "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
  1980. (build-system ocaml-build-system)
  1981. (arguments
  1982. `(#:tests? #f
  1983. #:build-flags (list "build")
  1984. #:phases
  1985. (modify-phases %standard-phases
  1986. (delete 'configure))))
  1987. (native-inputs
  1988. `(("ocamlbuild" ,ocamlbuild)
  1989. ("ocaml-topkg" ,ocaml-topkg)
  1990. ("opam" ,opam)))
  1991. (home-page "http://erratique.ch/software/xmlm")
  1992. (synopsis "Streaming XML codec for OCaml")
  1993. (description "Xmlm is a streaming codec to decode and encode the XML data
  1994. format. It can process XML documents without a complete in-memory
  1995. representation of the data.")
  1996. (license license:isc)))
  1997. (define-public ocaml4.02-xmlm
  1998. (package-with-ocaml4.02 ocaml-xmlm))
  1999. (define-public ocaml-ulex
  2000. (package
  2001. (name "ocaml-ulex")
  2002. (version "1.2")
  2003. (source (origin
  2004. (method url-fetch)
  2005. (uri (string-append "https://github.com/whitequark/ulex/archive/v"
  2006. version ".tar.gz"))
  2007. (file-name (string-append name "-" version ".tar.gz"))
  2008. (sha256
  2009. (base32
  2010. "16gnbhqs6y2v89vw4igzvxdf2g8ybh5643636824aldcv8sscac0"))))
  2011. (build-system ocaml-build-system)
  2012. (arguments
  2013. `(#:phases (modify-phases %standard-phases (delete 'configure))
  2014. #:tests? #f
  2015. #:make-flags
  2016. (list "all.opt"
  2017. (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
  2018. "-cflags -I," (assoc-ref %build-inputs "camlp4")
  2019. "/lib/ocaml/site-lib/camlp4"))))
  2020. (native-inputs
  2021. `(("camlp4" ,camlp4)
  2022. ("ocamlbuild" ,ocamlbuild)))
  2023. (home-page "http://www.cduce.org/download.html#side")
  2024. (synopsis "Lexer generator for Unicode and OCaml")
  2025. (description "Lexer generator for Unicode and OCaml.")
  2026. (license license:expat)))
  2027. (define-public ocaml4.02-ulex
  2028. (package-with-ocaml4.02 ocaml-ulex))
  2029. (define-public ocaml-uchar
  2030. (package
  2031. (name "ocaml-uchar")
  2032. (version "0.0.2")
  2033. (source
  2034. (origin
  2035. (method url-fetch)
  2036. (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
  2037. version "/uchar-" version ".tbz"))
  2038. (sha256 (base32
  2039. "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
  2040. (build-system ocaml-build-system)
  2041. (arguments
  2042. `(#:tests? #f
  2043. #:build-flags (list "native=true" "native-dynlink=true")
  2044. #:phases
  2045. (modify-phases %standard-phases
  2046. (delete 'configure))))
  2047. (native-inputs
  2048. `(("ocamlbuild" ,ocamlbuild)
  2049. ("opam" ,opam)))
  2050. (home-page "https://github.com/ocaml/uchar")
  2051. (synopsis "Compatibility library for OCaml's Uchar module")
  2052. (description "The uchar package provides a compatibility library for the
  2053. `Uchar` module introduced in OCaml 4.03.")
  2054. (license license:lgpl2.1)))
  2055. (define-public ocaml4.02-uchar
  2056. (package-with-ocaml4.02 ocaml-uchar))
  2057. (define-public ocaml-uutf
  2058. (package
  2059. (name "ocaml-uutf")
  2060. (version "1.0.1")
  2061. (source (origin
  2062. (method url-fetch)
  2063. (uri (string-append "http://erratique.ch/software/uutf/releases/"
  2064. "uutf-" version ".tbz"))
  2065. (sha256
  2066. (base32
  2067. "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
  2068. (build-system ocaml-build-system)
  2069. (arguments
  2070. `(#:tests? #f
  2071. #:build-flags (list "build")
  2072. #:phases
  2073. (modify-phases %standard-phases
  2074. (delete 'configure))))
  2075. (native-inputs
  2076. `(("ocamlbuild" ,ocamlbuild)
  2077. ("opam" ,opam)
  2078. ("topkg" ,ocaml-topkg)))
  2079. (propagated-inputs
  2080. `(("uchar" ,ocaml-uchar)
  2081. ("cmdliner" ,ocaml-cmdliner)))
  2082. (home-page "http://erratique.ch/software/uutf")
  2083. (synopsis "Non-blocking streaming Unicode codec for OCaml")
  2084. (description "Uutf is a non-blocking streaming codec to decode and encode
  2085. the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
  2086. work character by character without blocking on IO. Decoders perform character
  2087. position tracking and support newline normalization.
  2088. Functions are also provided to fold over the characters of UTF encoded OCaml
  2089. string values and to directly encode characters in OCaml Buffer.t values.")
  2090. (license license:isc)))
  2091. (define-public ocaml4.02-uutf
  2092. (package-with-ocaml4.02 ocaml-uutf))
  2093. (define-public ocaml-jsonm
  2094. (package
  2095. (name "ocaml-jsonm")
  2096. (version "1.0.1")
  2097. (source (origin
  2098. (method url-fetch)
  2099. (uri (string-append "http://erratique.ch/software/jsonm/releases/"
  2100. "jsonm-" version ".tbz"))
  2101. (sha256
  2102. (base32
  2103. "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
  2104. (build-system ocaml-build-system)
  2105. (arguments
  2106. `(#:tests? #f
  2107. #:build-flags (list "build")
  2108. #:phases
  2109. (modify-phases %standard-phases
  2110. (delete 'configure))))
  2111. (native-inputs
  2112. `(("ocamlbuild" ,ocamlbuild)
  2113. ("opam" ,opam)
  2114. ("topkg" ,ocaml-topkg)))
  2115. (propagated-inputs
  2116. `(("uutf" ,ocaml-uutf)
  2117. ("cmdliner" ,ocaml-cmdliner)))
  2118. (home-page "http://erratique.ch/software/jsonm")
  2119. (synopsis "Non-blocking streaming JSON codec for OCaml")
  2120. (description "Jsonm is a non-blocking streaming codec to decode and encode
  2121. the JSON data format. It can process JSON text without blocking on IO and
  2122. without a complete in-memory representation of the data.")
  2123. (license license:isc)))
  2124. (define-public ocaml4.02-jsonm
  2125. (package-with-ocaml4.02 ocaml-jsonm))
  2126. (define-public ocaml-ocurl
  2127. (package
  2128. (name "ocaml-ocurl")
  2129. (version "0.8.2")
  2130. (source (origin
  2131. (method url-fetch)
  2132. (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
  2133. version ".tar.gz"))
  2134. (sha256
  2135. (base32
  2136. "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"))))
  2137. (build-system ocaml-build-system)
  2138. (arguments
  2139. `(#:phases
  2140. (modify-phases %standard-phases
  2141. (add-before 'configure 'fix-/bin/sh
  2142. (lambda* (#:key inputs #:allow-other-keys)
  2143. (substitute* "configure"
  2144. (("-/bin/sh") (string-append "-" (which "bash")))))))))
  2145. (native-inputs
  2146. `(("pkg-config" ,pkg-config)))
  2147. (inputs `(("curl" ,curl)))
  2148. (home-page "http://ocurl.forge.ocamlcore.org/")
  2149. (synopsis "OCaml bindings for libcurl")
  2150. (description "Client-side URL transfer library, supporting HTTP and a
  2151. multitude of other network protocols (FTP/SMTP/RTSP/etc).")
  2152. (license license:isc)))
  2153. (define-public ocaml4.02-ocurl
  2154. (package-with-ocaml4.02 ocaml-ocurl))
  2155. (define-public ocaml-base64
  2156. (package
  2157. (name "ocaml-base64")
  2158. (version "2.1.2")
  2159. (source (origin
  2160. (method url-fetch)
  2161. (uri (string-append "https://github.com/mirage/ocaml-base64/"
  2162. "releases/download/v" version "/base64-"
  2163. version ".tbz"))
  2164. (file-name (string-append name "-" version ".tar.gz"))
  2165. (sha256
  2166. (base32
  2167. "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
  2168. (build-system ocaml-build-system)
  2169. (arguments
  2170. `(#:build-flags (list "build" "--tests" "true")
  2171. #:phases
  2172. (modify-phases %standard-phases
  2173. (delete 'configure))))
  2174. (native-inputs
  2175. `(("topkg" ,ocaml-topkg)
  2176. ("ocamlbuild" ,ocamlbuild)
  2177. ("opam" ,opam)
  2178. ("rresult" ,ocaml-rresult)
  2179. ("bos" ,ocaml-bos)
  2180. ("alcotest" ,ocaml-alcotest)))
  2181. (home-page "https://github.com/mirage/ocaml-base64")
  2182. (synopsis "Base64 encoding for OCaml")
  2183. (description "Base64 is a group of similar binary-to-text encoding schemes
  2184. that represent binary data in an ASCII string format by translating it into a
  2185. radix-64 representation. It is specified in RFC 4648.")
  2186. (license license:isc)))
  2187. (define-public ocaml4.02-base64
  2188. (package-with-ocaml4.02 ocaml-base64))
  2189. (define-public ocamlify
  2190. (package
  2191. (name "ocamlify")
  2192. (version "0.0.2")
  2193. (source (origin
  2194. (method url-fetch)
  2195. (uri (ocaml-forge-uri name version 1209))
  2196. (sha256
  2197. (base32
  2198. "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
  2199. (build-system ocaml-build-system)
  2200. ; tests are done during build
  2201. (arguments
  2202. `(#:ocaml ,ocaml-4.02
  2203. #:findlib ,ocaml4.02-findlib
  2204. #:phases
  2205. (modify-phases %standard-phases
  2206. (delete 'check))))
  2207. (home-page "https://forge.ocamlcore.org/projects/ocamlify")
  2208. (synopsis "Include files in OCaml code")
  2209. (description "OCamlify allows to create OCaml source code by including
  2210. whole files into OCaml string or string list. The code generated can be
  2211. compiled as a standard OCaml file. It allows embedding external resources as
  2212. OCaml code.")
  2213. (license license:lgpl2.1+))); with the OCaml static compilation exception
  2214. (define-public omake
  2215. (package
  2216. (name "omake")
  2217. (version "0.10.3")
  2218. (source (origin
  2219. (method url-fetch)
  2220. (uri (string-append "http://download.camlcity.org/download/"
  2221. "omake-" version ".tar.gz"))
  2222. (sha256
  2223. (base32
  2224. "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
  2225. (patches (search-patches "omake-fix-non-determinism.patch"))))
  2226. (build-system ocaml-build-system)
  2227. (arguments
  2228. `(#:make-flags
  2229. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  2230. #:tests? #f ; no test target
  2231. #:phases
  2232. (modify-phases %standard-phases
  2233. (add-before 'configure 'fix-makefile
  2234. (lambda* (#:key outputs #:allow-other-keys)
  2235. (substitute* "mk/osconfig_unix.mk"
  2236. (("CC = cc") "CC = gcc")))))))
  2237. (properties
  2238. `((ocaml4.02-variant . ,(delay ocaml4.02-omake))))
  2239. (native-inputs `(("hevea" ,hevea)))
  2240. (home-page "http://projects.camlcity.org/projects/omake.html")
  2241. (synopsis "Build system designed for scalability and portability")
  2242. (description "Similar to make utilities you may have used, but it features
  2243. many additional enhancements, including:
  2244. @enumerate
  2245. @item Support for projects spanning several directories or directory hierarchies.
  2246. @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
  2247. with full support for incremental builds.
  2248. @item Dependency analysis takes the command lines into account — whenever the
  2249. command line used to build a target changes, the target is considered
  2250. out-of-date.
  2251. @item Fully scriptable, includes a library that providing support for standard
  2252. tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
  2253. @end enumerate")
  2254. (license (list license:lgpl2.1 ; libmojave
  2255. license:expat ; OMake scripts
  2256. license:gpl2)))) ; OMake itself, with ocaml linking exception
  2257. ; see LICENSE.OMake
  2258. (define-public ocaml4.02-omake
  2259. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant omake))))
  2260. (package
  2261. (inherit base)
  2262. (version "0.10.2")
  2263. (source (origin
  2264. (method url-fetch)
  2265. (uri (string-append "http://download.camlcity.org/download/"
  2266. "omake-" version ".tar.gz"))
  2267. (sha256
  2268. (base32
  2269. "1znnlkpz89hk44byvnl1pr92ym6hwfyyw2qm9clq446r6l2z4m64"))
  2270. (patches (search-patches "omake-fix-non-determinism.patch")))))))
  2271. (define-public ocaml-batteries
  2272. (package
  2273. (name "ocaml-batteries")
  2274. (version "2.9.0")
  2275. (source (origin
  2276. (method url-fetch)
  2277. (uri (string-append "https://github.com/ocaml-batteries-team/"
  2278. "batteries-included/releases/download/v"
  2279. version "/batteries-" version ".tar.gz"))
  2280. (sha256
  2281. (base32
  2282. "0lkdmv2my5hirkswmci2cch341n6wkkj2q8apjhs83sg6528caxi"))))
  2283. (build-system ocaml-build-system)
  2284. (native-inputs
  2285. `(("ocamlbuild" ,ocamlbuild)
  2286. ("qtest" ,ocaml-qtest)
  2287. ("bisect" ,ocaml-bisect)
  2288. ("ounit" ,ocaml-ounit)))
  2289. (propagated-inputs
  2290. `(("ocaml-num" ,ocaml-num)))
  2291. (arguments
  2292. `(#:phases
  2293. (modify-phases %standard-phases
  2294. (delete 'check) ; tests are run by the build phase
  2295. (replace 'build
  2296. (lambda* (#:key inputs outputs #:allow-other-keys)
  2297. (let ((files
  2298. (map (lambda (str)
  2299. (substring str 0 (- (string-length str) 1)))
  2300. (append
  2301. (find-files "src" ".*.mliv")
  2302. (find-files "src" ".*.mlv")
  2303. (find-files "src" ".*.mlp")))))
  2304. (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
  2305. "-lflag" "-dllpath-all" files)
  2306. (for-each (lambda (file)
  2307. (copy-file (string-append "_build/" file) file))
  2308. files))
  2309. (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
  2310. "-lflag" "-dllpath-all" "build/mkconf.byte")
  2311. (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
  2312. (invoke "make" "all")
  2313. #t)))))
  2314. (properties
  2315. `((ocaml4.02-variant . ,(delay ocaml4.02-batteries))))
  2316. (home-page "http://batteries.forge.ocamlcore.org/")
  2317. (synopsis "Development platform for the OCaml programming language")
  2318. (description "Define a standard set of libraries which may be expected on
  2319. every compliant installation of OCaml and organize these libraries into a
  2320. hierarchy of modules.")
  2321. (license license:lgpl2.1+)))
  2322. (define-public ocaml4.02-batteries
  2323. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-batteries))))
  2324. (package
  2325. (inherit base)
  2326. (version "2.5.3")
  2327. (source (origin
  2328. (method url-fetch)
  2329. (uri (ocaml-forge-uri "batteries" version 1650))
  2330. (sha256
  2331. (base32
  2332. "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
  2333. (propagated-inputs '()))))
  2334. (define-public ocaml-pcre
  2335. (package
  2336. (name "ocaml-pcre")
  2337. (version "7.2.3")
  2338. (source (origin
  2339. (method url-fetch)
  2340. (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
  2341. "/v" version ".tar.gz"))
  2342. (file-name (string-append name "-" version ".tar.gz"))
  2343. (sha256
  2344. (base32
  2345. "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
  2346. (build-system ocaml-build-system)
  2347. (arguments
  2348. `(#:phases
  2349. (modify-phases %standard-phases
  2350. (add-after 'install 'link-lib
  2351. (lambda* (#:key outputs #:allow-other-keys)
  2352. (let* ((out (assoc-ref outputs "out"))
  2353. (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
  2354. (lib (string-append out "/lib/ocaml/site-lib/pcre")))
  2355. (mkdir-p stubs)
  2356. (symlink (string-append lib "/dllpcre_stubs.so")
  2357. (string-append stubs "/dllpcre_stubs.so")))
  2358. #t)))))
  2359. (native-inputs
  2360. `(("batteries" ,ocaml-batteries)
  2361. ("ocamlbuild" ,ocamlbuild)
  2362. ("pcre:bin" ,pcre "bin")))
  2363. (propagated-inputs `(("pcre" ,pcre)))
  2364. (home-page "https://mmottl.github.io/pcre-ocaml")
  2365. (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
  2366. (description "Pcre-ocaml offers library functions for string pattern
  2367. matching and substitution, similar to the functionality offered by the Perl
  2368. language.")
  2369. (license license:lgpl2.1+))); with the OCaml link exception
  2370. (define-public ocaml4.02-pcre
  2371. (package-with-ocaml4.02 ocaml-pcre))
  2372. (define-public ocaml-expect
  2373. (package
  2374. (name "ocaml-expect")
  2375. (version "0.0.6")
  2376. (source (origin
  2377. (method url-fetch)
  2378. (uri (ocaml-forge-uri name version 1736))
  2379. (sha256
  2380. (base32
  2381. "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
  2382. (arguments
  2383. `(#:tests? #f))
  2384. (build-system ocaml-build-system)
  2385. (native-inputs
  2386. `(("ocamlbuild" ,ocamlbuild)
  2387. ("ocaml-num" ,ocaml-num)
  2388. ("ocaml-pcre" ,ocaml-pcre)
  2389. ("ounit" ,ocaml-ounit)))
  2390. (propagated-inputs `(("batteries" ,ocaml-batteries)))
  2391. (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
  2392. (synopsis "Simple implementation of expect")
  2393. (description "Help building unitary testing of interactive program. You
  2394. can match the question using a regular expression or a timeout.")
  2395. (license license:lgpl2.1+))) ; with the OCaml static compilation exception
  2396. (define-public ocaml4.02-fileutils
  2397. (package
  2398. (name "ocaml4.02-fileutils")
  2399. (version "0.5.3")
  2400. (source (origin
  2401. (method url-fetch)
  2402. (uri (ocaml-forge-uri name version 1728))
  2403. (sha256
  2404. (base32
  2405. "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"))))
  2406. (build-system ocaml-build-system)
  2407. (arguments
  2408. `(#:ocaml ,ocaml-4.02
  2409. #:findlib ,ocaml4.02-findlib))
  2410. (native-inputs
  2411. `(("ounit" ,ocaml4.02-ounit)))
  2412. (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
  2413. (synopsis "Pure OCaml functions to manipulate real file and filename")
  2414. (description "Library to provide pure OCaml functions to manipulate real
  2415. file (POSIX like) and filename.")
  2416. (license license:lgpl2.1+))) ; with the OCaml static compilation exception
  2417. (define-public ocaml-oasis
  2418. (package
  2419. (name "ocaml-oasis")
  2420. (version "0.4.11")
  2421. (source (origin
  2422. (method url-fetch)
  2423. (uri (ocaml-forge-uri name version 1757))
  2424. (sha256
  2425. (base32
  2426. "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
  2427. (modules '((guix build utils)))
  2428. (snippet
  2429. '(begin
  2430. (substitute* "test/test-main/Test.ml"
  2431. ;; most of these tests fail because ld cannot find crti.o, but according
  2432. ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
  2433. ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
  2434. (("TestBaseCompat.tests;") "")
  2435. (("TestExamples.tests;") "")
  2436. (("TestFull.tests;") "")
  2437. (("TestPluginDevFiles.tests;") "")
  2438. (("TestPluginInternal.tests;") "")
  2439. (("TestPluginOCamlbuild.tests;") "")
  2440. (("TestPluginOMake.tests;") ""))
  2441. #t))))
  2442. (build-system ocaml-build-system)
  2443. (arguments
  2444. `(#:tests? #f))
  2445. (native-inputs
  2446. `(("ocamlbuild" ,ocamlbuild)
  2447. ("ocamlify" ,ocamlify)
  2448. ("ocamlmod" ,ocamlmod)))
  2449. (home-page "https://oasis.forge.ocamlcore.org")
  2450. (synopsis "Integrates a configure, build, install system in OCaml projects")
  2451. (description "OASIS is a tool to integrate a configure, build and install
  2452. system in your OCaml projects. It helps to create standard entry points in your
  2453. build system and allows external tools to analyse your project easily.")
  2454. (license license:lgpl2.1+))) ; with ocaml static compilation exception
  2455. (define-public ocaml4.02-oasis
  2456. (package-with-ocaml4.02 ocaml-oasis))
  2457. (define-public ocaml-js-build-tools
  2458. (package
  2459. (name "ocaml-js-build-tools")
  2460. (version "113.33.06")
  2461. (source (janestreet-origin "js-build-tools" version
  2462. "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
  2463. (native-inputs
  2464. `(("oasis" ,ocaml-oasis)
  2465. ("ocamlbuild" ,ocamlbuild)
  2466. ("opam" ,opam)))
  2467. (build-system ocaml-build-system)
  2468. (arguments janestreet-arguments)
  2469. (home-page "https://github.com/janestreet/js-build-tools")
  2470. (synopsis "Collection of tools to help building Jane Street Packages")
  2471. (description "This package contains tools to help building Jane Street
  2472. packages, but can be used for other purposes. It contains:
  2473. @enumerate
  2474. @item an @command{oasis2opam-install} tool to produce a @file{.install} file
  2475. from the oasis build log
  2476. @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
  2477. @end enumerate")
  2478. (license license:asl2.0)))
  2479. (define-public ocaml4.02-js-build-tools
  2480. (package-with-ocaml4.02 ocaml-js-build-tools))
  2481. (define-public ocaml4.02-bin-prot
  2482. (package
  2483. (name "ocaml4.02-bin-prot")
  2484. (version "113.33.03")
  2485. (source (janestreet-origin "bin_prot" version
  2486. "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
  2487. (build-system ocaml-build-system)
  2488. (native-inputs
  2489. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2490. ("opam" ,opam)))
  2491. (arguments
  2492. (ensure-keyword-arguments janestreet-arguments
  2493. `(#:ocaml ,ocaml-4.02
  2494. #:findlib ,ocaml4.02-findlib)))
  2495. (home-page "https://github.com/janestreet/bin_prot/")
  2496. (synopsis "Binary protocol generator")
  2497. (description "This library contains functionality for reading and writing
  2498. OCaml-values in a type-safe binary protocol. It is extremely efficient,
  2499. typically supporting type-safe marshalling and unmarshalling of even highly
  2500. structured values at speeds sufficient to saturate a gigabit connection. The
  2501. protocol is also heavily optimized for size, making it ideal for long-term
  2502. storage of large amounts of data.")
  2503. (license license:asl2.0)))
  2504. (define-public ocaml4.02-fieldslib
  2505. (package
  2506. (name "ocaml4.02-fieldslib")
  2507. (version "113.33.03")
  2508. (source (janestreet-origin "fieldslib" version
  2509. "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv"))
  2510. (build-system ocaml-build-system)
  2511. (native-inputs
  2512. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2513. ("opam" ,opam)))
  2514. (arguments
  2515. (ensure-keyword-arguments janestreet-arguments
  2516. `(#:ocaml ,ocaml-4.02
  2517. #:findlib ,ocaml4.02-findlib)))
  2518. (home-page "https://github.com/janestreet/fieldslib/")
  2519. (synopsis "Syntax extension to record fields")
  2520. (description "Syntax extension to define first class values representing
  2521. record fields, to get and set record fields, iterate and fold over all fields
  2522. of a record and create new record values.")
  2523. (license license:asl2.0)))
  2524. (define-public ocaml4.02-ppx-core
  2525. (package
  2526. (name "ocaml4.02-ppx-core")
  2527. (version "113.33.03")
  2528. (source (janestreet-origin "ppx_core" version
  2529. "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
  2530. (build-system ocaml-build-system)
  2531. (native-inputs
  2532. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2533. ("opam" ,opam)))
  2534. (inputs `(("ppx-tools" ,ocaml4.02-ppx-tools)))
  2535. (arguments
  2536. (ensure-keyword-arguments janestreet-arguments
  2537. `(#:ocaml ,ocaml-4.02
  2538. #:findlib ,ocaml4.02-findlib)))
  2539. (home-page "https://github.com/janestreet/ppx_core/")
  2540. (synopsis "Standard library for ppx rewriters")
  2541. (description "Ppx_core is a standard library for OCaml AST transformers.
  2542. It contains:
  2543. @enumerate
  2544. @item various auto-generated AST traversal using an open recursion scheme
  2545. @item helpers for building AST fragments
  2546. @item helpers for matching AST fragments
  2547. @item a framework for dealing with attributes and extension points.
  2548. @end enumerate")
  2549. (license license:asl2.0)))
  2550. (define-public ocaml4.02-ppx-optcomp
  2551. (package
  2552. (name "ocaml4.02-ppx-optcomp")
  2553. (version "113.33.03")
  2554. (source (janestreet-origin "ppx_optcomp" version
  2555. "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30"))
  2556. (build-system ocaml-build-system)
  2557. (native-inputs
  2558. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2559. ("opam" ,opam)))
  2560. (propagated-inputs
  2561. `(("ppx-tools" ,ocaml4.02-ppx-tools)
  2562. ("ppx-core" ,ocaml4.02-ppx-core)))
  2563. (arguments
  2564. (ensure-keyword-arguments janestreet-arguments
  2565. `(#:ocaml ,ocaml-4.02
  2566. #:findlib ,ocaml4.02-findlib)))
  2567. (home-page "https://github.com/janestreet/ppx_optcomp/")
  2568. (synopsis "Optional compilation for OCaml")
  2569. (description "Ppx_optcomp stands for Optional Compilation. It is a tool
  2570. used to handle optional compilations of pieces of code depending of the word
  2571. size, the version of the compiler, ...")
  2572. (license license:asl2.0)))
  2573. (define-public ocaml4.02-ppx-driver
  2574. (package
  2575. (name "ocaml4.02-ppx-driver")
  2576. (version "113.33.03")
  2577. (source (janestreet-origin "ppx_driver" version
  2578. "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh"))
  2579. (build-system ocaml-build-system)
  2580. (native-inputs
  2581. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2582. ("opam" ,opam)
  2583. ("ppx-optcomp" ,ocaml4.02-ppx-optcomp)))
  2584. (propagated-inputs
  2585. `(("ppx-optcomp" ,ocaml4.02-ppx-optcomp)
  2586. ("ppx-core" ,ocaml4.02-ppx-core)))
  2587. (arguments
  2588. (ensure-keyword-arguments janestreet-arguments
  2589. `(#:ocaml ,ocaml-4.02
  2590. #:findlib ,ocaml4.02-findlib)))
  2591. (home-page "https://github.com/janestreet/ppx_driver/")
  2592. (synopsis "Feature-full driver for OCaml AST transformers")
  2593. (description "A driver is an executable created from a set of OCaml AST
  2594. transformers linked together with a command line frontend. The aim is to
  2595. provide a tool that can be used to:
  2596. @enumerate
  2597. @item easily view the pre-processed version of a file, no need to construct a
  2598. complex command line: @command{ppx file.ml} will do
  2599. @item use a single executable to run several transformations: no need to fork
  2600. many times just for pre-processing
  2601. @item improved errors for misspelled/misplaced attributes and extension points.
  2602. @end enumerate")
  2603. (license license:asl2.0)))
  2604. (define-public ocaml-cppo
  2605. (package
  2606. (name "ocaml-cppo")
  2607. (version "1.6.5")
  2608. (source
  2609. (origin
  2610. (method url-fetch)
  2611. (uri (string-append "https://github.com/mjambon/cppo/archive/v" version
  2612. ".tar.gz"))
  2613. (sha256 (base32
  2614. "1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf"))
  2615. (file-name (string-append name "-" version ".tar.gz"))))
  2616. (build-system dune-build-system)
  2617. (arguments
  2618. `(#:tests? #f
  2619. #:build-flags (list "--profile" "release")))
  2620. (native-inputs
  2621. `(("ocamlbuild" ,ocamlbuild)))
  2622. (home-page "https://github.com/mjambon/cppo")
  2623. (synopsis "Equivalent of the C preprocessor for OCaml programs")
  2624. (description "Cppo is an equivalent of the C preprocessor for OCaml
  2625. programs. It allows the definition of simple macros and file inclusion. Cpp ois:
  2626. @enumerate
  2627. @item more OCaml-friendly than cpp
  2628. @item easy to learn without consulting a manual
  2629. @item reasonably fast
  2630. @item simple to install and to maintain.
  2631. @end enumerate")
  2632. (license license:bsd-3)))
  2633. (define-public ocaml4.02-cppo
  2634. (package-with-ocaml4.02 ocaml-cppo))
  2635. ;; this package is not reproducible. This is related to temporary filenames
  2636. ;; such as findlib_initxxxxx where xxxxx is random.
  2637. (define-public ocaml4.02-ppx-deriving
  2638. (package
  2639. (name "ocaml4.02-ppx-deriving")
  2640. (version "4.1")
  2641. (source
  2642. (origin
  2643. (method url-fetch)
  2644. (uri (string-append "https://github.com/whitequark/ppx_deriving//archive/v"
  2645. version ".tar.gz"))
  2646. (sha256 (base32
  2647. "1fr16g121j6zinwcprzlhx2py4271n9jzs2m9hq2f3qli2b1p0vl"))
  2648. (file-name (string-append name "-" version ".tar.gz"))))
  2649. (build-system ocaml-build-system)
  2650. (native-inputs
  2651. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2652. ("cppo" ,ocaml4.02-cppo)
  2653. ("ounit" ,ocaml4.02-ounit)
  2654. ("opam" ,opam)))
  2655. (propagated-inputs
  2656. `(("result" ,ocaml4.02-result)
  2657. ("ppx-tools" ,ocaml4.02-ppx-tools)))
  2658. (arguments
  2659. `(#:ocaml ,ocaml-4.02
  2660. #:findlib ,ocaml4.02-findlib
  2661. #:phases
  2662. (modify-phases %standard-phases
  2663. (delete 'configure)
  2664. (add-before 'install 'fix-environment
  2665. (lambda* (#:key outputs #:allow-other-keys)
  2666. ;; the installation procedures looks for the installed module
  2667. (setenv "OCAMLPATH"
  2668. (string-append (getenv "OCAMLPATH") ":"
  2669. (getenv "OCAMLFIND_DESTDIR"))))))))
  2670. (home-page "https://github.com/whitequark/ppx_deriving/")
  2671. (synopsis "Type-driven code generation for OCaml >=4.02")
  2672. (description "Ppx_deriving provides common infrastructure for generating
  2673. code based on type definitions, and a set of useful plugins for common tasks.")
  2674. (license license:expat)))
  2675. (define-public ocaml4.02-ppx-type-conv
  2676. (package
  2677. (name "ocaml4.02-ppx-type-conv")
  2678. (version "113.33.03")
  2679. (source
  2680. (janestreet-origin "ppx_type_conv" version
  2681. "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2"))
  2682. (build-system ocaml-build-system)
  2683. (native-inputs
  2684. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2685. ("opam" ,opam)))
  2686. (propagated-inputs
  2687. `(("ppx-deriving" ,ocaml4.02-ppx-deriving)
  2688. ("ppx-core" ,ocaml4.02-ppx-core)
  2689. ("ppx-driver" ,ocaml4.02-ppx-driver)))
  2690. (arguments
  2691. (ensure-keyword-arguments janestreet-arguments
  2692. `(#:ocaml ,ocaml-4.02
  2693. #:findlib ,ocaml4.02-findlib)))
  2694. (home-page "https://github.com/janestreet/ppx_type_conv/")
  2695. (synopsis "Support Library for type-driven code generators")
  2696. (description "The type_conv library factors out functionality needed by
  2697. different preprocessors that generate code from type specifications.")
  2698. (license license:asl2.0)))
  2699. (define-public ocaml4.02-ppx-inline-test
  2700. (package
  2701. (name "ocaml4.02-ppx-inline-test")
  2702. (version "113.33.03")
  2703. (source (janestreet-origin "ppx_inline_test" version
  2704. "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq"))
  2705. (build-system ocaml-build-system)
  2706. (native-inputs
  2707. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2708. ("opam" ,opam)
  2709. ("ppx-core" ,ocaml4.02-ppx-core)))
  2710. (propagated-inputs
  2711. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  2712. ("ppx-tools" ,ocaml4.02-ppx-tools)
  2713. ("ppx-core" ,ocaml4.02-ppx-core)))
  2714. (arguments
  2715. (ensure-keyword-arguments janestreet-arguments
  2716. `(#:ocaml ,ocaml-4.02
  2717. #:findlib ,ocaml4.02-findlib)))
  2718. (home-page "https://github.com/janestreet/ppx_inline_test/")
  2719. (synopsis "Syntax extension for writing in-line tests in ocaml code")
  2720. (description "Syntax extension for writing in-line tests in ocaml code.")
  2721. (license license:asl2.0)))
  2722. (define-public ocaml4.02-ppx-bench
  2723. (package
  2724. (name "ocaml4.02-ppx-bench")
  2725. (version "113.33.03")
  2726. (source (janestreet-origin "ppx_bench" version
  2727. "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68"))
  2728. (build-system ocaml-build-system)
  2729. (native-inputs
  2730. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2731. ("opam" ,opam)
  2732. ("ppx-core" ,ocaml4.02-ppx-core)))
  2733. (propagated-inputs
  2734. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  2735. ("ppx-tools" ,ocaml4.02-ppx-tools)
  2736. ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
  2737. ("ppx-core" ,ocaml4.02-ppx-core)))
  2738. (arguments
  2739. (ensure-keyword-arguments janestreet-arguments
  2740. `(#:ocaml ,ocaml-4.02
  2741. #:findlib ,ocaml4.02-findlib)))
  2742. (home-page "https://github.com/janestreet/ppx_bench/")
  2743. (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
  2744. (description "Syntax extension for writing in-line benchmarks in ocaml code.")
  2745. (license license:asl2.0)))
  2746. (define-public ocaml4.02-ppx-compare
  2747. (package
  2748. (name "ocaml4.02-ppx-compare")
  2749. (version "113.33.03")
  2750. (source (janestreet-origin "ppx_compare" version
  2751. "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z"))
  2752. (build-system ocaml-build-system)
  2753. (native-inputs
  2754. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2755. ("opam" ,opam)
  2756. ("ppx-core" ,ocaml4.02-ppx-core)))
  2757. (propagated-inputs
  2758. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  2759. ("ppx-tools" ,ocaml4.02-ppx-tools)
  2760. ("ppx-core" ,ocaml4.02-ppx-core)
  2761. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
  2762. (arguments
  2763. (ensure-keyword-arguments janestreet-arguments
  2764. `(#:ocaml ,ocaml-4.02
  2765. #:findlib ,ocaml4.02-findlib)))
  2766. (home-page "https://github.com/janestreet/ppx_compare/")
  2767. (synopsis "Generation of comparison functions from types")
  2768. (description "Generation of fast comparison functions from type expressions
  2769. and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
  2770. from type representations. The scaffolded functions are usually much faster
  2771. than ocaml's Pervasives.compare. Scaffolding functions also gives you more
  2772. flexibility by allowing you to override them for a specific type and more safety
  2773. by making sure that you only compare comparable values.")
  2774. (license license:asl2.0)))
  2775. (define-public ocaml4.02-sexplib
  2776. (package
  2777. (name "ocaml4.02-sexplib")
  2778. (version "113.33.03")
  2779. (source (janestreet-origin "sexplib" version
  2780. "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima"))
  2781. (build-system ocaml-build-system)
  2782. (native-inputs
  2783. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2784. ("opam" ,opam)))
  2785. (arguments
  2786. (ensure-keyword-arguments janestreet-arguments
  2787. `(#:ocaml ,ocaml-4.02
  2788. #:findlib ,ocaml4.02-findlib)))
  2789. (home-page "https://github.com/janestreet/sexplib/")
  2790. (synopsis "Library for serializing OCaml values to and from S-expressions")
  2791. (description "Sexplib contains functionality for parsing and pretty-printing
  2792. s-expressions.")
  2793. (license license:asl2.0)))
  2794. (define-public ocaml4.02-typerep
  2795. (package
  2796. (name "ocaml4.02-typerep")
  2797. (version "113.33.03")
  2798. (source (janestreet-origin "typerep" version
  2799. "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy"))
  2800. (build-system ocaml-build-system)
  2801. (native-inputs
  2802. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2803. ("opam" ,opam)))
  2804. (arguments
  2805. (ensure-keyword-arguments janestreet-arguments
  2806. `(#:ocaml ,ocaml-4.02
  2807. #:findlib ,ocaml4.02-findlib)))
  2808. (home-page "https://github.com/janestreet/typerep/")
  2809. (synopsis "Typerep is a library for runtime types")
  2810. (description "Typerep is a library for runtime types.")
  2811. (license license:asl2.0)))
  2812. (define-public ocaml4.02-variantslib
  2813. (package
  2814. (name "ocaml4.02-variantslib")
  2815. (version "113.33.03")
  2816. (source (janestreet-origin "variantslib" version
  2817. "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n"))
  2818. (build-system ocaml-build-system)
  2819. (native-inputs
  2820. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2821. ("opam" ,opam)))
  2822. (arguments
  2823. (ensure-keyword-arguments janestreet-arguments
  2824. `(#:ocaml ,ocaml-4.02
  2825. #:findlib ,ocaml4.02-findlib)))
  2826. (home-page "https://github.com/janestreet/variantslib")
  2827. (synopsis "OCaml variants as first class values")
  2828. (description "OCaml variants as first class values.")
  2829. (license license:asl2.0)))
  2830. (define-public ocaml4.02-ppx-sexp-conv
  2831. (package
  2832. (name "ocaml4.02-ppx-sexp-conv")
  2833. (version "113.33.03")
  2834. (source (janestreet-origin "ppx_sexp_conv" version
  2835. "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7"))
  2836. (build-system ocaml-build-system)
  2837. (native-inputs
  2838. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2839. ("opam" ,opam)
  2840. ("ppx-core" ,ocaml4.02-ppx-core)))
  2841. (propagated-inputs
  2842. `(("sexplib" ,ocaml4.02-sexplib)
  2843. ("ppx-core" ,ocaml4.02-ppx-core)
  2844. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
  2845. ("ppx-tools" ,ocaml4.02-ppx-tools)))
  2846. (arguments
  2847. (ensure-keyword-arguments janestreet-arguments
  2848. `(#:ocaml ,ocaml-4.02
  2849. #:findlib ,ocaml4.02-findlib)))
  2850. (home-page "https://github.com/janestreet/ppx_sexp_conv")
  2851. (synopsis "Generation of S-expression conversion functions from type definitions")
  2852. (description "Generation of S-expression conversion functions from type
  2853. definitions.")
  2854. (license license:asl2.0)))
  2855. (define-public ocaml4.02-ppx-variants-conv
  2856. (package
  2857. (name "ocaml4.02-ppx-variants-conv")
  2858. (version "113.33.03")
  2859. (source (janestreet-origin "ppx_variants_conv" version
  2860. "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34"))
  2861. (build-system ocaml-build-system)
  2862. (native-inputs
  2863. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2864. ("opam" ,opam)))
  2865. (propagated-inputs
  2866. `(("ppx-core" ,ocaml4.02-ppx-core)
  2867. ("variantslib" ,ocaml4.02-variantslib)
  2868. ("ppx-tools" ,ocaml4.02-ppx-tools)
  2869. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
  2870. (arguments
  2871. (ensure-keyword-arguments janestreet-arguments
  2872. `(#:ocaml ,ocaml-4.02
  2873. #:findlib ,ocaml4.02-findlib)))
  2874. (home-page "https://github.com/janestreet/ppx_variants_conv")
  2875. (synopsis "Generation of accessor and iteration functions for ocaml variant
  2876. types")
  2877. (description "Generation of accessor and iteration functions for ocaml
  2878. variant types.")
  2879. (license license:asl2.0)))
  2880. (define-public ocaml4.02-ppx-here
  2881. (package
  2882. (name "ocaml4.02-ppx-here")
  2883. (version "113.33.03")
  2884. (source (janestreet-origin "ppx_here" version
  2885. "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7"))
  2886. (build-system ocaml-build-system)
  2887. (native-inputs
  2888. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2889. ("opam" ,opam)))
  2890. (propagated-inputs
  2891. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  2892. ("ppx-core" ,ocaml4.02-ppx-core)))
  2893. (arguments
  2894. (ensure-keyword-arguments janestreet-arguments
  2895. `(#:ocaml ,ocaml-4.02
  2896. #:findlib ,ocaml4.02-findlib)))
  2897. (home-page "https://github.com/janestreet/ppx_here")
  2898. (synopsis "Expands [%here] into its location")
  2899. (description "Expands [%here] into its location.")
  2900. (license license:asl2.0)))
  2901. (define-public ocaml4.02-ppx-assert
  2902. (package
  2903. (name "ocaml4.02-ppx-assert")
  2904. (version "113.33.03")
  2905. (source (janestreet-origin "ppx_assert" version
  2906. "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
  2907. (build-system ocaml-build-system)
  2908. (native-inputs
  2909. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2910. ("opam" ,opam)))
  2911. (propagated-inputs
  2912. `(("ppx-compare" ,ocaml4.02-ppx-compare)
  2913. ("ppx-core" ,ocaml4.02-ppx-core)
  2914. ("ppx-driver" ,ocaml4.02-ppx-driver)
  2915. ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  2916. ("ppx-tools" ,ocaml4.02-ppx-tools)
  2917. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
  2918. ("ppx-sexplib" ,ocaml4.02-sexplib)
  2919. ("ppx-here" ,ocaml4.02-ppx-here)))
  2920. (arguments
  2921. (ensure-keyword-arguments janestreet-arguments
  2922. `(#:ocaml ,ocaml-4.02
  2923. #:findlib ,ocaml4.02-findlib)))
  2924. (home-page "https://github.com/janestreet/ppx_assert")
  2925. (synopsis "Assert-like extension nodes that raise useful errors on failure")
  2926. (description "Assert-like extension nodes that raise useful errors on failure.")
  2927. (license license:asl2.0)))
  2928. (define-public ocaml4.02-ppx-enumerate
  2929. (package
  2930. (name "ocaml4.02-ppx-enumerate")
  2931. (version "113.33.03")
  2932. (source (janestreet-origin "ppx_enumerate" version
  2933. "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4"))
  2934. (build-system ocaml-build-system)
  2935. (native-inputs
  2936. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2937. ("opam" ,opam)))
  2938. (propagated-inputs
  2939. `(("ppx-tools" ,ocaml4.02-ppx-tools)
  2940. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
  2941. ("ppx-core" ,ocaml4.02-ppx-core)))
  2942. (arguments
  2943. (ensure-keyword-arguments janestreet-arguments
  2944. `(#:ocaml ,ocaml-4.02
  2945. #:findlib ,ocaml4.02-findlib)))
  2946. (home-page "https://github.com/janestreet/ppx_enumerate")
  2947. (synopsis "Generate a list containing all values of a finite type")
  2948. (description "Ppx_enumerate is a ppx rewriter which generates a definition
  2949. for the list of all values of a type (for a type which only has finitely
  2950. many values).")
  2951. (license license:asl2.0)))
  2952. (define-public ocaml4.02-ppx-let
  2953. (package
  2954. (name "ocaml4.02-ppx-let")
  2955. (version "113.33.03")
  2956. (source (janestreet-origin "ppx_let" version
  2957. "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9"))
  2958. (build-system ocaml-build-system)
  2959. (native-inputs
  2960. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2961. ("opam" ,opam)))
  2962. (propagated-inputs
  2963. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  2964. ("ppx-core" ,ocaml4.02-ppx-core)))
  2965. (arguments
  2966. (ensure-keyword-arguments janestreet-arguments
  2967. `(#:ocaml ,ocaml-4.02
  2968. #:findlib ,ocaml4.02-findlib)))
  2969. (home-page "https://github.com/janestreet/ppx_let")
  2970. (synopsis "Monadic let-bindings")
  2971. (description "A ppx rewriter for monadic and applicative let bindings,
  2972. match expressions, and if expressions.")
  2973. (license license:asl2.0)))
  2974. (define-public ocaml4.02-ppx-typerep-conv
  2975. (package
  2976. (name "ocaml4.02-ppx-typerep-conv")
  2977. (version "113.33.03")
  2978. (source (janestreet-origin "ppx_typerep_conv" version
  2979. "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg"))
  2980. (build-system ocaml-build-system)
  2981. (native-inputs
  2982. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  2983. ("opam" ,opam)))
  2984. (propagated-inputs
  2985. `(("ppx-tools" ,ocaml4.02-ppx-tools)
  2986. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
  2987. ("ppx-core" ,ocaml4.02-ppx-core)
  2988. ("typerep" ,ocaml4.02-typerep)))
  2989. (arguments
  2990. (ensure-keyword-arguments janestreet-arguments
  2991. `(#:ocaml ,ocaml-4.02
  2992. #:findlib ,ocaml4.02-findlib)))
  2993. (home-page "https://github.com/janestreet/ppx_typerep_conv")
  2994. (synopsis "Generation of runtime types from type declarations")
  2995. (description "Automatic generation of runtime types from type definitions.")
  2996. (license license:asl2.0)))
  2997. (define-public ocaml4.02-ppx-sexp-value
  2998. (package
  2999. (name "ocaml4.02-ppx-sexp-value")
  3000. (version "113.33.03")
  3001. (source (janestreet-origin "ppx_sexp_value" version
  3002. "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g"))
  3003. (build-system ocaml-build-system)
  3004. (native-inputs
  3005. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3006. ("opam" ,opam)))
  3007. (propagated-inputs
  3008. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  3009. ("ppx-here" ,ocaml4.02-ppx-here)
  3010. ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3011. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3012. ("ppx-core" ,ocaml4.02-ppx-core)))
  3013. (arguments
  3014. (ensure-keyword-arguments janestreet-arguments
  3015. `(#:ocaml ,ocaml-4.02
  3016. #:findlib ,ocaml4.02-findlib)))
  3017. (home-page "https://github.com/janestreet/ppx_sexp_value/")
  3018. (synopsis "Simplify building s-expressions from ocaml values")
  3019. (description "A ppx rewriter that simplifies building s-expressions from
  3020. ocaml values.")
  3021. (license license:asl2.0)))
  3022. (define-public ocaml4.02-ppx-pipebang
  3023. (package
  3024. (name "ocaml4.02-ppx-pipebang")
  3025. (version "113.33.03")
  3026. (source (janestreet-origin "ppx_pipebang" version
  3027. "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw"))
  3028. (build-system ocaml-build-system)
  3029. (native-inputs
  3030. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3031. ("opam" ,opam)))
  3032. (propagated-inputs
  3033. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  3034. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3035. ("ppx-core" ,ocaml4.02-ppx-core)))
  3036. (arguments
  3037. (ensure-keyword-arguments janestreet-arguments
  3038. `(#:ocaml ,ocaml-4.02
  3039. #:findlib ,ocaml4.02-findlib)))
  3040. (home-page "https://github.com/janestreet/ppx_pipebang/")
  3041. (synopsis "Inline reverse application operators `|>` and `|!`")
  3042. (description "A ppx rewriter that inlines reverse application operators
  3043. @code{|>} and @code{|!}.")
  3044. (license license:asl2.0)))
  3045. (define-public ocaml4.02-ppx-bin-prot
  3046. (package
  3047. (name "ocaml4.02-ppx-bin-prot")
  3048. (version "113.33.03")
  3049. (source (janestreet-origin "ppx_bin_prot" version
  3050. "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h"))
  3051. (build-system ocaml-build-system)
  3052. (native-inputs
  3053. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3054. ("opam" ,opam)))
  3055. (propagated-inputs
  3056. `(("bin-prot" ,ocaml4.02-bin-prot)
  3057. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3058. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
  3059. ("ppx-core" ,ocaml4.02-ppx-core)))
  3060. (arguments
  3061. (ensure-keyword-arguments janestreet-arguments
  3062. `(#:ocaml ,ocaml-4.02
  3063. #:findlib ,ocaml4.02-findlib)))
  3064. (home-page "https://github.com/janestreet/ppx_bin_prot/")
  3065. (synopsis "Generation of bin_prot readers and writers from types")
  3066. (description "Generation of binary serialization and deserialization
  3067. functions from type definitions.")
  3068. (license license:asl2.0)))
  3069. (define-public ocaml4.02-ppx-fail
  3070. (package
  3071. (name "ocaml4.02-ppx-fail")
  3072. (version "113.33.03")
  3073. (source (janestreet-origin "ppx_fail" version
  3074. "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn"))
  3075. (build-system ocaml-build-system)
  3076. (native-inputs
  3077. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3078. ("opam" ,opam)))
  3079. (propagated-inputs
  3080. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  3081. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3082. ("ppx-here" ,ocaml4.02-ppx-here)
  3083. ("ppx-core" ,ocaml4.02-ppx-core)))
  3084. (arguments
  3085. (ensure-keyword-arguments janestreet-arguments
  3086. `(#:ocaml ,ocaml-4.02
  3087. #:findlib ,ocaml4.02-findlib)))
  3088. (home-page "https://github.com/janestreet/ppx_fail/")
  3089. (synopsis "Add location to calls to failwiths")
  3090. (description "Syntax extension that makes [failwiths] always include a
  3091. position.")
  3092. (license license:asl2.0)))
  3093. (define-public ocaml4.02-ppx-custom-printf
  3094. (package
  3095. (name "ocaml4.02-ppx-custom-printf")
  3096. (version "113.33.03")
  3097. (source (janestreet-origin "ppx_custom_printf" version
  3098. "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8"))
  3099. (build-system ocaml-build-system)
  3100. (native-inputs
  3101. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3102. ("opam" ,opam)))
  3103. (propagated-inputs
  3104. `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3105. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3106. ("ppx-core" ,ocaml4.02-ppx-core)
  3107. ("ppx-driver" ,ocaml4.02-ppx-driver)))
  3108. (arguments
  3109. (ensure-keyword-arguments janestreet-arguments
  3110. `(#:ocaml ,ocaml-4.02
  3111. #:findlib ,ocaml4.02-findlib)))
  3112. (home-page "https://github.com/janestreet/ppx_custom_printf/")
  3113. (synopsis "Printf-style format-strings for user-defined string conversion")
  3114. (description "Extensions to printf-style format-strings for user-defined
  3115. string conversion.")
  3116. (license license:asl2.0)))
  3117. (define-public ocaml4.02-ppx-sexp-message
  3118. (package
  3119. (name "ocaml4.02-ppx-sexp-message")
  3120. (version "113.33.03")
  3121. (source (janestreet-origin "ppx_sexp_message" version
  3122. "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68"))
  3123. (build-system ocaml-build-system)
  3124. (native-inputs
  3125. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3126. ("opam" ,opam)))
  3127. (propagated-inputs
  3128. `(("ppx-driver" ,ocaml4.02-ppx-driver)
  3129. ("ppx-here" ,ocaml4.02-ppx-here)
  3130. ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3131. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3132. ("ppx-core" ,ocaml4.02-ppx-core)))
  3133. (arguments
  3134. (ensure-keyword-arguments janestreet-arguments
  3135. `(#:ocaml ,ocaml-4.02
  3136. #:findlib ,ocaml4.02-findlib)))
  3137. (home-page "https://github.com/janestreet/ppx_sexp_message/")
  3138. (synopsis "A ppx rewriter for easy construction of s-expressions")
  3139. (description "Ppx_sexp_message aims to ease the creation of s-expressions
  3140. in OCaml. This is mainly motivated by writing error and debugging messages,
  3141. where one needs to construct a s-expression based on various element of the
  3142. context such as function arguments.")
  3143. (license license:asl2.0)))
  3144. (define-public ocaml4.02-ppx-fields-conv
  3145. (package
  3146. (name "ocaml4.02-ppx-fields-conv")
  3147. (version "113.33.03")
  3148. (source (janestreet-origin "ppx_fields_conv" version
  3149. "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv"))
  3150. (build-system ocaml-build-system)
  3151. (native-inputs
  3152. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3153. ("opam" ,opam)
  3154. ("ppx-core" ,ocaml4.02-ppx-core)))
  3155. (propagated-inputs
  3156. `(("fieldslib" ,ocaml4.02-fieldslib)
  3157. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3158. ("ppx-core" ,ocaml4.02-ppx-core)
  3159. ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
  3160. (arguments
  3161. (ensure-keyword-arguments janestreet-arguments
  3162. `(#:ocaml ,ocaml-4.02
  3163. #:findlib ,ocaml4.02-findlib)))
  3164. (home-page "https://github.com/janestreet/ppx_fields_conv/")
  3165. (synopsis "Generation of accessor and iteration functions for ocaml records")
  3166. (description "Ppx_fields_conv is a ppx rewriter that can be used to define
  3167. first class values representing record fields, and additional routines, to get
  3168. and set record fields, iterate and fold over all fields of a record and create
  3169. new record values.")
  3170. (license license:asl2.0)))
  3171. (define-public ocaml-seq
  3172. (package
  3173. (name "ocaml-seq")
  3174. (version "0.1")
  3175. (source (origin
  3176. (method url-fetch)
  3177. (uri (string-append "https://github.com/c-cube/seq/archive/"
  3178. version ".tar.gz"))
  3179. (file-name (string-append name "-" version ".tar.gz"))
  3180. (sha256
  3181. (base32
  3182. "02lb2d9i12bxrz2ba5wygk2bycan316skqlyri0597q7j9210g8r"))))
  3183. (build-system ocaml-build-system)
  3184. (arguments
  3185. `(#:tests? #f
  3186. #:phases
  3187. (modify-phases %standard-phases
  3188. (delete 'configure)
  3189. (delete 'build)
  3190. (replace 'install
  3191. (lambda* (#:key outputs #:allow-other-keys)
  3192. (let ((install-dir (string-append (assoc-ref outputs "out")
  3193. "/lib/ocaml/site-lib/seq")))
  3194. (mkdir-p install-dir)
  3195. (with-output-to-file (string-append install-dir "/META")
  3196. (lambda _
  3197. (display "name=\"seq\"
  3198. version=\"[distributed with ocaml]\"
  3199. description=\"dummy package for compatibility\"
  3200. requires=\"\"")))
  3201. #t))))))
  3202. (properties
  3203. `((ocaml4.02-variant . ,(delay ocaml4.02-seq))))
  3204. (home-page "https://github.com/c-cube/seq")
  3205. (synopsis "OCaml's standard iterator type")
  3206. (description "This package is a compatibility package for OCaml's
  3207. standard iterator type starting from 4.07.")
  3208. (license license:lgpl2.1+)))
  3209. (define-public ocaml4.02-seq
  3210. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-seq))))
  3211. (package
  3212. (inherit base)
  3213. (arguments
  3214. `(#:ocaml ,ocaml-4.02
  3215. #:findlib ,ocaml4.02-findlib
  3216. #:tests? #f; no tests
  3217. #:phases (modify-phases %standard-phases (delete 'configure)))))))
  3218. (define-public ocaml-re
  3219. (package
  3220. (name "ocaml-re")
  3221. (version "1.8.0")
  3222. (source (origin
  3223. (method url-fetch)
  3224. (uri (string-append "https://github.com/ocaml/ocaml-re//archive/"
  3225. version ".tar.gz"))
  3226. (file-name (string-append name "-" version ".tar.gz"))
  3227. (sha256
  3228. (base32
  3229. "1pdb0mr6z5ax6szblr3f5lbdnqq9grm97cmsfjmdma60yrx2rqhd"))))
  3230. (build-system dune-build-system)
  3231. (arguments
  3232. `(#:tests? #f
  3233. #:build-flags (list "--profile" "release")))
  3234. (propagated-inputs
  3235. `(("ocaml-seq" ,ocaml-seq)))
  3236. (native-inputs
  3237. `(("ounit" ,ocaml-ounit)))
  3238. (home-page "https://github.com/ocaml/ocaml-re/")
  3239. (synopsis "Regular expression library for OCaml")
  3240. (description "Pure OCaml regular expressions with:
  3241. @enumerate
  3242. @item Perl-style regular expressions (module Re_perl)
  3243. @item Posix extended regular expressions (module Re_posix)
  3244. @item Emacs-style regular expressions (module Re_emacs)
  3245. @item Shell-style file globbing (module Re_glob)
  3246. @item Compatibility layer for OCaml's built-in Str module (module Re_str)
  3247. @end enumerate")
  3248. (license license:expat)))
  3249. (define-public ocaml4.02-re
  3250. (package-with-ocaml4.02 ocaml-re))
  3251. (define-public ocaml4.02-ppx-expect
  3252. (package
  3253. (name "ocaml4.02-ppx-expect")
  3254. (version "113.33.03")
  3255. (source (janestreet-origin "ppx_expect" version
  3256. "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc"))
  3257. (build-system ocaml-build-system)
  3258. (native-inputs
  3259. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3260. ("opam" ,opam)))
  3261. (propagated-inputs
  3262. `(("fieldslib" ,ocaml4.02-fieldslib)
  3263. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3264. ("ppx-assert" ,ocaml4.02-ppx-assert)
  3265. ("ppx-compare" ,ocaml4.02-ppx-compare)
  3266. ("ppx-core" ,ocaml4.02-ppx-core)
  3267. ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
  3268. ("ppx-driver" ,ocaml4.02-ppx-driver)
  3269. ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
  3270. ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
  3271. ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3272. ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)
  3273. ("re" ,ocaml4.02-re)
  3274. ("sexplib" ,ocaml4.02-sexplib)
  3275. ("variantslib" ,ocaml4.02-variantslib)))
  3276. (arguments
  3277. (ensure-keyword-arguments janestreet-arguments
  3278. `(#:ocaml ,ocaml-4.02
  3279. #:findlib ,ocaml4.02-findlib)))
  3280. (home-page "https://github.com/janestreet/ppx_expect/")
  3281. (synopsis "Cram like framework for OCaml")
  3282. (description "Expect-test is a framework for writing tests in OCaml, similar
  3283. to Cram. Expect-tests mimic the existing inline tests framework with the
  3284. let%expect_test construct. The body of an expect-test can contain
  3285. output-generating code, interleaved with %expect extension expressions to denote
  3286. the expected output.")
  3287. (license license:asl2.0)))
  3288. (define-public ocaml4.02-ppx-jane
  3289. (package
  3290. (name "ocaml4.02-ppx-jane")
  3291. (version "113.33.03")
  3292. (source (janestreet-origin "ppx_jane" version
  3293. "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl"))
  3294. (build-system ocaml-build-system)
  3295. (native-inputs
  3296. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3297. ("opam" ,opam)))
  3298. (propagated-inputs
  3299. `(("ppx-assert" ,ocaml4.02-ppx-assert)
  3300. ("ppx-bench" ,ocaml4.02-ppx-bench)
  3301. ("ppx-bin-prot" ,ocaml4.02-ppx-bin-prot)
  3302. ("ppx-compare" ,ocaml4.02-ppx-compare)
  3303. ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
  3304. ("ppx-deriving" ,ocaml4.02-ppx-deriving)
  3305. ("ppx-enumerate" ,ocaml4.02-ppx-enumerate)
  3306. ("ppx-expect" ,ocaml4.02-ppx-expect)
  3307. ("ppx-fail" ,ocaml4.02-ppx-fail)
  3308. ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
  3309. ("ppx-here" ,ocaml4.02-ppx-here)
  3310. ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
  3311. ("ppx-let" ,ocaml4.02-ppx-let)
  3312. ("ppx-pipebang" ,ocaml4.02-ppx-pipebang)
  3313. ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3314. ("ppx-sexp-message" ,ocaml4.02-ppx-sexp-message)
  3315. ("ppx-sexp-value" ,ocaml4.02-ppx-sexp-value)
  3316. ("ppx-typerep-conv" ,ocaml4.02-ppx-typerep-conv)
  3317. ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)))
  3318. (arguments
  3319. (ensure-keyword-arguments janestreet-arguments
  3320. `(#:ocaml ,ocaml-4.02
  3321. #:findlib ,ocaml4.02-findlib)))
  3322. (home-page "https://github.com/janestreet/ppx_jane/")
  3323. (synopsis "Standard Jane Street ppx rewriters")
  3324. (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
  3325. (license license:asl2.0)))
  3326. (define-public ocaml4.02-core-kernel
  3327. (package
  3328. (name "ocaml4.02-core-kernel")
  3329. (version "113.33.03")
  3330. (source (janestreet-origin "core_kernel" version
  3331. "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y"))
  3332. (native-inputs
  3333. `(("js-build-tools" ,ocaml4.02-js-build-tools)
  3334. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3335. ("opam" ,opam)))
  3336. (propagated-inputs
  3337. `(("bin_prot" ,ocaml4.02-bin-prot)
  3338. ("ppx-assert" ,ocaml4.02-ppx-assert)
  3339. ("ppx-bench" ,ocaml4.02-ppx-bench)
  3340. ("ppx-driver" ,ocaml4.02-ppx-driver)
  3341. ("ppx-expect" ,ocaml4.02-ppx-expect)
  3342. ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
  3343. ("typerep" ,ocaml4.02-typerep)
  3344. ("sexplib" ,ocaml4.02-sexplib)
  3345. ("variantslib" ,ocaml4.02-variantslib)
  3346. ("result" ,ocaml4.02-result)
  3347. ("fieldslib" ,ocaml4.02-fieldslib)))
  3348. (build-system ocaml-build-system)
  3349. (arguments
  3350. (ensure-keyword-arguments janestreet-arguments
  3351. `(#:ocaml ,ocaml-4.02
  3352. #:findlib ,ocaml4.02-findlib)))
  3353. (home-page "https://github.com/janestreet/core_kernel/")
  3354. (synopsis "Portable standard library for OCaml")
  3355. (description "Core is an alternative to the OCaml standard library.
  3356. Core_kernel is the system-independent part of Core. It is aimed for cases when
  3357. the full Core is not available, such as in Javascript.")
  3358. (license license:asl2.0)))
  3359. (define-public ocaml4.02-async-kernel
  3360. (package
  3361. (name "ocaml4.02-async-kernel")
  3362. (version "113.33.03")
  3363. (source (janestreet-origin "async_kernel" version
  3364. "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd"))
  3365. (native-inputs
  3366. `(("oasis" ,ocaml-oasis)
  3367. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3368. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3369. ("opam" ,opam)))
  3370. (propagated-inputs
  3371. `(("core-kernel" ,ocaml4.02-core-kernel)))
  3372. (build-system ocaml-build-system)
  3373. (arguments
  3374. (ensure-keyword-arguments janestreet-arguments
  3375. `(#:ocaml ,ocaml-4.02
  3376. #:findlib ,ocaml4.02-findlib)))
  3377. (home-page "https://github.com/janestreet/async_kernel/")
  3378. (synopsis "Monadic concurrency library")
  3379. (description "Async-kernel is a library for concurrent programming in OCaml.")
  3380. (license license:asl2.0)))
  3381. (define-public ocaml4.02-async-rpc-kernel
  3382. (package
  3383. (name "ocaml4.02-async-rpc-kernel")
  3384. (version "113.33.03")
  3385. (source (janestreet-origin "async_rpc_kernel" version
  3386. "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh"))
  3387. (native-inputs
  3388. `(("oasis" ,ocaml-oasis)
  3389. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3390. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3391. ("opam" ,opam)))
  3392. (propagated-inputs
  3393. `(("async-kernel" ,ocaml4.02-async-kernel)))
  3394. (build-system ocaml-build-system)
  3395. (arguments
  3396. (ensure-keyword-arguments janestreet-arguments
  3397. `(#:ocaml ,ocaml-4.02
  3398. #:findlib ,ocaml4.02-findlib)))
  3399. (home-page "https://github.com/janestreet/async_rpc_kernel/")
  3400. (synopsis "Platform-independent core of the Async RPC library")
  3401. (description "Async_rpc_kernel is the platform-independent core of
  3402. the Async RPC library.")
  3403. (license license:asl2.0)))
  3404. (define-public ocaml4.02-core
  3405. (package
  3406. (name "ocaml4.02-core")
  3407. (version "113.33.03")
  3408. (source (janestreet-origin "core" version
  3409. "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268"))
  3410. (native-inputs
  3411. `(("oasis" ,ocaml-oasis)
  3412. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3413. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3414. ("opam" ,opam)))
  3415. (propagated-inputs
  3416. `(("core-kernel" ,ocaml4.02-core-kernel)))
  3417. (build-system ocaml-build-system)
  3418. (arguments
  3419. (ensure-keyword-arguments janestreet-arguments
  3420. `(#:ocaml ,ocaml-4.02
  3421. #:findlib ,ocaml4.02-findlib)))
  3422. (home-page "https://github.com/janestreet/core/")
  3423. (synopsis "Alternative to OCaml's standard library")
  3424. (description "The Core suite of libraries is an alternative to OCaml's
  3425. standard library that was developed by Jane Street.")
  3426. (license license:asl2.0)))
  3427. (define-public ocaml4.02-async-unix
  3428. (package
  3429. (name "ocaml4.02-async-unix")
  3430. (version "113.33.03")
  3431. (source (janestreet-origin "async_unix" version
  3432. "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h"))
  3433. (native-inputs
  3434. `(("oasis" ,ocaml-oasis)
  3435. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3436. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3437. ("opam" ,opam)))
  3438. (propagated-inputs
  3439. `(("async-kernel" ,ocaml4.02-async-kernel)
  3440. ("core" ,ocaml4.02-core)))
  3441. (build-system ocaml-build-system)
  3442. (arguments
  3443. (ensure-keyword-arguments janestreet-arguments
  3444. `(#:ocaml ,ocaml-4.02
  3445. #:findlib ,ocaml4.02-findlib)))
  3446. (home-page "https://github.com/janestreet/async_unix")
  3447. (synopsis "Asynchronous execution library for Unix")
  3448. (description "Async_unix is an asynchronous execution library for Unix.")
  3449. (license license:asl2.0)))
  3450. (define-public ocaml4.02-async-extra
  3451. (package
  3452. (name "ocaml4.02-async-extra")
  3453. (version "113.33.03")
  3454. (source (janestreet-origin "async_extra" version
  3455. "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f"))
  3456. (native-inputs
  3457. `(("oasis" ,ocaml-oasis)
  3458. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3459. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3460. ("opam" ,opam)))
  3461. (propagated-inputs
  3462. `(("async-rpc-kernel" ,ocaml4.02-async-rpc-kernel)
  3463. ("async-unix" ,ocaml4.02-async-unix)
  3464. ("core" ,ocaml4.02-core)))
  3465. (build-system ocaml-build-system)
  3466. (arguments
  3467. (ensure-keyword-arguments janestreet-arguments
  3468. `(#:ocaml ,ocaml-4.02
  3469. #:findlib ,ocaml4.02-findlib)))
  3470. (home-page "https://github.com/janestreet/async_extra")
  3471. (synopsis "Extra functionnalities for the async library")
  3472. (description "Async_extra provides additional functionnalities for the
  3473. async library.")
  3474. (license license:asl2.0)))
  3475. (define-public ocaml4.02-async
  3476. (package
  3477. (name "ocaml4.02-async")
  3478. (version "113.33.03")
  3479. (source (janestreet-origin "async" version
  3480. "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25"))
  3481. (native-inputs
  3482. `(("oasis" ,ocaml-oasis)
  3483. ("js-build-tools" ,ocaml4.02-js-build-tools)
  3484. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3485. ("opam" ,opam)))
  3486. (propagated-inputs
  3487. `(("async-extra" ,ocaml4.02-async-extra)))
  3488. (build-system ocaml-build-system)
  3489. (arguments
  3490. (ensure-keyword-arguments janestreet-arguments
  3491. `(#:ocaml ,ocaml-4.02
  3492. #:findlib ,ocaml4.02-findlib)))
  3493. (home-page "https://github.com/janestreet/async")
  3494. (synopsis "Monadic concurrency library")
  3495. (description "Async is a library for concurrent programming in OCaml.")
  3496. (license license:asl2.0)))
  3497. (define-public ocaml-ocplib-endian
  3498. (package
  3499. (name "ocaml-ocplib-endian")
  3500. (version "1.0")
  3501. (source (origin
  3502. (method url-fetch)
  3503. (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
  3504. "archive/" version ".tar.gz"))
  3505. (sha256
  3506. (base32
  3507. "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
  3508. (file-name (string-append name "-" version ".tar.gz"))))
  3509. (build-system ocaml-build-system)
  3510. (native-inputs
  3511. `(("cppo" ,ocaml-cppo)
  3512. ("ocamlbuild" ,ocamlbuild)))
  3513. (home-page "https://github.com/OCamlPro/ocplib-endian")
  3514. (synopsis "Optimised functions to read and write int16/32/64 from strings
  3515. and bigarrays")
  3516. (description "Optimised functions to read and write int16/32/64 from strings
  3517. and bigarrays, based on new primitives added in version 4.01. It works on
  3518. strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
  3519. big- and little-endian, with their unsafe counter-parts.")
  3520. (license license:lgpl2.1)))
  3521. (define-public ocaml4.02-ocplib-endian
  3522. (package-with-ocaml4.02 ocaml-ocplib-endian))
  3523. (define-public ocaml4.02-cstruct
  3524. (package
  3525. (name "ocaml4.02-cstruct")
  3526. (version "2.3.1")
  3527. (source (origin
  3528. (method url-fetch)
  3529. (uri (string-append "https://github.com/mirage/ocaml-cstruct/"
  3530. "archive/v" version ".tar.gz"))
  3531. (sha256
  3532. (base32
  3533. "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))
  3534. (file-name (string-append name "-" version ".tar.gz"))))
  3535. (build-system ocaml-build-system)
  3536. (arguments
  3537. `(#:ocaml ,ocaml-4.02
  3538. #:findlib ,ocaml4.02-findlib
  3539. #:configure-flags
  3540. (list "--enable-lwt" "--enable-async")
  3541. #:phases
  3542. (modify-phases %standard-phases
  3543. (add-after 'install 'link-stubs
  3544. (lambda* (#:key outputs #:allow-other-keys)
  3545. (let* ((out (assoc-ref outputs "out"))
  3546. (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
  3547. (lib (string-append out "/lib/ocaml/site-lib/cstruct")))
  3548. (mkdir-p stubs)
  3549. (symlink (string-append lib "/dllcstruct_stubs.so")
  3550. (string-append stubs "/dllcstruct_stubs.so"))))))))
  3551. (native-inputs
  3552. `(("ounit" ,ocaml4.02-ounit)
  3553. ("ppx-tools" ,ocaml4.02-ppx-tools)
  3554. ("camlp4" ,camlp4-4.02)))
  3555. (propagated-inputs
  3556. `(("ocplib-endian" ,ocaml4.02-ocplib-endian)
  3557. ("lwt" ,ocaml4.02-lwt)
  3558. ("async" ,ocaml4.02-async)
  3559. ("sexplib" ,ocaml4.02-sexplib)))
  3560. (home-page "https://github.com/mirage/ocaml-cstruct")
  3561. (synopsis "Access C structures via a camlp4 extension")
  3562. (description "Cstruct is a library and syntax extension to make it easier
  3563. to access C-like structures directly from OCaml. It supports both reading and
  3564. writing to these structures, and they are accessed via the Bigarray module.")
  3565. (license license:isc)))
  3566. (define-public ocaml4.02-hex
  3567. (package
  3568. (name "ocaml4.02-hex")
  3569. (version "1.0.0")
  3570. (source (origin
  3571. (method url-fetch)
  3572. (uri (string-append "https://github.com/mirage/ocaml-hex/"
  3573. "archive/" version ".tar.gz"))
  3574. (sha256
  3575. (base32
  3576. "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v"))
  3577. (file-name (string-append name "-" version ".tar.gz"))))
  3578. (build-system ocaml-build-system)
  3579. (arguments
  3580. `(#:ocaml ,ocaml-4.02
  3581. #:findlib ,ocaml4.02-findlib))
  3582. (propagated-inputs
  3583. `(("cstruct" ,ocaml4.02-cstruct)))
  3584. (home-page "https://github.com/mirage/ocaml-hex/")
  3585. (synopsis "Minimal library providing hexadecimal converters")
  3586. (description "Hex is a minimal library providing hexadecimal converters.")
  3587. (license license:isc)))
  3588. (define-public ocaml4.02-ezjsonm
  3589. (package
  3590. (name "ocaml4.02-ezjsonm")
  3591. (version "0.4.3")
  3592. (source (origin
  3593. (method url-fetch)
  3594. (uri (string-append "https://github.com/mirage/ezjsonm/archive/"
  3595. version ".tar.gz"))
  3596. (sha256
  3597. (base32
  3598. "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq"))
  3599. (file-name (string-append name "-" version ".tar.gz"))))
  3600. (build-system ocaml-build-system)
  3601. (native-inputs
  3602. `(("alcotest" ,ocaml4.02-alcotest)))
  3603. (propagated-inputs
  3604. `(("hex" ,ocaml4.02-hex)
  3605. ("jsonm" ,ocaml4.02-jsonm)
  3606. ("lwt" ,ocaml4.02-lwt)
  3607. ("sexplib" ,ocaml4.02-sexplib)))
  3608. (arguments
  3609. `(#:configure-flags (list "--enable-lwt")
  3610. #:ocaml ,ocaml-4.02
  3611. #:findlib ,ocaml4.02-findlib))
  3612. (home-page "https://github.com/mirage/ezjsonm/")
  3613. (synopsis "Read and write JSON data")
  3614. (description "Ezjsonm provides more convenient (but far less flexible) input
  3615. and output functions that go to and from [string] values than jsonm. This avoids
  3616. the need to write signal code, which is useful for quick scripts that manipulate
  3617. JSON.")
  3618. (license license:isc)))
  3619. (define-public ocaml4.02-uri
  3620. (package
  3621. (name "ocaml4.02-uri")
  3622. (version "1.9.2")
  3623. (source (origin
  3624. (method url-fetch)
  3625. (uri (string-append "https://github.com/mirage/ocaml-uri/archive/v"
  3626. version ".tar.gz"))
  3627. (sha256
  3628. (base32
  3629. "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc"))
  3630. (file-name (string-append name "-" version ".tar.gz"))))
  3631. (build-system ocaml-build-system)
  3632. (arguments
  3633. `(#:ocaml ,ocaml-4.02
  3634. #:findlib ,ocaml4.02-findlib))
  3635. (native-inputs
  3636. `(("ounit" ,ocaml4.02-ounit)))
  3637. (propagated-inputs
  3638. `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
  3639. ("re" ,ocaml4.02-re)
  3640. ("ppx-deriving" ,ocaml4.02-ppx-deriving)
  3641. ("sexplib" ,ocaml4.02-sexplib)
  3642. ("stringext" ,ocaml4.02-stringext)))
  3643. (home-page "https://github.com/mirage/ocaml-uri")
  3644. (synopsis "RFC3986 URI/URL parsing library")
  3645. (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
  3646. (license license:isc)))
  3647. (define-public ocaml-easy-format
  3648. (package
  3649. (name "ocaml-easy-format")
  3650. (version "1.2.0")
  3651. (source (origin
  3652. (method url-fetch)
  3653. (uri (string-append "https://github.com/mjambon/easy-format/"
  3654. "archive/v" version ".tar.gz"))
  3655. (sha256
  3656. (base32
  3657. "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252"))
  3658. (file-name (string-append name "-" version ".tar.gz"))))
  3659. (build-system ocaml-build-system)
  3660. (arguments
  3661. `(#:phases
  3662. (modify-phases %standard-phases
  3663. (delete 'configure))))
  3664. (home-page "https://github.com/mjambon/easy-format")
  3665. (synopsis "Interface to the Format module")
  3666. (description "Easy-format is a high-level and functional interface to the
  3667. Format module of the OCaml standard library.")
  3668. (license license:bsd-3)))
  3669. (define-public ocaml4.02-easy-format
  3670. (package-with-ocaml4.02 ocaml-easy-format))
  3671. (define-public optcomp
  3672. (package
  3673. (name "optcomp")
  3674. (version "1.6")
  3675. (source (origin
  3676. (method url-fetch)
  3677. (uri (string-append "https://github.com/diml/optcomp/archive/"
  3678. version ".tar.gz"))
  3679. (sha256
  3680. (base32
  3681. "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"))
  3682. (file-name (string-append name "-" version ".tar.gz"))))
  3683. (build-system ocaml-build-system)
  3684. (arguments
  3685. `(#:ocaml ,ocaml-4.02
  3686. #:findlib ,ocaml4.02-findlib
  3687. #:use-make? #t
  3688. #:make-flags
  3689. (list (string-append "BUILDFLAGS=\"-cflags -I,"
  3690. (assoc-ref %build-inputs "camlp4")
  3691. "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\""))))
  3692. (native-inputs `(("camlp4" ,camlp4-4.02)))
  3693. (propagated-inputs `(("camlp4" ,camlp4-4.02)))
  3694. (home-page "https://github.com/diml/optcomp")
  3695. (synopsis "Optional compilation for OCaml")
  3696. (description "Optcomp provides an optional compilation facility with
  3697. cpp-like directives.")
  3698. (license license:bsd-3)))
  3699. (define-public ocaml-piqilib
  3700. (package
  3701. (name "ocaml-piqilib")
  3702. (version "0.6.14")
  3703. (source (origin
  3704. (method url-fetch)
  3705. (uri (string-append "https://github.com/alavrik/piqi/archive/v"
  3706. version ".tar.gz"))
  3707. (sha256
  3708. (base32
  3709. "1ssccnwqzfyf7syfq2fv4zyhwayxwd75rhq9y28mvq1w6qbww4l7"))
  3710. (file-name (string-append name "-" version ".tar.gz"))))
  3711. (build-system ocaml-build-system)
  3712. (arguments
  3713. `(#:phases
  3714. (modify-phases %standard-phases
  3715. (add-before 'configure 'fix-ocamlpath
  3716. (lambda _
  3717. (substitute* '("Makefile" "make/Makefile.ocaml")
  3718. (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
  3719. #t))
  3720. (replace 'configure
  3721. (lambda* (#:key outputs #:allow-other-keys)
  3722. (let ((out (assoc-ref outputs "out")))
  3723. (substitute* "make/OCamlMakefile"
  3724. (("/bin/sh") (which "bash")))
  3725. (invoke "./configure" "--prefix" out "--ocaml-libdir"
  3726. (string-append out "/lib/ocaml/site-lib")))
  3727. #t))
  3728. (add-after 'build 'build-ocaml
  3729. (lambda* (#:key outputs #:allow-other-keys)
  3730. (invoke "make" "ocaml")
  3731. #t))
  3732. (add-after 'install 'install-ocaml
  3733. (lambda* (#:key outputs #:allow-other-keys)
  3734. (invoke "make" "ocaml-install")
  3735. #t))
  3736. (add-after 'install-ocaml 'link-stubs
  3737. (lambda* (#:key outputs #:allow-other-keys)
  3738. (let* ((out (assoc-ref outputs "out"))
  3739. (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
  3740. (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
  3741. (mkdir-p stubs)
  3742. (symlink (string-append lib "/dllpiqilib_stubs.so")
  3743. (string-append stubs "/dllpiqilib_stubs.so"))
  3744. #t))))))
  3745. (native-inputs
  3746. `(("which" ,which)
  3747. ("camlp4" ,camlp4)))
  3748. (propagated-inputs
  3749. `(("xmlm" ,ocaml-xmlm)
  3750. ("ulex" ,ocaml-ulex)
  3751. ("easy-format" ,ocaml-easy-format)
  3752. ("base64" ,ocaml-base64)))
  3753. (home-page "http://piqi.org")
  3754. (synopsis "Data serialization and conversion library")
  3755. (description "Piqilib is the common library used by the piqi command-line
  3756. tool and piqi-ocaml.")
  3757. (license license:asl2.0)))
  3758. (define-public ocaml4.02-piqilib
  3759. (package-with-ocaml4.02 ocaml-piqilib))
  3760. (define-public ocaml-uuidm
  3761. (package
  3762. (name "ocaml-uuidm")
  3763. (version "0.9.6")
  3764. (source (origin
  3765. (method url-fetch)
  3766. (uri (string-append "http://erratique.ch/software/uuidm/"
  3767. "releases/uuidm-" version ".tbz"))
  3768. (sha256
  3769. (base32
  3770. "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
  3771. (build-system ocaml-build-system)
  3772. (arguments
  3773. `(#:build-flags
  3774. (list "build" "--tests" "true" "--with-cmdliner" "true")
  3775. #:phases
  3776. (modify-phases %standard-phases
  3777. (delete 'configure))))
  3778. (native-inputs
  3779. `(("ocamlbuild" ,ocamlbuild)
  3780. ("opam" ,opam)))
  3781. (propagated-inputs
  3782. `(("cmdliner" ,ocaml-cmdliner)
  3783. ("topkg" ,ocaml-topkg)))
  3784. (home-page "http://erratique.ch/software/uuidm")
  3785. (synopsis "Universally unique identifiers for OCaml")
  3786. (description "Uuidm is an OCaml module implementing 128 bits universally
  3787. unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
  3788. and 4 (random based) according to RFC 4122.")
  3789. (license license:isc)))
  3790. (define-public ocaml4.02-uuidm
  3791. (package-with-ocaml4.02 ocaml-uuidm))
  3792. (define-public ocaml-graph
  3793. (package
  3794. (name "ocaml-graph")
  3795. (version "1.8.8")
  3796. (source (origin
  3797. (method url-fetch)
  3798. (uri (string-append "http://ocamlgraph.lri.fr/download/"
  3799. "ocamlgraph-" version ".tar.gz"))
  3800. (sha256
  3801. (base32
  3802. "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
  3803. (build-system ocaml-build-system)
  3804. (arguments
  3805. `(#:install-target "install-findlib"
  3806. #:tests? #f
  3807. #:phases
  3808. (modify-phases %standard-phases
  3809. (add-before 'configure 'set-shell
  3810. (lambda* (#:key inputs #:allow-other-keys)
  3811. (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
  3812. "/bin/sh")))))))
  3813. (inputs `(("lablgtk" ,lablgtk)))
  3814. (properties `((upstream-name . "ocamlgraph")))
  3815. (home-page "http://ocamlgraph.lri.fr/")
  3816. (synopsis "Graph library for OCaml")
  3817. (description "OCamlgraph is a generic graph library for OCaml.")
  3818. (license license:lgpl2.1)))
  3819. (define-public ocaml4.02-graph
  3820. (package-with-ocaml4.02 ocaml-graph))
  3821. (define-public ocaml-piqi
  3822. (package
  3823. (name "ocaml-piqi")
  3824. (version "0.7.6")
  3825. (source (origin
  3826. (method url-fetch)
  3827. (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
  3828. "archive/v" version ".tar.gz"))
  3829. (file-name (string-append name "-" version ".tar.gz"))
  3830. (sha256
  3831. (base32
  3832. "0da0v2v28aj65b0cwpvvmcqyrfvz94pp3j5zgfdr1jrl5s37c21g"))))
  3833. (build-system ocaml-build-system)
  3834. (arguments
  3835. `(#:make-flags
  3836. (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
  3837. (string-append "SHELL=" (assoc-ref %build-inputs "bash")
  3838. "/bin/sh"))
  3839. #:phases
  3840. (modify-phases %standard-phases
  3841. (delete 'configure))))
  3842. (native-inputs
  3843. `(("which" ,which)
  3844. ("camlp4" ,camlp4)
  3845. ("protobuf" ,protobuf))) ; for tests
  3846. (propagated-inputs
  3847. `(("num" ,ocaml-num)
  3848. ("piqilib" ,ocaml-piqilib)))
  3849. (properties
  3850. `((ocaml4.02-variant . ,(delay ocaml4.02-piqi))))
  3851. (home-page "https://github.com/alavrik/piqi-ocaml")
  3852. (synopsis "Protocol serialization system for OCaml")
  3853. (description "Piqi is a multi-format data serialization system for OCaml.
  3854. It provides a uniform interface for serializing OCaml data structures to JSON,
  3855. XML and Protocol Buffers formats.")
  3856. (license license:asl2.0)))
  3857. (define-public ocaml4.02-piqi
  3858. (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-piqi))))
  3859. (package
  3860. (inherit base)
  3861. (propagated-inputs
  3862. `(("piqilib" ,ocaml4.02-piqilib))))))
  3863. (define-public bap
  3864. (package
  3865. (name "bap")
  3866. (version "1.3.0")
  3867. (home-page "https://github.com/BinaryAnalysisPlatform/bap")
  3868. (source (origin
  3869. (method url-fetch)
  3870. (uri (string-append home-page "/archive/v" version ".tar.gz"))
  3871. (sha256
  3872. (base32
  3873. "0v95v9mp7mg8fj25ry0w7566zd9xp6cs8nnqj4l38q54fb1hfav9"))
  3874. (file-name (string-append name "-" version ".tar.gz"))))
  3875. (build-system ocaml-build-system)
  3876. (native-inputs
  3877. `(("oasis" ,ocaml4.02-oasis)
  3878. ("clang" ,clang-3.8)
  3879. ("ounit" ,ocaml4.02-ounit)))
  3880. (propagated-inputs
  3881. `(("core-kernel" ,ocaml4.02-core-kernel)
  3882. ("ppx-driver" ,ocaml4.02-ppx-driver)
  3883. ("bin-prot" ,ocaml4.02-bin-prot)
  3884. ("uri" ,ocaml4.02-uri)
  3885. ("llvm" ,llvm-3.8)
  3886. ("gmp" ,gmp)
  3887. ("clang-runtime" ,clang-runtime)
  3888. ("fileutils" ,ocaml4.02-fileutils)
  3889. ("cmdliner" ,ocaml4.02-cmdliner)
  3890. ("zarith" ,ocaml4.02-zarith)
  3891. ("uuidm" ,ocaml4.02-uuidm)
  3892. ("camlzip" ,ocaml4.02-camlzip)
  3893. ("frontc" ,ocaml-frontc)
  3894. ("ezjsonm" ,ocaml4.02-ezjsonm)
  3895. ("ocurl" ,ocaml4.02-ocurl)
  3896. ("piqi" ,ocaml4.02-piqi)
  3897. ("ocamlgraph" ,ocaml4.02-graph)
  3898. ("bitstring" ,ocaml4.02-bitstring)
  3899. ("ppx-jane" ,ocaml4.02-ppx-jane)
  3900. ("re" ,ocaml4.02-re)))
  3901. (inputs `(("llvm" ,llvm-3.8)))
  3902. (arguments
  3903. `(#:ocaml ,ocaml-4.02
  3904. #:findlib ,ocaml4.02-findlib
  3905. #:use-make? #t
  3906. #:phases
  3907. (modify-phases %standard-phases
  3908. (replace 'configure
  3909. (lambda* (#:key outputs inputs #:allow-other-keys)
  3910. (invoke "./configure" "--prefix"
  3911. (assoc-ref outputs "out")
  3912. "--libdir"
  3913. (string-append
  3914. (assoc-ref outputs "out")
  3915. "/lib/ocaml/site-lib")
  3916. "--with-llvm-version=3.8"
  3917. "--with-llvm-config=llvm-config"
  3918. "--enable-everything")
  3919. (substitute* "plugins/objdump/objdump_main.ml"
  3920. (("Re_perl") "Re.Perl"))
  3921. (substitute* "oasis/objdump"
  3922. (("re.pcre") "re.pcre, re.perl")))))))
  3923. (synopsis "Binary Analysis Platform")
  3924. (description "Binary Analysis Platform is a framework for writing program
  3925. analysis tools, that target binary files. The framework consists of a plethora
  3926. of libraries, plugins, and frontends. The libraries provide code reusability,
  3927. the plugins facilitate extensibility, and the frontends serve as entry points.")
  3928. (license license:expat)))
  3929. (define-public ocaml-camomile
  3930. (package
  3931. (name "ocaml-camomile")
  3932. (version "1.0.1")
  3933. (home-page "https://github.com/yoriyuki/Camomile")
  3934. (source (origin
  3935. (method url-fetch)
  3936. (uri (string-append home-page "/releases/download/" version
  3937. "/camomile-" version ".tbz"))
  3938. (sha256
  3939. (base32
  3940. "01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2"))))
  3941. (build-system dune-build-system)
  3942. (native-inputs
  3943. `(("camlp4" ,camlp4)))
  3944. (arguments
  3945. `(#:build-flags (list "--profile" "realease")
  3946. #:tests? #f))
  3947. (synopsis "Comprehensive Unicode library")
  3948. (description "Camomile is a Unicode library for OCaml. Camomile provides
  3949. Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
  3950. 200 encodings, collation and locale-sensitive case mappings, and more. The
  3951. library is currently designed for Unicode Standard 3.2.")
  3952. ;; with an exception for linked libraries to use a different license
  3953. (license license:lgpl2.0+)))
  3954. (define-public ocaml4.02-camomile
  3955. (package-with-ocaml4.02 ocaml-camomile))
  3956. (define-public ocaml-jbuilder
  3957. (package
  3958. (name "ocaml-jbuilder")
  3959. (version "1.0+beta16")
  3960. (source (origin
  3961. (method url-fetch)
  3962. (uri (string-append
  3963. "https://github.com/janestreet/jbuilder/archive/"
  3964. version ".tar.gz"))
  3965. (file-name (string-append name "-" version ".tar.gz"))
  3966. (sha256
  3967. (base32
  3968. "1cy07pwvbrlysszs938yd74yyvvbgkffpb82qrjph77zf0h2gdi7"))))
  3969. (build-system ocaml-build-system)
  3970. (arguments
  3971. `(#:ocaml ,ocaml-4.02
  3972. #:findlib ,ocaml4.02-findlib
  3973. #:phases
  3974. (modify-phases %standard-phases
  3975. (replace 'configure
  3976. (lambda* (#:key outputs #:allow-other-keys)
  3977. (let ((out (assoc-ref outputs "out")))
  3978. (setenv "PREFIX" out))
  3979. #t)))))
  3980. (native-inputs
  3981. `(("menhir" ,ocaml4.02-menhir)))
  3982. (propagated-inputs
  3983. `(("opam" ,opam)))
  3984. (home-page "https://github.com/janestreet/jbuilder")
  3985. (synopsis "Composable build system for OCaml")
  3986. (description "Jbuilder is a build system designed for OCaml/Reason projects
  3987. only. It focuses on providing the user with a consistent experience and takes
  3988. care of most of the low-level details of OCaml compilation. All you have to do
  3989. is provide a description of your project and Jbuilder will do the rest.")
  3990. (license license:asl2.0)))
  3991. (define-public ocaml-zed
  3992. (package
  3993. (name "ocaml-zed")
  3994. (version "1.6")
  3995. (source (origin
  3996. (method url-fetch)
  3997. (uri (string-append "https://github.com/diml/zed/archive/"
  3998. version ".tar.gz"))
  3999. (file-name (string-append name "-" version ".tar.gz"))
  4000. (sha256
  4001. (base32
  4002. "19m5vrj60vg1b63qfsv0aabdlzgn40cqmx65s3wafqi4fs9xp6jn"))))
  4003. (build-system ocaml-build-system)
  4004. (arguments
  4005. `(#:phases
  4006. (modify-phases %standard-phases
  4007. (delete 'configure)
  4008. (replace 'build
  4009. (lambda _ (invoke "jbuilder" "build")))
  4010. (delete 'check)
  4011. (replace 'install
  4012. (lambda* (#:key outputs #:allow-other-keys)
  4013. (let ((out (assoc-ref outputs "out")))
  4014. (invoke "jbuilder" "install" "--prefix" out)))))))
  4015. (native-inputs
  4016. `(("jbuilder" ,ocaml-jbuilder)))
  4017. (propagated-inputs
  4018. `(("camomile" ,ocaml-camomile)
  4019. ("react" ,ocaml-react)))
  4020. (home-page "https://github.com/diml/zed")
  4021. (synopsis "Abstract engine for text editing in OCaml")
  4022. (description "Zed is an abstract engine for text edition. It can be used
  4023. to write text editors, edition widgets, readlines, etc. You just have to
  4024. connect an engine to your inputs and rendering functions to get an editor.")
  4025. (license license:bsd-3)))
  4026. (define-public ocaml4.02-zed
  4027. (package-with-ocaml4.02 ocaml-zed))
  4028. (define-public ocaml-lambda-term
  4029. (package
  4030. (name "ocaml-lambda-term")
  4031. (version "1.13")
  4032. (source
  4033. (origin
  4034. (method url-fetch)
  4035. (uri (string-append "https://github.com/diml/lambda-term/archive/"
  4036. version ".tar.gz"))
  4037. (file-name (string-append name "-" version ".tar.gz"))
  4038. (sha256
  4039. (base32 "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l"))))
  4040. (build-system dune-build-system)
  4041. (arguments
  4042. `(#:build-flags (list "--profile" "release")
  4043. #:tests? #f))
  4044. (propagated-inputs
  4045. `(("lwt" ,ocaml-lwt)
  4046. ("lwt-log" ,ocaml-lwt-log)
  4047. ("zed" ,ocaml-zed)))
  4048. (home-page "https://github.com/diml/lambda-term")
  4049. (synopsis "Terminal manipulation library for OCaml")
  4050. (description "Lambda-Term is a cross-platform library for manipulating the
  4051. terminal. It provides an abstraction for keys, mouse events, colors, as well as
  4052. a set of widgets to write curses-like applications. The main objective of
  4053. Lambda-Term is to provide a higher level functional interface to terminal
  4054. manipulation than, for example, ncurses, by providing a native OCaml interface
  4055. instead of bindings to a C library.")
  4056. (license license:bsd-3)))
  4057. (define-public ocaml4.02-lambda-term
  4058. (package-with-ocaml4.02 ocaml-lambda-term))
  4059. (define-public ocaml-utop
  4060. (package
  4061. (name "ocaml-utop")
  4062. (version "2.2.0")
  4063. (source (origin
  4064. (method url-fetch)
  4065. (uri (string-append "https://github.com/ocaml-community/utop/archive/"
  4066. version ".tar.gz"))
  4067. (file-name (string-append name "-" version ".tar.gz"))
  4068. (sha256
  4069. (base32
  4070. "1414snwmqaxs1x8wbpjf6fn3jsl01hq0phrr7639xmb5vh15mgd4"))))
  4071. (build-system gnu-build-system)
  4072. (arguments
  4073. `(#:test-target "test"
  4074. #:phases
  4075. (modify-phases %standard-phases
  4076. (delete 'configure)
  4077. (replace 'install
  4078. (lambda* (#:key outputs #:allow-other-keys)
  4079. (let* ((out (assoc-ref outputs "out"))
  4080. (libdir (string-append out "/lib/ocaml/site-lib")))
  4081. (mkdir-p libdir)
  4082. (invoke "jbuilder" "install"
  4083. "--prefix" out
  4084. "--libdir" libdir)))))))
  4085. (native-inputs
  4086. `(("ocaml" ,ocaml)
  4087. ("cppo" ,ocaml-cppo)
  4088. ("jbuilder" ,ocaml-jbuilder)))
  4089. (propagated-inputs
  4090. `(("ocaml-findlib" ,ocaml-findlib)
  4091. ("lambda-term" ,ocaml-lambda-term)
  4092. ("lwt" ,ocaml-lwt)
  4093. ("react" ,ocaml-react)
  4094. ("camomile" ,ocaml-camomile)
  4095. ("zed" ,ocaml-zed)))
  4096. (home-page "https://github.com/diml/utop")
  4097. (synopsis "Improved interface to the OCaml toplevel")
  4098. (description "UTop is an improved toplevel for OCaml. It can run in a
  4099. terminal or in Emacs. It supports line editing, history, real-time and context
  4100. sensitive completion, colors, and more.")
  4101. (license license:bsd-3)))
  4102. (define-public ocaml-integers
  4103. (package
  4104. (name "ocaml-integers")
  4105. (version "0.2.2")
  4106. (home-page "https://github.com/ocamllabs/ocaml-integers")
  4107. (source (origin
  4108. (method url-fetch)
  4109. (uri (string-append home-page
  4110. "/releases/download/v0.2.2/integers-"
  4111. version ".tbz"))
  4112. (file-name (string-append name "-" version ".tbz"))
  4113. (sha256
  4114. (base32
  4115. "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
  4116. (build-system ocaml-build-system)
  4117. (arguments
  4118. `(#:tests? #f; no tests
  4119. #:build-flags (list "build")
  4120. #:phases
  4121. (modify-phases %standard-phases
  4122. (delete 'configure))))
  4123. (native-inputs
  4124. `(("ocamlbuild" ,ocamlbuild)))
  4125. (inputs
  4126. `(("topkg" ,ocaml-topkg)
  4127. ("opam" ,opam)))
  4128. (synopsis "Various signed and unsigned integer types for OCaml")
  4129. (description "The ocaml-integers library provides a number of 8-, 16-, 32-
  4130. and 64-bit signed and unsigned integer types, together with aliases such as
  4131. long and size_t whose sizes depend on the host platform.")
  4132. (license license:expat)))
  4133. (define-public ocaml-ctypes
  4134. (package
  4135. (name "ocaml-ctypes")
  4136. (version "0.14.0")
  4137. (home-page "https://github.com/ocamllabs/ocaml-ctypes")
  4138. (source (origin
  4139. (method url-fetch)
  4140. (uri (string-append home-page "/archive/" version ".tar.gz"))
  4141. (file-name (string-append name "-" version ".tar.gz"))
  4142. (sha256
  4143. (base32
  4144. "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9"))))
  4145. (build-system ocaml-build-system)
  4146. (arguments
  4147. `(#:tests? #f; require an old lwt
  4148. #:make-flags
  4149. (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
  4150. #:phases
  4151. (modify-phases %standard-phases
  4152. (delete 'configure))))
  4153. (native-inputs
  4154. `(("pkg-config" ,pkg-config)))
  4155. (inputs
  4156. `(("libffi" ,libffi)
  4157. ("ounit" ,ocaml-ounit)
  4158. ("integers" ,ocaml-integers)
  4159. ("lwt" ,ocaml-lwt)
  4160. ("topkg" ,ocaml-topkg)
  4161. ("opam" ,opam)))
  4162. (synopsis "Library for binding to C libraries using pure OCaml")
  4163. (description "Ctypes is a library for binding to C libraries using pure
  4164. OCaml. The primary aim is to make writing C extensions as straightforward as
  4165. possible. The core of ctypes is a set of combinators for describing the
  4166. structure of C types -- numeric types, arrays, pointers, structs, unions and
  4167. functions. You can use these combinators to describe the types of the
  4168. functions that you want to call, then bind directly to those functions -- all
  4169. without writing or generating any C!")
  4170. (license license:expat)))
  4171. (define-public ocaml-ocb-stubblr
  4172. (package
  4173. (name "ocaml-ocb-stubblr")
  4174. (version "0.1.1")
  4175. (home-page "https://github.com/pqwy/ocb-stubblr")
  4176. (source (origin
  4177. (method url-fetch)
  4178. (uri (string-append
  4179. home-page "/releases/download/v0.1.1/ocb-stubblr-"
  4180. version ".tbz"))
  4181. (file-name (string-append name "-" version ".tbz"))
  4182. (sha256
  4183. (base32
  4184. "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
  4185. (build-system ocaml-build-system)
  4186. (arguments
  4187. `(#:build-flags (list "build" "--tests" "true")
  4188. #:phases
  4189. (modify-phases %standard-phases
  4190. (delete 'configure))))
  4191. (inputs
  4192. `(("topkg" ,ocaml-topkg)
  4193. ("opam" ,opam)))
  4194. (native-inputs
  4195. `(("astring" ,ocaml-astring)
  4196. ("ocamlbuild" ,ocamlbuild)))
  4197. (synopsis "OCamlbuild plugin for C stubs")
  4198. (description "Ocb-stubblr is about ten lines of code that you need to
  4199. repeat over, over, over and over again if you are using ocamlbuild to build
  4200. OCaml projects that contain C stubs.")
  4201. (license license:isc)))
  4202. (define-public ocaml-tsdl
  4203. (package
  4204. (name "ocaml-tsdl")
  4205. (version "0.9.1")
  4206. (home-page "http://erratique.ch/software/tsdl")
  4207. (source (origin
  4208. (method url-fetch)
  4209. (uri (string-append home-page "/releases/tsdl-"
  4210. version ".tbz"))
  4211. (file-name (string-append name "-" version ".tar.gz"))
  4212. (sha256
  4213. (base32
  4214. "08bb97fhvz829fb0sgjn2p20mp7b04v98zy2qxpk2w390a6c4b34"))))
  4215. (build-system ocaml-build-system)
  4216. (arguments
  4217. `(#:build-flags '("build")
  4218. #:tests? #f; tests require a display device
  4219. #:phases
  4220. (modify-phases %standard-phases
  4221. (delete 'configure))))
  4222. (native-inputs
  4223. `(("ocamlbuild" ,ocamlbuild)
  4224. ("opam" ,opam)
  4225. ("pkg-config" ,pkg-config)))
  4226. (inputs
  4227. `(("topkg" ,ocaml-topkg)
  4228. ("result" ,ocaml-result)
  4229. ("sdl2" ,sdl2)
  4230. ("integers" ,ocaml-integers)
  4231. ("ctypes" ,ocaml-ctypes)))
  4232. (synopsis "Thin bindings to SDL for OCaml")
  4233. (description "Tsdl is an OCaml library providing thin bindings to the
  4234. cross-platform SDL C library.")
  4235. (license license:isc)))
  4236. (define-public dedukti
  4237. (package
  4238. (name "dedukti")
  4239. (version "2.6.0")
  4240. (home-page "https://deducteam.github.io/")
  4241. (source
  4242. (origin
  4243. (method git-fetch)
  4244. (uri (git-reference
  4245. (url "https://github.com/deducteam/dedukti.git")
  4246. (commit (string-append "v" version))))
  4247. (file-name (git-file-name name version))
  4248. (sha256
  4249. (base32
  4250. "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
  4251. (inputs
  4252. `(("menhir" ,ocaml-menhir)))
  4253. (native-inputs
  4254. `(("ocamlbuild" ,ocamlbuild)))
  4255. (build-system ocaml-build-system)
  4256. (arguments
  4257. `(#:phases
  4258. (modify-phases %standard-phases
  4259. (delete 'configure)
  4260. (replace 'build
  4261. (lambda _
  4262. (invoke "make")
  4263. #t))
  4264. (replace 'check
  4265. (lambda _
  4266. (invoke "make" "tests")
  4267. #t))
  4268. (add-before 'install 'set-binpath
  4269. ;; Change binary path in the makefile
  4270. (lambda _
  4271. (let ((out (assoc-ref %outputs "out")))
  4272. (substitute* "GNUmakefile"
  4273. (("BINDIR = (.*)$")
  4274. (string-append "BINDIR = " out "/bin"))))
  4275. #t))
  4276. (replace 'install
  4277. (lambda _
  4278. (invoke "make" "install")
  4279. #t)))))
  4280. (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
  4281. the λ-calculus")
  4282. (description "Dedukti is a proof-checker for the λΠ-calculus modulo
  4283. theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
  4284. dependent types. The λΠ-calculus modulo theory is itself an extension of the
  4285. λΠ-calculus where the context contains variable declaration as well as rewrite
  4286. rules. This system is not designed to develop proofs, but to check proofs
  4287. developed in other systems. In particular, it enjoys a minimalistic syntax.")
  4288. (license license:cecill-c)))
  4289. (define-public emacs-dedukti-mode
  4290. (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
  4291. (package
  4292. (name "emacs-dedukti-mode")
  4293. (version (git-version "0" "0" commit))
  4294. (home-page "https://github.com/rafoo/dedukti-mode")
  4295. (source (origin
  4296. (method git-fetch)
  4297. (uri (git-reference
  4298. (url home-page)
  4299. (commit commit)))
  4300. (sha256
  4301. (base32
  4302. "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
  4303. (file-name (git-file-name name version))))
  4304. (inputs
  4305. `(("dedukti" ,dedukti)))
  4306. (build-system emacs-build-system)
  4307. (arguments
  4308. '(#:phases
  4309. (modify-phases %standard-phases
  4310. (add-before 'install 'patch-dkpath
  4311. (lambda _
  4312. (let ((dkcheck-path (which "dkcheck")))
  4313. (substitute* "dedukti-mode.el"
  4314. (("dedukti-path \"(.*)\"")
  4315. (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
  4316. (synopsis "Emacs major mode for Dedukti files")
  4317. (description "This package provides an Emacs major mode for editing
  4318. Dedukti files.")
  4319. (license license:cecill-b))))
  4320. (define-public emacs-flycheck-dedukti
  4321. (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
  4322. (package
  4323. (name "emacs-flycheck-dedukti")
  4324. (version (git-version "0" "0" commit))
  4325. (home-page "https://github.com/rafoo/flycheck-dedukti")
  4326. (source (origin
  4327. (method git-fetch)
  4328. (uri (git-reference
  4329. (url home-page)
  4330. (commit commit)))
  4331. (sha256
  4332. (base32
  4333. "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
  4334. (file-name (git-file-name name version))))
  4335. (build-system emacs-build-system)
  4336. (inputs
  4337. `(("dedukti-mode" ,emacs-dedukti-mode)
  4338. ("flycheck-mode" ,emacs-flycheck)))
  4339. (synopsis "Flycheck integration for the dedukti language")
  4340. (description "This package provides a frontend for Flycheck to perform
  4341. syntax checking on dedukti files.")
  4342. (license license:cecill-b))))
  4343. (define-public ocaml-ppx-inline-test
  4344. (package
  4345. (name "ocaml-ppx-inline-test")
  4346. (version "0.11.0")
  4347. (home-page "https://github.com/janestreet/ppx_inline_test")
  4348. (source
  4349. (origin
  4350. (method git-fetch)
  4351. (uri (git-reference
  4352. (url (string-append home-page ".git"))
  4353. (commit (string-append "v" version))))
  4354. (file-name (git-file-name name version))
  4355. (sha256
  4356. (base32
  4357. "11n94fz1asjf5vqdgriv0pvsa5lbfpqcyk525c7816w23vskcvq6"))))
  4358. (build-system dune-build-system)
  4359. (arguments
  4360. ;see home page README for further information
  4361. `(#:tests? #f))
  4362. (inputs
  4363. `(("ocaml-base" ,ocaml-base)
  4364. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4365. ("ocaml-compiler-libs" ,ocaml-compiler-libs)
  4366. ("ocaml-sexplib0" ,ocaml-sexplib0)
  4367. ("ocaml-stdio" ,ocaml-stdio)
  4368. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  4369. (synopsis "Syntax extension for writing in-line tests in ocaml code")
  4370. (description "This package contains a syntax extension for writing
  4371. in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
  4372. collection.")
  4373. (license license:expat)))
  4374. (define-public ocaml-bindlib
  4375. (package
  4376. (name "ocaml-bindlib")
  4377. (version "5.0.1")
  4378. (source
  4379. (origin
  4380. (method git-fetch)
  4381. (uri (git-reference
  4382. (url "https://github.com/rlepigre/ocaml-bindlib.git")
  4383. (commit (string-append "ocaml-bindlib_" version))))
  4384. (file-name (git-file-name name version))
  4385. (sha256
  4386. (base32
  4387. "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
  4388. (build-system ocaml-build-system)
  4389. (arguments
  4390. `(#:tests? #f ;no tests
  4391. #:use-make? #t
  4392. #:phases
  4393. (modify-phases %standard-phases
  4394. (delete 'configure)
  4395. (replace 'build
  4396. (lambda _
  4397. (invoke "make")))
  4398. (replace 'install
  4399. (lambda _
  4400. (invoke "make" "install"))))))
  4401. (native-inputs
  4402. `(("ocamlbuild" ,ocamlbuild)
  4403. ("ocaml-findlib" ,ocaml-findlib)))
  4404. (home-page "https://rlepigre.github.io/ocaml-bindlib/")
  4405. (synopsis "OCaml Bindlib library for bound variables")
  4406. (description "Bindlib is a library allowing the manipulation of data
  4407. structures with bound variables. It is particularly useful when writing ASTs
  4408. for programming languages, but also for manipulating terms of the λ-calculus
  4409. or quantified formulas.")
  4410. (license license:gpl3+)))
  4411. (define-public ocaml-earley
  4412. (package
  4413. (name "ocaml-earley")
  4414. (version "2.0.0")
  4415. (home-page "https://github.com/rlepigre/ocaml-earley")
  4416. (source
  4417. (origin
  4418. (method git-fetch)
  4419. (uri (git-reference
  4420. (url (string-append home-page ".git"))
  4421. (commit version)))
  4422. (file-name (git-file-name name version))
  4423. (sha256
  4424. (base32
  4425. "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
  4426. (build-system dune-build-system)
  4427. (arguments
  4428. `(#:test-target "."))
  4429. (synopsis "Parsing library based on Earley Algorithm")
  4430. (description "Earley is a parser combinator library base on Earley's
  4431. algorithm. It is intended to be used in conjunction with an OCaml syntax
  4432. extension which allows the definition of parsers inside the language. There
  4433. is also support for writing OCaml syntax extensions in a camlp4 style.")
  4434. (license license:cecill-b)))
  4435. (define-public ocaml-timed
  4436. (package
  4437. (name "ocaml-timed")
  4438. (version "1.0")
  4439. (home-page "https://github.com/rlepigre/ocaml-timed")
  4440. (source (origin
  4441. (method git-fetch)
  4442. (uri (git-reference
  4443. (url (string-append home-page ".git"))
  4444. (commit (string-append name "_" version))))
  4445. (sha256
  4446. (base32
  4447. "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
  4448. (file-name (git-file-name name version))))
  4449. (build-system ocaml-build-system)
  4450. (arguments
  4451. '(#:phases
  4452. (modify-phases %standard-phases
  4453. (delete 'configure)
  4454. (replace 'build
  4455. (lambda _
  4456. (invoke "make")))
  4457. (replace 'install
  4458. (lambda _
  4459. (invoke "make" "install")))
  4460. (replace 'check
  4461. (lambda _
  4462. (invoke "make" "tests"))))))
  4463. (synopsis "Timed references for imperative state")
  4464. (description "Timed references for imperative state. This module provides
  4465. an alternative type for references (or mutable cells) supporting undo/redo
  4466. operations. In particular, an abstract notion of time is used to capture the
  4467. state of the references at any given point, so that it can be restored. Note
  4468. that usual reference operations only have a constant time / memory overhead
  4469. (compared to those of the standard library).
  4470. Moreover, we provide an alternative implementation based on the references
  4471. of the standard library (Pervasives module). However, it is less efficient
  4472. than the first one.")
  4473. (license license:expat)))
  4474. (define-public ocaml-biniou
  4475. (package
  4476. (name "ocaml-biniou")
  4477. (version "1.2.0")
  4478. (home-page "https://github.com/mjambon/biniou")
  4479. (source
  4480. (origin
  4481. (method git-fetch)
  4482. (uri (git-reference
  4483. (url (string-append home-page ".git"))
  4484. (commit (string-append "v" version))))
  4485. (file-name (git-file-name name version))
  4486. (sha256
  4487. (base32
  4488. "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"))))
  4489. (build-system dune-build-system)
  4490. (inputs
  4491. `(("ocaml-easy-format" ,ocaml-easy-format)))
  4492. (native-inputs
  4493. `(("which" ,which)))
  4494. (synopsis "Data format designed for speed, safety, ease of use and backward
  4495. compatibility")
  4496. (description "Biniou (pronounced \"be new\" is a binary data format
  4497. designed for speed, safety, ease of use and backward compatibility as
  4498. protocols evolve. Biniou is vastly equivalent to JSON in terms of
  4499. functionality but allows implementations several times faster (4 times faster
  4500. than yojson), with 25-35% space savings.")
  4501. (license license:bsd-3)))
  4502. (define-public ocaml-yojson
  4503. (package
  4504. (name "ocaml-yojson")
  4505. (version "1.4.1")
  4506. (home-page "https://github.com/ocaml-community/yojson")
  4507. (source
  4508. (origin
  4509. (method git-fetch)
  4510. (uri (git-reference
  4511. (url (string-append home-page ".git"))
  4512. (commit (string-append "v" version))))
  4513. (file-name (git-file-name name version))
  4514. (sha256
  4515. (base32
  4516. "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
  4517. (build-system dune-build-system)
  4518. (arguments
  4519. `(#:test-target "."))
  4520. (inputs
  4521. `(("ocaml-biniou" ,ocaml-biniou)
  4522. ("ocaml-easy-format" ,ocaml-easy-format)))
  4523. (native-inputs
  4524. `(("ocaml-cppo" ,ocaml-cppo)))
  4525. (synopsis "Low-level JSON library for OCaml")
  4526. (description "Yojson is an optimized parsing and printing library for the
  4527. JSON format. It addresses a few shortcomings of json-wheel including 2x
  4528. speedup, polymorphic variants and optional syntax for tuples and variants.
  4529. @code{ydump} is a pretty printing command-line program provided with the
  4530. yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
  4531. serializers and deserializers from type definitions.")
  4532. (license license:bsd-3)))
  4533. (define-public ocaml-craml
  4534. (package
  4535. (name "ocaml-craml")
  4536. (version "1.0.0")
  4537. (home-page "https://github.com/realworldocaml/craml")
  4538. (source
  4539. (origin
  4540. (method git-fetch)
  4541. (uri (git-reference
  4542. (url (string-append home-page ".git"))
  4543. (commit version)))
  4544. (file-name (git-file-name name version))
  4545. (sha256
  4546. (base32
  4547. "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
  4548. (build-system dune-build-system)
  4549. (inputs
  4550. `(("ocaml-fmt" ,ocaml-fmt)
  4551. ("ocaml-astring" ,ocaml-astring)
  4552. ("ocaml-logs" ,ocaml-logs)
  4553. ("ocaml-cmdliner" ,ocaml-cmdliner)))
  4554. (synopsis
  4555. "CRAM-testing framework for testing command line applications")
  4556. (description "CRAM is a is functional testing framework for command line
  4557. applications. @code{craml} is freely inspired by the
  4558. Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
  4559. format}. @code{craml} is released as a single binary (called @code{craml}).")
  4560. (license license:isc)))
  4561. (define-public ocaml-merlin
  4562. (package
  4563. (name "ocaml-merlin")
  4564. (version "3.2.2")
  4565. (home-page "https://ocaml.github.io/merlin/")
  4566. (source
  4567. (origin
  4568. (method git-fetch)
  4569. (uri (git-reference
  4570. (url "https://github.com/ocaml/merlin.git")
  4571. (commit (string-append "v" version))))
  4572. (file-name (git-file-name name version))
  4573. (sha256
  4574. (base32
  4575. "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
  4576. (build-system dune-build-system)
  4577. (inputs
  4578. `(("ocaml-biniou" ,ocaml-biniou)
  4579. ("ocaml-yojson" ,ocaml-yojson)
  4580. ("ocaml-easy-format" ,ocaml-easy-format)))
  4581. (native-inputs
  4582. `(("ocaml-findlib" ,ocaml-findlib)))
  4583. (arguments
  4584. '(#:tests? #f)) ;; Errors in tests in version 3.2.2
  4585. (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
  4586. (description "Merlin is an editor service that provides modern IDE
  4587. features for OCaml. Emacs and Vim support is provided out-of-the-box.
  4588. External contributors added support for Visual Studio Code, Sublime Text and
  4589. Atom.")
  4590. (license license:expat)))
  4591. (define-public ocaml-gsl
  4592. (package
  4593. (name "ocaml-gsl")
  4594. (version "1.22.0")
  4595. (source
  4596. (origin
  4597. (method url-fetch)
  4598. (uri
  4599. (string-append
  4600. "https://github.com/mmottl/gsl-ocaml/releases/download/"
  4601. version "/gsl-" version ".tbz"))
  4602. (sha256
  4603. (base32
  4604. "17vcswipliq1b2idbzx1z95kskn1a4q4s5v04igilg0f7lnkaarb"))))
  4605. (build-system ocaml-build-system)
  4606. (inputs
  4607. `(("gsl" ,gsl)))
  4608. (home-page "https://mmottl.github.io/gsl-ocaml")
  4609. (synopsis "Bindings to the GNU Scientific Library")
  4610. (description
  4611. "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
  4612. the OCaml language.")
  4613. (license license:gpl3+)))
  4614. (define-public cubicle
  4615. (package
  4616. (name "cubicle")
  4617. (version "1.1.2")
  4618. (source (origin
  4619. (method url-fetch)
  4620. (uri (string-append "http://cubicle.lri.fr/cubicle-"
  4621. version ".tar.gz"))
  4622. (sha256
  4623. (base32
  4624. "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
  4625. (build-system gnu-build-system)
  4626. (native-inputs
  4627. `(("automake" ,automake)
  4628. ("ocaml" ,ocaml)
  4629. ("which" ,(@@ (gnu packages base) which))))
  4630. (propagated-inputs
  4631. `(("ocaml-num" ,ocaml-num)
  4632. ("z3" ,z3)))
  4633. (arguments
  4634. `(#:configure-flags (list "--with-z3")
  4635. #:make-flags (list "QUIET=")
  4636. #:tests? #f
  4637. #:phases
  4638. (modify-phases %standard-phases
  4639. (add-before 'configure 'configure-for-release
  4640. (lambda _
  4641. (substitute* "Makefile.in"
  4642. (("SVNREV=") "#SVNREV="))
  4643. #t))
  4644. (add-before 'configure 'fix-/bin/sh
  4645. (lambda _
  4646. (substitute* "configure"
  4647. (("-/bin/sh") (string-append "-" (which "sh"))))
  4648. #t))
  4649. (add-before 'configure 'fix-smt-z3wrapper.ml
  4650. (lambda _
  4651. (substitute* "Makefile.in"
  4652. (("\\\\n") ""))
  4653. #t))
  4654. (add-before 'configure 'fix-ocaml-num
  4655. (lambda* (#:key inputs #:allow-other-keys)
  4656. (substitute* "Makefile.in"
  4657. (("= \\$\\(FUNCTORYLIB\\)")
  4658. (string-append "= -I "
  4659. (assoc-ref inputs "ocaml-num")
  4660. "/lib/ocaml/site-lib"
  4661. " $(FUNCTORYLIB)")))
  4662. #t)))))
  4663. (home-page "http://cubicle.lri.fr/")
  4664. (synopsis "Model checker for array-based systems")
  4665. (description "Cubicle is a model checker for verifying safety properties
  4666. of array-based systems. This is a syntactically restricted class of
  4667. parametrized transition systems with states represented as arrays indexed by
  4668. an arbitrary number of processes. Cache coherence protocols and mutual
  4669. exclusion algorithms are typical examples of such systems.")
  4670. (license license:asl2.0)))
  4671. (define-public ocaml-sexplib0
  4672. (package
  4673. (name "ocaml-sexplib0")
  4674. (version "0.11.0")
  4675. (home-page "https://github.com/janestreet/sexplib0")
  4676. (source
  4677. (origin
  4678. (method git-fetch)
  4679. (uri (git-reference
  4680. (url (string-append home-page ".git"))
  4681. (commit (string-append "v" version))))
  4682. (file-name (git-file-name name version))
  4683. (sha256
  4684. (base32
  4685. "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
  4686. (build-system dune-build-system)
  4687. (arguments
  4688. '(#:tests? #f)) ;no tests
  4689. (synopsis "Library containing the definition of S-expressions and some
  4690. base converters")
  4691. (description "Part of Jane Street's Core library The Core suite of
  4692. libraries is an industrial strength alternative to OCaml's standard library
  4693. that was developed by Jane Street, the largest industrial user of OCaml.")
  4694. (license license:expat)))
  4695. (define-public ocaml-parsexp
  4696. (package
  4697. (name "ocaml-parsexp")
  4698. (version "0.11.0")
  4699. (home-page "https://github.com/janestreet/parsexp")
  4700. (source
  4701. (origin
  4702. (method git-fetch)
  4703. (uri (git-reference
  4704. (url (string-append home-page ".git"))
  4705. (commit (string-append "v" version))))
  4706. (file-name (git-file-name name version))
  4707. (sha256
  4708. (base32
  4709. "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
  4710. (build-system dune-build-system)
  4711. (inputs
  4712. `(("ocaml-sexplib0" ,ocaml-sexplib0)))
  4713. (synopsis "S-expression parsing library")
  4714. (description
  4715. "This library provides generic parsers for parsing S-expressions from
  4716. strings or other medium.
  4717. The library is focused on performances but still provide full generic
  4718. parsers that can be used with strings, bigstrings, lexing buffers,
  4719. character streams or any other sources effortlessly.
  4720. It provides three different class of parsers:
  4721. @itemize
  4722. @item
  4723. the normal parsers, producing [Sexp.t] or [Sexp.t list] values
  4724. @item
  4725. the parsers with positions, building compact position sequences so
  4726. that one can recover original positions in order to report properly
  4727. located errors at little cost
  4728. @item
  4729. the Concrete Syntax Tree parsers, produce values of type
  4730. @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
  4731. syntax, including comments
  4732. @end itemize
  4733. This library is portable and doesn't provide IO functions. To read
  4734. s-expressions from files or other external sources, you should use
  4735. parsexp_io.")
  4736. (license license:expat)))
  4737. (define-public ocaml-sexplib
  4738. (package
  4739. (name "ocaml-sexplib")
  4740. (version "0.11.0")
  4741. (home-page "https://github.com/janestreet/sexplib")
  4742. (source
  4743. (origin
  4744. (method git-fetch)
  4745. (uri (git-reference
  4746. (url (string-append home-page ".git"))
  4747. (commit (string-append "v" version))))
  4748. (file-name (git-file-name name version))
  4749. (sha256
  4750. (base32
  4751. "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
  4752. (build-system dune-build-system)
  4753. (propagated-inputs
  4754. `(("ocaml-num" ,ocaml-num)
  4755. ("ocaml-parsexp" ,ocaml-parsexp)
  4756. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4757. (synopsis
  4758. "Library for serializing OCaml values to and from S-expressions")
  4759. (description
  4760. "This package is part of Jane Street's Core library. Sexplib contains
  4761. functionality for parsing and pretty-printing s-expressions.")
  4762. (license license:expat)))
  4763. (define-public ocaml-base
  4764. (package
  4765. (name "ocaml-base")
  4766. (version "0.11.1")
  4767. (home-page "https://github.com/janestreet/base")
  4768. (source
  4769. (origin
  4770. (method git-fetch)
  4771. (uri (git-reference
  4772. (url (string-append home-page ".git"))
  4773. (commit (string-append "v" version))))
  4774. (file-name (git-file-name name version))
  4775. (sha256
  4776. (base32
  4777. "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
  4778. (build-system dune-build-system)
  4779. (propagated-inputs
  4780. `(("ocaml-sexplib0" ,ocaml-sexplib0)))
  4781. (arguments
  4782. `(#:phases
  4783. (modify-phases %standard-phases
  4784. (replace 'build
  4785. ;; make warnings non fatal (jbuilder behaviour)
  4786. (lambda _
  4787. (invoke "dune" "build" "@install" "--profile=release"))))))
  4788. (synopsis
  4789. "Full standard library replacement for OCaml")
  4790. (description
  4791. "Base is a complete and portable alternative to the OCaml standard
  4792. library. It provides all standard functionalities one would expect
  4793. from a language standard library. It uses consistent conventions
  4794. across all of its module.
  4795. Base aims to be usable in any context. As a result system dependent
  4796. features such as I/O are not offered by Base. They are instead
  4797. provided by companion libraries such as
  4798. @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
  4799. (license license:expat)))
  4800. (define-public ocaml-compiler-libs
  4801. (package
  4802. (name "ocaml-compiler-libs")
  4803. (version "0.11.0")
  4804. (home-page "https://github.com/janestreet/ocaml-compiler-libs")
  4805. (source
  4806. (origin
  4807. (method git-fetch)
  4808. (uri (git-reference
  4809. (url (string-append home-page ".git"))
  4810. (commit (string-append "v" version))))
  4811. (file-name (git-file-name name version))
  4812. (sha256
  4813. (base32
  4814. "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
  4815. (build-system dune-build-system)
  4816. (arguments
  4817. '(#:tests? #f)) ;no tests
  4818. (synopsis "Compiler libraries repackaged")
  4819. (description "This packaeg simply repackages the OCaml compiler libraries
  4820. so they don't expose everything at toplevel. For instance, @code{Ast_helper}
  4821. is now @code{Ocaml_common.Ast_helper}.")
  4822. (license license:expat)))
  4823. (define-public ocaml-stdio
  4824. (package
  4825. (name "ocaml-stdio")
  4826. (version "0.11.0")
  4827. (home-page "https://github.com/janestreet/stdio")
  4828. (source
  4829. (origin
  4830. (method git-fetch)
  4831. (uri (git-reference
  4832. (url (string-append home-page ".git"))
  4833. (commit (string-append "v" version))))
  4834. (file-name (git-file-name name version))
  4835. (sha256
  4836. (base32
  4837. "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
  4838. (build-system dune-build-system)
  4839. (propagated-inputs
  4840. `(("ocaml-base" ,ocaml-base)
  4841. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4842. (arguments
  4843. '(#:tests? #f)) ;no tests
  4844. (synopsis "Standard IO library for OCaml")
  4845. (description
  4846. "Stdio implements simple input/output functionalities for OCaml. It
  4847. re-exports the input/output functions of the OCaml standard libraries using
  4848. a more consistent API.")
  4849. (license license:expat)))
  4850. (define-public ocaml-ppx-derivers
  4851. (package
  4852. (name "ocaml-ppx-derivers")
  4853. (version "1.2")
  4854. (home-page
  4855. "https://github.com/ocaml-ppx/ppx_derivers")
  4856. (source
  4857. (origin
  4858. (method git-fetch)
  4859. (uri (git-reference
  4860. (url (string-append home-page ".git"))
  4861. (commit version)))
  4862. (file-name (git-file-name name version))
  4863. (sha256
  4864. (base32
  4865. "0bnhihl1w31as5w2czly1v3d6pbir9inmgsjg2cj6aaj9v1dzd85"))))
  4866. (build-system dune-build-system)
  4867. (arguments
  4868. '(#:tests? #f)) ;no tests
  4869. (properties `((upstream-name . "ppx_derivers")))
  4870. (synopsis "Shared @code{@@deriving} plugin registry")
  4871. (description
  4872. "Ppx_derivers is a tiny package whose sole purpose is to allow
  4873. ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
  4874. as part of the same ocaml-migrate-parsetree driver.")
  4875. (license license:bsd-3)))
  4876. (define-public ocaml-ppxlib
  4877. (package
  4878. (name "ocaml-ppxlib")
  4879. (version "0.4.0")
  4880. (home-page "https://github.com/ocaml-ppx/ppxlib")
  4881. (source
  4882. (origin
  4883. (method git-fetch)
  4884. (uri (git-reference
  4885. (url (string-append home-page ".git"))
  4886. (commit version)))
  4887. (file-name (git-file-name name version))
  4888. (sha256
  4889. (base32
  4890. "1nr4igf5m4prvigvv470dnhfdhdw0p6hz6zw8gnm5bzcv7s2lg5l"))))
  4891. (build-system dune-build-system)
  4892. (propagated-inputs
  4893. `(("ocaml-base" ,ocaml-base)
  4894. ("ocaml-compiler-libs" ,ocaml-compiler-libs)
  4895. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4896. ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
  4897. ("ocaml-stdio" ,ocaml-stdio)
  4898. ("ocaml-result" ,ocaml-result)
  4899. ("ocaml-sexplib0" ,ocaml-sexplib0)))
  4900. (arguments
  4901. '(#:phases
  4902. (modify-phases %standard-phases
  4903. (add-before 'check 'set-topfind
  4904. (lambda* (#:key inputs #:allow-other-keys)
  4905. ;; add the line #directory ".." at the top of each file
  4906. ;; using #use "topfind";; to be able to find topfind
  4907. (let* ((findlib-path (assoc-ref inputs "findlib"))
  4908. (findlib-libdir
  4909. (string-append findlib-path "/lib/ocaml/site-lib")))
  4910. (substitute* '("test/base/test.ml"
  4911. "test/deriving/test.ml"
  4912. "test/driver/attributes/test.ml"
  4913. "test/driver/non-compressible-suffix/test.ml"
  4914. "test/driver/transformations/test.ml")
  4915. (("#use \"topfind\";;" all)
  4916. (string-append "#directory \"" findlib-libdir "\"\n"
  4917. all))))
  4918. #t)))))
  4919. (synopsis
  4920. "Base library and tools for ppx rewriters")
  4921. (description
  4922. "A comprehensive toolbox for ppx development. It features:
  4923. @itemize
  4924. @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
  4925. independent of the version of OCaml;
  4926. @item a library for library for ppx rewriters in general, and type-driven code
  4927. generators in particular;
  4928. @item
  4929. a feature-full driver for OCaml AST transformers;
  4930. @item a quotation mechanism allowing to write values representing the
  4931. OCaml AST in the OCaml syntax;
  4932. @item a generator of open recursion classes from type definitions.
  4933. @end itemize")
  4934. (license license:expat)))
  4935. (define-public ocaml-ppx-compare
  4936. (package
  4937. (name "ocaml-ppx-compare")
  4938. (version "0.11.1")
  4939. (source (origin
  4940. (method git-fetch)
  4941. (uri (git-reference
  4942. (url "https://github.com/janestreet/ppx_compare.git")
  4943. (commit (string-append "v" version))))
  4944. (file-name (git-file-name name version))
  4945. (sha256
  4946. (base32
  4947. "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
  4948. (build-system dune-build-system)
  4949. (propagated-inputs
  4950. `(("ocaml-base" ,ocaml-base)
  4951. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4952. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  4953. (properties `((upstream-name . "ppx_compare")))
  4954. (home-page "https://github.com/janestreet/ppx_compare")
  4955. (synopsis "Generation of comparison functions from types")
  4956. (description "Generation of fast comparison functions from type expressions
  4957. and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
  4958. from type representations. The scaffolded functions are usually much faster
  4959. than ocaml's Pervasives.compare. Scaffolding functions also gives you more
  4960. flexibility by allowing you to override them for a specific type and more safety
  4961. by making sure that you only compare comparable values.")
  4962. (license license:asl2.0)))
  4963. (define-public ocaml-fieldslib
  4964. (package
  4965. (name "ocaml-fieldslib")
  4966. (version "0.11.0")
  4967. (source (origin
  4968. (method url-fetch)
  4969. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  4970. (version-major+minor version) "/files/"
  4971. "fieldslib-v" version ".tar.gz"))
  4972. (sha256
  4973. (base32
  4974. "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
  4975. (build-system dune-build-system)
  4976. (arguments
  4977. ;; No tests
  4978. `(#:tests? #f))
  4979. (propagated-inputs
  4980. `(("ocaml-base" ,ocaml-base)
  4981. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  4982. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  4983. (properties `((upstream-name . "fieldslib")))
  4984. (home-page "https://github.com/janestreet/fieldslib")
  4985. (synopsis "Syntax extension to record fields")
  4986. (description "Syntax extension to define first class values representing
  4987. record fields, to get and set record fields, iterate and fold over all fields
  4988. of a record and create new record values.")
  4989. (license license:asl2.0)))
  4990. (define-public ocaml-variantslib
  4991. (package
  4992. (name "ocaml-variantslib")
  4993. (version "0.11.0")
  4994. (source (origin
  4995. (method url-fetch)
  4996. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  4997. (version-major+minor version)
  4998. "/files/variantslib-v" version ".tar.gz"))
  4999. (sha256
  5000. (base32
  5001. "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
  5002. (build-system dune-build-system)
  5003. (arguments
  5004. ;; No tests
  5005. `(#:tests? #f))
  5006. (propagated-inputs
  5007. `(("ocaml-base" ,ocaml-base)
  5008. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5009. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5010. (properties `((upstream-name . "variantslib")))
  5011. (home-page "https://github.com/janestreet/variantslib")
  5012. (synopsis "OCaml variants as first class values")
  5013. (description "The Core suite of libraries is an alternative to OCaml's
  5014. standard library.")
  5015. (license license:asl2.0)))
  5016. (define-public ocaml-ppx-fields-conv
  5017. (package
  5018. (name "ocaml-ppx-fields-conv")
  5019. (version "0.11.0")
  5020. (source (origin
  5021. (method url-fetch)
  5022. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5023. (version-major+minor version)
  5024. "/files/ppx_fields_conv-v" version ".tar.gz"))
  5025. (sha256
  5026. (base32
  5027. "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
  5028. (build-system dune-build-system)
  5029. (propagated-inputs
  5030. `(("ocaml-base" ,ocaml-base)
  5031. ("ocaml-fieldslib" ,ocaml-fieldslib)
  5032. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5033. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5034. (properties `((upstream-name . "ppx_fields_conv")))
  5035. (home-page "https://github.com/janestreet/ppx_fields_conv")
  5036. (synopsis "Generation of accessor and iteration functions for ocaml records")
  5037. (description "Ppx_fields_conv is a ppx rewriter that can be used to define
  5038. first class values representing record fields, and additional routines, to get
  5039. and set record fields, iterate and fold over all fields of a record and create
  5040. new record values.")
  5041. (license license:asl2.0)))
  5042. (define-public ocaml-ppx-sexp-conv
  5043. (package
  5044. (name "ocaml-ppx-sexp-conv")
  5045. (version "0.11.2")
  5046. (source (origin
  5047. (method git-fetch)
  5048. (uri (git-reference
  5049. (url "https://github.com/janestreet/ppx_sexp_conv.git")
  5050. (commit (string-append "v" version))))
  5051. (file-name (git-file-name name version))
  5052. (sha256
  5053. (base32
  5054. "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
  5055. (build-system dune-build-system)
  5056. (propagated-inputs
  5057. `(("ocaml-base" ,ocaml-base)
  5058. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5059. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5060. (properties `((upstream-name . "ppx_sexp_conv")))
  5061. (home-page "https://github.com/janestreet/ppx_sexp_conv")
  5062. (synopsis "Generation of S-expression conversion functions from type definitions")
  5063. (description "This package generates S-expression conversion functions from type
  5064. definitions.")
  5065. (license license:asl2.0)))
  5066. (define-public ocaml-ppx-variants-conv
  5067. (package
  5068. (name "ocaml-ppx-variants-conv")
  5069. (version "0.11.1")
  5070. (source (origin
  5071. (method git-fetch)
  5072. (uri (git-reference
  5073. (url "https://github.com/janestreet/ppx_variants_conv.git")
  5074. (commit (string-append "v" version))))
  5075. (file-name (git-file-name name version))
  5076. (sha256
  5077. (base32
  5078. "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
  5079. (build-system dune-build-system)
  5080. (propagated-inputs
  5081. `(("ocaml-base" ,ocaml-base)
  5082. ("ocaml-variantslib" ,ocaml-variantslib)
  5083. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5084. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5085. (properties
  5086. `((upstream-name . "ppx_variants_conv")))
  5087. (home-page
  5088. "https://github.com/janestreet/ppx_variants_conv")
  5089. (synopsis "Generation of accessor and iteration functions for OCaml variant types")
  5090. (description
  5091. "This package generates accessors and interation functions for OCaml
  5092. variant types.")
  5093. (license license:asl2.0)))
  5094. (define-public ocaml-ppx-custom-printf
  5095. (package
  5096. (name "ocaml-ppx-custom-printf")
  5097. (version "0.11.0")
  5098. (source (origin
  5099. (method url-fetch)
  5100. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5101. (version-major+minor version)
  5102. "/files/ppx_custom_printf-v" version ".tar.gz"))
  5103. (sha256
  5104. (base32
  5105. "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
  5106. (build-system dune-build-system)
  5107. (propagated-inputs
  5108. `(("ocaml-base" ,ocaml-base)
  5109. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5110. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5111. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5112. (properties `((upstream-name . "ppx_custom_printf")))
  5113. (home-page "https://github.com/janestreet/ppx_custom_printf")
  5114. (synopsis "Printf-style format-strings for user-defined string conversion")
  5115. (description "Extensions to printf-style format-strings for user-defined
  5116. string conversion.")
  5117. (license license:asl2.0)))
  5118. (define-public ocaml-bin-prot
  5119. (package
  5120. (name "ocaml-bin-prot")
  5121. (version "0.11.0")
  5122. (source (origin
  5123. (method url-fetch)
  5124. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5125. (version-major+minor version)
  5126. "/files/bin_prot-v" version ".tar.gz"))
  5127. (sha256
  5128. (base32
  5129. "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
  5130. (build-system dune-build-system)
  5131. (inputs
  5132. `(("ocaml-base" ,ocaml-base)
  5133. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5134. ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
  5135. ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
  5136. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5137. ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
  5138. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
  5139. (properties `((upstream-name . "bin_prot")))
  5140. (home-page "https://github.com/janestreet/bin_prot")
  5141. (synopsis "Binary protocol generator")
  5142. (description "This library contains functionality for reading and writing
  5143. OCaml-values in a type-safe binary protocol. It is extremely efficient,
  5144. typically supporting type-safe marshalling and unmarshalling of even highly
  5145. structured values at speeds sufficient to saturate a gigabit connection. The
  5146. protocol is also heavily optimized for size, making it ideal for long-term
  5147. storage of large amounts of data.")
  5148. (license (list
  5149. license:asl2.0
  5150. license:bsd-3))))
  5151. (define-public ocaml-octavius
  5152. (package
  5153. (name "ocaml-octavius")
  5154. (version "1.2.0")
  5155. (source (origin
  5156. (method git-fetch)
  5157. (uri (git-reference
  5158. (url "https://github.com/ocaml-doc/octavius")
  5159. (commit (string-append "v" version))))
  5160. (file-name (git-file-name name version))
  5161. (sha256
  5162. (base32
  5163. "0gqfbwsh0zq4b9mvvlmg3zhpbfbvq8swqr31320aibbqydwf77hr"))))
  5164. (build-system dune-build-system)
  5165. (properties `((upstream-name . "octavius")))
  5166. (home-page "https://github.com/ocaml-doc/octavius")
  5167. (synopsis "Ocamldoc comment syntax parser")
  5168. (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
  5169. (license license:isc)))
  5170. (define-public ocaml-ppx-hash
  5171. (package
  5172. (name "ocaml-ppx-hash")
  5173. (version "0.11.1")
  5174. (source (origin
  5175. (method git-fetch)
  5176. (uri (git-reference
  5177. (url "https://github.com/janestreet/ppx_hash.git")
  5178. (commit (string-append "v" version))))
  5179. (sha256
  5180. (base32
  5181. "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
  5182. (build-system dune-build-system)
  5183. (propagated-inputs
  5184. `(("ocaml-base" ,ocaml-base)
  5185. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5186. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5187. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5188. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5189. (properties `((upstream-name . "ppx_hash")))
  5190. (home-page "https://github.com/janestreet/ppx_hash")
  5191. (synopsis "Generation of hash functions from type expressions and definitions")
  5192. (description "This package is a collecton of ppx rewriters that generate
  5193. hash functions from type exrpessions and definitions.")
  5194. (license license:asl2.0)))
  5195. (define-public ocaml-ppx-enumerate
  5196. (package
  5197. (name "ocaml-ppx-enumerate")
  5198. (version "0.11.1")
  5199. (source (origin
  5200. (method git-fetch)
  5201. (uri (git-reference
  5202. (url "https://github.com/janestreet/ppx_enumerate.git")
  5203. (commit (string-append "v" version))))
  5204. (sha256
  5205. (base32
  5206. "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
  5207. (build-system dune-build-system)
  5208. (arguments
  5209. ;; No tests
  5210. `(#:tests? #f))
  5211. (propagated-inputs
  5212. `(("ocaml-base" ,ocaml-base)
  5213. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5214. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5215. (properties `((upstream-name . "ppx_enumerate")))
  5216. (home-page "https://github.com/janestreet/ppx_enumerate")
  5217. (synopsis "Generate a list containing all values of a finite type")
  5218. (description "Ppx_enumerate is a ppx rewriter which generates a definition
  5219. for the list of all values of a type (for a type which only has finitely
  5220. many values).")
  5221. (license license:asl2.0)))
  5222. (define-public ocaml-ppx-bench
  5223. (package
  5224. (name "ocaml-ppx-bench")
  5225. (version "0.11.0")
  5226. (source (origin
  5227. (method url-fetch)
  5228. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5229. (version-major+minor version)
  5230. "/files/ppx_bench-v" version ".tar.gz"))
  5231. (sha256
  5232. (base32
  5233. "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
  5234. (build-system dune-build-system)
  5235. (arguments
  5236. ;; No tests
  5237. `(#:tests? #f))
  5238. (propagated-inputs
  5239. `(("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5240. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5241. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5242. (properties `((upstream-name . "ppx_bench")))
  5243. (home-page "https://github.com/janestreet/ppx_bench")
  5244. (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
  5245. (description "Syntax extension for writing in-line benchmarks in ocaml code.")
  5246. (license license:asl2.0)))
  5247. (define-public ocaml-ppx-here
  5248. (package
  5249. (name "ocaml-ppx-here")
  5250. (version "0.11.0")
  5251. (source (origin
  5252. (method url-fetch)
  5253. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5254. (version-major+minor version)
  5255. "/files/ppx_here-v" version ".tar.gz"))
  5256. (sha256
  5257. (base32
  5258. "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
  5259. (build-system dune-build-system)
  5260. (arguments
  5261. ;; broken tests
  5262. `(#:tests? #f))
  5263. (propagated-inputs
  5264. `(("ocaml-base" ,ocaml-base)
  5265. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5266. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5267. (properties `((upstream-name . "ppx_here")))
  5268. (home-page "https://github.com/janestreet/ppx_here")
  5269. (synopsis "Expands [%here] into its location")
  5270. (description
  5271. "Part of the Jane Street's PPX rewriters collection.")
  5272. (license license:asl2.0)))
  5273. (define-public ocaml-typerep
  5274. (package
  5275. (name "ocaml-typerep")
  5276. (version "0.11.0")
  5277. (source (origin
  5278. (method url-fetch)
  5279. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5280. (version-major+minor version)
  5281. "/files/typerep-v" version ".tar.gz"))
  5282. (sha256
  5283. (base32
  5284. "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
  5285. (build-system dune-build-system)
  5286. (arguments
  5287. `(#:tests? #f))
  5288. (propagated-inputs `(("ocaml-base" ,ocaml-base)))
  5289. (home-page "https://github.com/janestreet/typerep")
  5290. (synopsis "Typerep is a library for runtime types")
  5291. (description "Typerep is a library for runtime types.")
  5292. (license license:asl2.0)))
  5293. (define-public ocaml-ppx-sexp-value
  5294. (package
  5295. (name "ocaml-ppx-sexp-value")
  5296. (version "0.11.0")
  5297. (source (origin
  5298. (method url-fetch)
  5299. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5300. (version-major+minor version)
  5301. "/files/ppx_sexp_value-v" version ".tar.gz"))
  5302. (sha256
  5303. (base32
  5304. "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
  5305. (build-system dune-build-system)
  5306. (propagated-inputs
  5307. `(("ocaml-base" ,ocaml-base)
  5308. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5309. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5310. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5311. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5312. (properties `((upstream-name . "ppx_sexp_value")))
  5313. (home-page "https://github.com/janestreet/ppx_sexp_value")
  5314. (synopsis "Simplify building s-expressions from ocaml values")
  5315. (description "A ppx rewriter that simplifies building s-expressions from
  5316. ocaml values.")
  5317. (license license:asl2.0)))
  5318. (define-public ocaml-ppx-sexp-message
  5319. (package
  5320. (name "ocaml-ppx-sexp-message")
  5321. (version "0.11.0")
  5322. (source (origin
  5323. (method url-fetch)
  5324. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5325. (version-major+minor version)
  5326. "/files/ppx_sexp_message-v" version ".tar.gz"))
  5327. (sha256
  5328. (base32
  5329. "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
  5330. (build-system dune-build-system)
  5331. (propagated-inputs
  5332. `(("ocaml-base" ,ocaml-base)
  5333. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5334. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5335. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5336. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5337. (properties `((upstream-name . "ppx_sexp_message")))
  5338. (home-page "https://github.com/janestreet/ppx_sexp_message")
  5339. (synopsis "A ppx rewriter for easy construction of s-expressions")
  5340. (description "Ppx_sexp_message aims to ease the creation of s-expressions
  5341. in OCaml. This is mainly motivated by writing error and debugging messages,
  5342. where one needs to construct a s-expression based on various element of the
  5343. context such as function arguments.")
  5344. (license license:asl2.0)))
  5345. (define-public ocaml-ppx-pipebang
  5346. (package
  5347. (name "ocaml-ppx-pipebang")
  5348. (version "0.11.0")
  5349. (source (origin
  5350. (method url-fetch)
  5351. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5352. (version-major+minor version)
  5353. "/files/ppx_pipebang-v" version ".tar.gz"))
  5354. (sha256
  5355. (base32
  5356. "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
  5357. (build-system dune-build-system)
  5358. (arguments
  5359. ;; No tests
  5360. `(#:tests? #f))
  5361. (propagated-inputs
  5362. `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5363. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5364. (properties `((upstream-name . "ppx_pipebang")))
  5365. (home-page "https://github.com/janestreet/ppx_pipebang")
  5366. (synopsis "Inline reverse application operators `|>` and `|!`")
  5367. (description "A ppx rewriter that inlines reverse application operators
  5368. @code{|>} and @code{|!}.")
  5369. (license license:asl2.0)))
  5370. (define-public ocaml-ppx-optional
  5371. (package
  5372. (name "ocaml-ppx-optional")
  5373. (version "0.11.0")
  5374. (source (origin
  5375. (method url-fetch)
  5376. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5377. (version-major+minor version)
  5378. "/files/ppx_optional-v" version ".tar.gz"))
  5379. (sha256
  5380. (base32
  5381. "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
  5382. (build-system dune-build-system)
  5383. (arguments
  5384. ;; No tests
  5385. `(#:tests? #f))
  5386. (propagated-inputs
  5387. `(("ocaml-base" ,ocaml-base)
  5388. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5389. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5390. (properties `((upstream-name . "ppx_optional")))
  5391. (home-page "https://github.com/janestreet/ppx_optional")
  5392. (synopsis "Pattern matching on flat options")
  5393. (description
  5394. "A ppx rewriter that rewrites simple match statements with an if then
  5395. else expression.")
  5396. (license license:asl2.0)))
  5397. (define-public ocaml-ppx-optcomp
  5398. (package
  5399. (name "ocaml-ppx-optcomp")
  5400. (version "0.11.0")
  5401. (source (origin
  5402. (method url-fetch)
  5403. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5404. (version-major+minor version)
  5405. "/files/ppx_optcomp-v" version ".tar.gz"))
  5406. (sha256
  5407. (base32
  5408. "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
  5409. (build-system dune-build-system)
  5410. (propagated-inputs
  5411. `(("ocaml-base" ,ocaml-base)
  5412. ("ocaml-stdio" ,ocaml-stdio)
  5413. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5414. (properties `((upstream-name . "ppx_optcomp")))
  5415. (home-page "https://github.com/janestreet/ppx_optcomp")
  5416. (synopsis "Optional compilation for OCaml")
  5417. (description "Ppx_optcomp stands for Optional Compilation. It is a tool
  5418. used to handle optional compilations of pieces of code depending of the word
  5419. size, the version of the compiler, ...")
  5420. (license license:asl2.0)))
  5421. (define-public ocaml-ppx-let
  5422. (package
  5423. (name "ocaml-ppx-let")
  5424. (version "0.11.0")
  5425. (source (origin
  5426. (method url-fetch)
  5427. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5428. (version-major+minor version)
  5429. "/files/ppx_let-v" version ".tar.gz"))
  5430. (sha256
  5431. (base32
  5432. "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
  5433. (build-system dune-build-system)
  5434. (propagated-inputs
  5435. `(("ocaml-base" ,ocaml-base)
  5436. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5437. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5438. (properties `((upstream-name . "ppx_let")))
  5439. (home-page "https://github.com/janestreet/ppx_let")
  5440. (synopsis "Monadic let-bindings")
  5441. (description "A ppx rewriter for monadic and applicative let bindings,
  5442. match expressions, and if expressions.")
  5443. (license license:asl2.0)))
  5444. (define-public ocaml-ppx-fail
  5445. (package
  5446. (name "ocaml-ppx-fail")
  5447. (version "0.11.0")
  5448. (source (origin
  5449. (method url-fetch)
  5450. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5451. (version-major+minor version)
  5452. "/files/ppx_fail-v" version ".tar.gz"))
  5453. (sha256
  5454. (base32
  5455. "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
  5456. (build-system dune-build-system)
  5457. (propagated-inputs
  5458. `(("ocaml-base" ,ocaml-base)
  5459. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5460. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5461. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5462. (properties `((upstream-name . "ppx_fail")))
  5463. (home-page "https://github.com/janestreet/ppx_fail")
  5464. (synopsis "Add location to calls to failwiths")
  5465. (description "Syntax extension that makes [failwiths] always include a
  5466. position.")
  5467. (license license:asl2.0)))
  5468. (define-public ocaml-ppx-assert
  5469. (package
  5470. (name "ocaml-ppx-assert")
  5471. (version "0.11.0")
  5472. (source (origin
  5473. (method url-fetch)
  5474. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5475. (version-major+minor version)
  5476. "/files/ppx_assert-v" version ".tar.gz"))
  5477. (sha256
  5478. (base32
  5479. "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
  5480. (build-system dune-build-system)
  5481. (propagated-inputs
  5482. `(("ocaml-base" ,ocaml-base)
  5483. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5484. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5485. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5486. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5487. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5488. (properties `((upstream-name . "ppx_assert")))
  5489. (home-page "https://github.com/janestreet/ppx_assert")
  5490. (synopsis "Assert-like extension nodes that raise useful errors on failure")
  5491. (description "This package contains assert-like extension nodes that raise
  5492. useful errors on failure.")
  5493. (license license:asl2.0)))
  5494. (define-public ocaml-ppx-expect
  5495. (package
  5496. (name "ocaml-ppx-expect")
  5497. (version "0.11.1")
  5498. (source (origin
  5499. (method git-fetch)
  5500. (uri (git-reference
  5501. (url "https://github.com/janestreet/ppx_expect.git")
  5502. (commit (string-append "v" version))))
  5503. (file-name (git-file-name name version))
  5504. (sha256
  5505. (base32
  5506. "0bnz3cpj3vwdw409r6f8raakl8n364q5l7wy4i6gckr34a4vla69"))))
  5507. (build-system dune-build-system)
  5508. (arguments
  5509. `(#:jbuild? #t))
  5510. (propagated-inputs
  5511. `(("ocaml-base" ,ocaml-base)
  5512. ("ocaml-ppx-assert" ,ocaml-ppx-assert)
  5513. ("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5514. ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
  5515. ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
  5516. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5517. ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5518. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5519. ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
  5520. ("ocaml-stdio" ,ocaml-stdio)
  5521. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5522. ("ocaml-ppxlib" ,ocaml-ppxlib)
  5523. ("ocaml-re" ,ocaml-re)))
  5524. (properties `((upstream-name . "ppx_expect")))
  5525. (home-page "https://github.com/janestreet/ppx_expect")
  5526. (synopsis "Cram like framework for OCaml")
  5527. (description "Expect-test is a framework for writing tests in OCaml, similar
  5528. to Cram. Expect-tests mimics the existing inline tests framework with the
  5529. @code{let%expect_test} construct. The body of an expect-test can contain
  5530. output-generating code, interleaved with @code{%expect} extension expressions
  5531. to denote the expected output.")
  5532. (license license:asl2.0)))
  5533. (define-public ocaml-ppx-js-style
  5534. (package
  5535. (name "ocaml-ppx-js-style")
  5536. (version "0.11.0")
  5537. (source (origin
  5538. (method url-fetch)
  5539. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5540. (version-major+minor version)
  5541. "/files/ppx_js_style-v" version ".tar.gz"))
  5542. (sha256
  5543. (base32
  5544. "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
  5545. (build-system dune-build-system)
  5546. (arguments
  5547. ;; No tests
  5548. `(#:tests? #f))
  5549. (propagated-inputs
  5550. `(("ocaml-base" ,ocaml-base)
  5551. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5552. ("ocaml-octavius" ,ocaml-octavius)
  5553. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5554. (properties `((upstream-name . "ppx_js_style")))
  5555. (home-page "https://github.com/janestreet/ppx_js_style")
  5556. (synopsis "Code style checker for Jane Street Packages")
  5557. (description "This packages is a no-op ppx rewriter. It is used as a
  5558. @code{lint} tool to enforce some coding conventions across all Jane Street
  5559. packages.")
  5560. (license license:asl2.0)))
  5561. (define-public ocaml-ppx-typerep-conv
  5562. (package
  5563. (name "ocaml-ppx-typerep-conv")
  5564. (version "0.11.1")
  5565. (source (origin
  5566. (method git-fetch)
  5567. (uri (git-reference
  5568. (url "https://github.com/janestreet/ppx_typerep_conv.git")
  5569. (commit (string-append "v" version))))
  5570. (sha256
  5571. (base32
  5572. "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
  5573. (build-system dune-build-system)
  5574. (arguments
  5575. `(#:test-target "."))
  5576. (propagated-inputs
  5577. `(("ocaml-base" ,ocaml-base)
  5578. ("ocaml-typerep" ,ocaml-typerep)
  5579. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5580. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5581. (properties `((upstream-name . "ppx_typerep_conv")))
  5582. (home-page "https://github.com/janestreet/ppx_typerep_conv")
  5583. (synopsis "Generation of runtime types from type declarations")
  5584. (description "This package can automatically generate runtime types
  5585. from type definitions.")
  5586. (license license:asl2.0)))
  5587. (define-public ocaml-ppx-base
  5588. (package
  5589. (name "ocaml-ppx-base")
  5590. (version "0.11.0")
  5591. (source (origin
  5592. (method url-fetch)
  5593. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5594. (version-major+minor version)
  5595. "/files/ppx_base-v" version ".tar.gz"))
  5596. (sha256
  5597. (base32
  5598. "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
  5599. (build-system dune-build-system)
  5600. (arguments
  5601. `(#:test-target "."))
  5602. (propagated-inputs
  5603. `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
  5604. ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
  5605. ("ocaml-ppx-hash" ,ocaml-ppx-hash)
  5606. ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
  5607. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5608. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5609. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5610. (properties `((upstream-name . "ppx_base")))
  5611. (home-page "https://github.com/janestreet/ppx_base")
  5612. (synopsis "Base set of ppx rewriters")
  5613. (description "Ppx_base is the set of ppx rewriters used for Base.
  5614. Note that Base doesn't need ppx to build, it is only used as a
  5615. verification tool.")
  5616. (license license:asl2.0)))
  5617. (define-public ocaml-ppx-bin-prot
  5618. (package
  5619. (name "ocaml-ppx-bin-prot")
  5620. (version "0.11.1")
  5621. (source (origin
  5622. (method git-fetch)
  5623. (uri (git-reference
  5624. (url "https://github.com/janestreet/ppx_bin_prot.git")
  5625. (commit (string-append "v" version))))
  5626. (file-name (git-file-name name version))
  5627. (sha256
  5628. (base32
  5629. "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
  5630. (build-system dune-build-system)
  5631. (arguments
  5632. ;; Cyclic dependency with ocaml-ppx-jane
  5633. `(#:tests? #f))
  5634. (propagated-inputs
  5635. `(("ocaml-base" ,ocaml-base)
  5636. ("ocaml-bin-prot" ,ocaml-bin-prot)
  5637. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5638. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5639. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5640. (properties `((upstream-name . "ppx_bin_prot")))
  5641. (home-page "https://github.com/janestreet/ppx_bin_prot")
  5642. (synopsis "Generation of bin_prot readers and writers from types")
  5643. (description "Generation of binary serialization and deserialization
  5644. functions from type definitions.")
  5645. (license license:asl2.0)))
  5646. (define-public ocaml-ppx-jane
  5647. (package
  5648. (name "ocaml-ppx-jane")
  5649. (version "0.11.0")
  5650. (source (origin
  5651. (method url-fetch)
  5652. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5653. (version-major+minor version)
  5654. "/files/ppx_jane-v" version ".tar.gz"))
  5655. (sha256
  5656. (base32
  5657. "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
  5658. (build-system dune-build-system)
  5659. (arguments
  5660. `(#:test-target "."))
  5661. (propagated-inputs
  5662. `(("ocaml-ppx-assert" ,ocaml-ppx-assert)
  5663. ("ocaml-ppx-base" ,ocaml-ppx-base)
  5664. ("ocaml-ppx-bench" ,ocaml-ppx-bench)
  5665. ("ocaml-ppx-bin-prot" ,ocaml-ppx-bin-prot)
  5666. ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
  5667. ("ocaml-ppx-expect" ,ocaml-ppx-expect)
  5668. ("ocaml-ppx-fail" ,ocaml-ppx-fail)
  5669. ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
  5670. ("ocaml-ppx-here" ,ocaml-ppx-here)
  5671. ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5672. ("ocaml-ppx-let" ,ocaml-ppx-let)
  5673. ("ocaml-ppx-optcomp" ,ocaml-ppx-optcomp)
  5674. ("ocaml-ppx-optional" ,ocaml-ppx-optional)
  5675. ("ocaml-ppx-pipebang" ,ocaml-ppx-pipebang)
  5676. ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
  5677. ("ocaml-ppx-sexp-value" ,ocaml-ppx-sexp-value)
  5678. ("ocaml-ppx-typerep-conv" ,ocaml-ppx-typerep-conv)
  5679. ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
  5680. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5681. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5682. (properties `((upstream-name . "ppx_jane")))
  5683. (home-page "https://github.com/janestreet/ppx_jane")
  5684. (synopsis "Standard Jane Street ppx rewriters")
  5685. (description "This package installs a ppx-jane executable, which is a ppx
  5686. driver including all standard Jane Street ppx rewriters.")
  5687. (license license:asl2.0)))
  5688. (define-public ocaml-splittable-random
  5689. (package
  5690. (name "ocaml-splittable-random")
  5691. (version "0.11.0")
  5692. (source (origin
  5693. (method url-fetch)
  5694. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5695. (version-major+minor version)
  5696. "/files/splittable_random-v" version ".tar.gz"))
  5697. (sha256
  5698. (base32
  5699. "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
  5700. (build-system dune-build-system)
  5701. (propagated-inputs
  5702. `(("ocaml-base" ,ocaml-base)
  5703. ("ocaml-ppx-jane" ,ocaml-ppx-jane)
  5704. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
  5705. (properties `((upstream-name . "splittable_random")))
  5706. (home-page "https://github.com/janestreet/splittable_random")
  5707. (synopsis "PRNG that can be split into independent streams")
  5708. (description "This package provides a splittable
  5709. @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
  5710. be used as a stream of random values; it can also be split to produce a
  5711. second, independent stream of random values.
  5712. This library implements a splittable pseudo-random number generator that sacrifices
  5713. cryptographic-quality randomness in favor of performance.")
  5714. (license license:asl2.0)))
  5715. (define-public ocaml-jane-street-headers
  5716. (package
  5717. (name "ocaml-jane-street-headers")
  5718. (version "0.11.0")
  5719. (source (origin
  5720. (method url-fetch)
  5721. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5722. (version-major+minor version)
  5723. "/files/jane-street-headers-v" version ".tar.gz"))
  5724. (sha256
  5725. (base32
  5726. "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
  5727. (build-system dune-build-system)
  5728. (arguments
  5729. `(#:test-target "."))
  5730. (home-page "https://github.com/janestreet/jane-street-headers")
  5731. (synopsis "Jane Street C header files")
  5732. (description "This package provides C header files shared between the
  5733. various Jane Street packages.")
  5734. (license license:asl2.0)))
  5735. (define-public ocaml-configurator
  5736. (package
  5737. (name "ocaml-configurator")
  5738. (version "0.11.0")
  5739. (source (origin
  5740. (method url-fetch)
  5741. (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
  5742. (version-major+minor version)
  5743. "/files/configurator-v" version ".tar.gz"))
  5744. (sha256
  5745. (base32
  5746. "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
  5747. (build-system dune-build-system)
  5748. (arguments
  5749. ;; No tests
  5750. `(#:tests? #f))
  5751. (propagated-inputs
  5752. `(("ocaml-base" ,ocaml-base)
  5753. ("ocaml-stdio" ,ocaml-stdio)))
  5754. (home-page "https://github.com/janestreet/configurator")
  5755. (synopsis "Helper library for gathering system configuration")
  5756. (description "Configurator is a small library that helps writing OCaml
  5757. scripts that test features available on the system, in order to generate config.h
  5758. files for instance.
  5759. Configurator allows one to:
  5760. @itemize
  5761. @item test if a C program compiles
  5762. @item query pkg-config
  5763. @item import #define from OCaml header files
  5764. @item generate config.h file
  5765. @end itemize")
  5766. (license license:asl2.0)))
  5767. (define-public ocaml-spawn
  5768. (package
  5769. (name "ocaml-spawn")
  5770. (version "0.12.0")
  5771. (source (origin
  5772. (method git-fetch)
  5773. (uri (git-reference
  5774. (url "https://github.com/janestreet/spawn.git")
  5775. (commit (string-append "v" version))))
  5776. (sha256
  5777. (base32
  5778. "0amgj7g9sjlbjivn1mg7yjdmxd21hgp4a0ak2zrm95dmm4gi846i"))))
  5779. (build-system dune-build-system)
  5780. (arguments
  5781. `(#:phases
  5782. (modify-phases %standard-phases
  5783. (add-before 'check 'fix-tests
  5784. (lambda _
  5785. (substitute* "test/tests.ml"
  5786. (("/bin/pwd") (which "pwd"))
  5787. (("/bin/echo") (which "echo")))
  5788. #t)))))
  5789. (native-inputs
  5790. `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
  5791. (home-page "https://github.com/janestreet/spawn")
  5792. (synopsis "Spawning sub-processes")
  5793. (description
  5794. "Spawn is a small library exposing only one functionality: spawning sub-process.
  5795. It has three main goals:
  5796. @itemize
  5797. @item provide missing features of Unix.create_process such as providing a
  5798. working directory,
  5799. @item provide better errors when a system call fails in the
  5800. sub-process. For instance if a command is not found, you get a proper
  5801. @code{Unix.Unix_error} exception,
  5802. @item improve performances by using vfork when available. It is often
  5803. claimed that nowadays fork is as fast as vfork, however in practice
  5804. fork takes time proportional to the process memory while vfork is
  5805. constant time. In application using a lot of memory, vfork can be
  5806. thousands of times faster than fork.
  5807. @end itemize")
  5808. (license license:asl2.0)))
  5809. (define-public ocaml-core
  5810. (package
  5811. (name "ocaml-core")
  5812. (version "0.11.3")
  5813. (source (origin
  5814. (method git-fetch)
  5815. (uri (git-reference
  5816. (url "https://github.com/janestreet/core.git")
  5817. (commit (string-append "v" version))))
  5818. (sha256
  5819. (base32
  5820. "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
  5821. (build-system dune-build-system)
  5822. (arguments
  5823. `(#:jbuild? #t
  5824. ;; Require a cyclic dependency: core_extended
  5825. #:tests? #f))
  5826. (propagated-inputs
  5827. `(("ocaml-base" ,ocaml-base)
  5828. ("ocaml-configurator" ,ocaml-configurator)
  5829. ("ocaml-core-kernel" ,ocaml-core-kernel)
  5830. ("ocaml-ppx-assert" ,ocaml-ppx-assert)
  5831. ("ocaml-ppx-jane" ,ocaml-ppx-jane)
  5832. ("ocaml-sexplib" ,ocaml-sexplib)
  5833. ("ocaml-spawn" ,ocaml-spawn)
  5834. ("ocaml-stdio" ,ocaml-stdio)
  5835. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
  5836. ("ocaml-ppxlib" ,ocaml-ppxlib)))
  5837. (home-page "https://github.com/janestreet/core")
  5838. (synopsis "Alternative to OCaml's standard library")
  5839. (description "The Core suite of libraries is an alternative to OCaml's
  5840. standard library that was developed by Jane Street.")
  5841. ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
  5842. ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
  5843. (license license:asl2.0)))
  5844. (define-public ocaml-core-kernel
  5845. (package
  5846. (name "ocaml-core-kernel")
  5847. (version "0.11.1")
  5848. (source (origin
  5849. (method git-fetch)
  5850. (uri (git-reference
  5851. (url "https://github.com/janestreet/core_kernel.git")
  5852. (commit (string-append "v" version))))
  5853. (file-name (git-file-name name version))
  5854. (sha256
  5855. (base32
  5856. "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
  5857. (build-system dune-build-system)
  5858. (arguments
  5859. ;; Cyclic dependency with ocaml-core
  5860. `(#:tests? #f))
  5861. (propagated-inputs
  5862. `(("ocaml-base" ,ocaml-base)
  5863. ("ocaml-bin-prot" ,ocaml-bin-prot)
  5864. ("ocaml-configurator" ,ocaml-configurator)
  5865. ("ocaml-fieldslib" ,ocaml-fieldslib)
  5866. ("ocaml-jane-street-headers" ,ocaml-jane-street-headers)
  5867. ("ocaml-ppx-assert" ,ocaml-ppx-assert)
  5868. ("ocaml-ppx-base" ,ocaml-ppx-base)
  5869. ("ocaml-ppx-hash" ,ocaml-ppx-hash)
  5870. ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
  5871. ("ocaml-ppx-jane" ,ocaml-ppx-jane)
  5872. ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
  5873. ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
  5874. ("ocaml-sexplib" ,ocaml-sexplib)
  5875. ("ocaml-splittable-random" ,ocaml-splittable-random)
  5876. ("ocaml-stdio" ,ocaml-stdio)
  5877. ("ocaml-typerep" ,ocaml-typerep)
  5878. ("ocaml-variantslib" ,ocaml-variantslib)
  5879. ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
  5880. (properties `((upstream-name . "core_kernel")))
  5881. (home-page "https://github.com/janestreet/core_kernel")
  5882. (synopsis "Portable standard library for OCaml")
  5883. (description "Core is an alternative to the OCaml standard library.
  5884. Core_kernel is the system-independent part of Core. It is aimed for cases when
  5885. the full Core is not available, such as in Javascript.")
  5886. (license (list
  5887. ;; this package and parts of OCaml, relicensed by janestreet
  5888. license:asl2.0
  5889. ;; MLton and sjs
  5890. license:expat))))