ocaml.scm 280 KB

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