{"id":13484467,"url":"https://github.com/ocaml/opam","last_synced_at":"2025-05-14T06:12:39.861Z","repository":{"id":2499251,"uuid":"3473767","full_name":"ocaml/opam","owner":"ocaml","description":"opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.","archived":false,"fork":false,"pushed_at":"2025-04-29T18:25:31.000Z","size":41128,"stargazers_count":1294,"open_issues_count":695,"forks_count":373,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-04-29T19:32:41.502Z","etag":null,"topics":["git","ocaml","opam","package-manager"],"latest_commit_sha":null,"homepage":"https://opam.ocaml.org","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocaml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-02-17T20:55:44.000Z","updated_at":"2025-04-29T18:25:37.000Z","dependencies_parsed_at":"2023-07-11T11:36:05.040Z","dependency_job_id":"76a31c51-12fe-4de5-97fe-d709424118e9","html_url":"https://github.com/ocaml/opam","commit_stats":{"total_commits":8824,"total_committers":214,"mean_commits":41.23364485981308,"dds":0.6986627379873074,"last_synced_commit":"75f9eecc3485667c126a3eb0fc91f6d0e0cde7ba"},"previous_names":[],"tags_count":117,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fopam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fopam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fopam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml%2Fopam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocaml","download_url":"https://codeload.github.com/ocaml/opam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254080563,"owners_count":22011443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","ocaml","opam","package-manager"],"created_at":"2024-07-31T17:01:24.865Z","updated_at":"2025-05-14T06:12:39.851Z","avatar_url":"https://github.com/ocaml.png","language":"OCaml","readme":"# opam - A Package Manager for OCaml\n\n|master|2.0|2.1|\n|--|--|--|\n|[![GH actions](https://github.com/ocaml/opam/workflows/Builds,%20tests%20\u0026%20co/badge.svg)](https://github.com/ocaml/opam/actions?query=workflow%3A%22Builds%2C+tests+%26+co%22+branch%3Amaster) | [![2.0 GH actions](https://github.com/ocaml/opam/workflows/Builds,%20tests%20\u0026%20co/badge.svg?branch=2.0)](https://github.com/ocaml/opam/actions?query=workflow%3A%22Builds%2C+tests+%26+co%22+branch%3A2.0) | [![2.1 GH actions](https://github.com/ocaml/opam/workflows/Builds,%20tests%20\u0026%20co/badge.svg?branch=2.1)](https://github.com/ocaml/opam/actions?query=workflow%3A%22Builds%2C+tests+%26+co%22+branch%3A2.1) |\n\nOpam is a source-based package manager for OCaml. It supports multiple simultaneous\ncompiler installations, flexible package constraints, and a Git-friendly development\nworkflow.\n\nOpam was created and is maintained by [OCamlPro](http://www.ocamlpro.com).\n\nTo get started, checkout the [Install](http://opam.ocaml.org/doc/Install.html)\nand [Usage](http://opam.ocaml.org/doc/Usage.html) guides.\n\n## Compiling This Repo\n\nEither from an existing opam installation, use\n`opam pin add .` if you cloned locally the repository,\n`opam pin add git+https://github.com/ocaml/opam` otherwise, or:\n\n* Make sure you have the required dependencies installed:\n  - GNU make\n  - OCaml \u003e= 4.08 (or see [below](#compiling-without-ocaml))\n  - A C++ compiler (unless building without a solver, see `./configure --without-mccs`)\n* Run `./configure`. If you don't have the dependencies installed, this will\n  locally take care of all OCaml dependencies for you (downloading them, unless\n  you used the inclusive archive we provide for each release).\n* Run `make`\n* Run `make install`\n\nThis is all you need for installing and using opam, but if you want to use the\n`opam-lib` (to work on opam-related tools), you need to link it to installed\nlibraries. It's easier to already have a working opam installation in this case,\nso you can do it as a second step.\n\n* Make sure to have `ocamlfind`, `ocamlgraph`, `cmdliner` \u003e= 1.0.0, `cudf` \u003e= 0.7,\n  `dose3` \u003e= 6.1, `re` \u003e= 1.9.0, `opam-file-format` installed. Or run `opam install\n  . --deps-only` if you already have a working instance. Re-run\n  `./configure` once done\n* Run `make libinstall` at the end\n\n_Note_: If you install on your system (without changing the prefix), you will\nneed to install as root (`sudo`). As `sudo` does not propagate environment\nvariables, there will be some errors. You can use `sudo -E \"PATH=$PATH\"` in order\nto ensure you have a good environment for install.\n\n## Developer Mode\n\nIf you are developing opam, you may enable developer features by including the\n`--enable-developer-mode` parameter with `./configure`.\n\n## Compiling on Native Windows\n\nCygwin (https://www.cygwin.com/setup-x86_64.exe) is always required to build opam on\nWindows.\n\nThe following Cygwin packages are required:\n* From Devel - `make`\n* From Devel - `patch` (not required if OCaml and all required packages are\n                        pre-installed)\n* From Devel - `autoconf`\n* From Devel - `curl`\n* From Devel - `mingw64-i686-gcc-g++` \u0026 `mingw64-x86_64-gcc-g++` (not required if\n                                                                 building with MSVC)\n\nAlternatively, having downloaded Cygwin's setup program, Cygwin can be installed\nusing the following command line:\n\n```\nsetup-x86_64 --root=C:\\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-g++,mingw64-x86_64-gcc-g++,patch,autoconf,curl\n```\n\nThe `--no-desktop` and `--no-startmenu` switches may be omitted in order to create\nshortcuts on the Desktop and Start Menu, respectively. Executed this way, setup will\nstill be interactive, but the packages will have been preselected. To make setup\nfully unattended, choose a mirror URL from https://cygwin.com/mirrors.lst and add\nthe `--site` switch to the command line\n(e.g., `--site=https://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/`).\n\nIt is recommended that you set the [`CYGWIN`](https://cygwin.com/cygwin-ug-net/using-cygwinenv.html)\nenvironment variable to `winsymlinks:native`.\n\nCygwin is started either from a shortcut or by running:\n\n```\nC:\\cygwin64\\bin\\mintty -\n```\n\nWe recommended you build opam outside Cygwin's root\n(so in `/cygdrive/c/...`). From an elevated Cygwin shell, edit `/etc/fstab` and\nensure that the file's content is exactly:\n\n```\nnone /cygdrive cygdrive noacl,binary,posix=0,user 0 0\n```\n\nThe change is the addition of the `noacl` option to the mount instructions for\n`/cygdrive` and this stops from Cygwin from attempting to emulate POSIX permissions\nover NTFS (which can result in strange and unnecessary permissions showing up in\nWindows Explorer). It is necessary to close and restart all Cygwin terminal windows\nafter changing `/etc/fstab`.\n\nOpam is able to be built **without** a preinstalled OCaml compiler. For the MSVC\nports of OCaml, the Microsoft Windows SDK 7 or later or Microsoft Visual Studio is\nrequired (https://www.microsoft.com/en-gb/download/details.aspx?id=8442 - either x86\nor x64 may be installed, as appropriate to your system). It is not necessary to\nmodify PATH, INCLUDE, or LIB. Opam's build system will automatically detect the\nrequired changes.\n\nIf OCaml is not preinstalled, run:\n```\nmake compiler [OCAML_PORT=mingw64|mingw|msvc64|msvc|auto]\n```\nThe `OCAML_PORT` variable determines which flavour of Windows OCaml is compiled;\n`auto` will attempt to guess. As long as GCC is **not** installed in Cygwin\n(i.e., the native C compiler *for Cygwin*), `OCAML_PORT` does not need to be\nspecified and `auto` will be assumed. Once the compiler is built, you may run:\n```\n./configure --with-vendored-deps\n```\nand build opam as above.\n\n## Compiling Without OCaml\n\n`make cold` is provided as a facility to compile OCaml, then bootstrap opam.\nYou don't need to run `./configure` in that case, but\nyou may specify `CONFIGURE_ARGS` if needed. E.g.,:\n\n```\nmake cold CONFIGURE_ARGS=\"--prefix ~/local\"\nmake cold-install\n```\n\nNOTE: You'll still need GNU make.\n\n## Bug Tracker\n\nHave a bug or a feature request? Please open an issue on [our\nbug-tracker](https://github.com/ocaml/opam/issues). Please search for existing\nissues before posting and include the output of `opam config report` and any\ndetails that may help track down the issue.\n\n## Documentation\n\n#### User Manual\n\nThe main documentation entry point to opam is the user manual,\navailable using `opam --help`. To get help for a specific command, use\n`opam \u003ccommand\u003e --help`.\n\n#### Guides and Tutorials\n\nA collection of guides and tutorials is available\n[online](http://opam.ocaml.org/doc/Usage.html). They are generated from the\nfiles in [doc/pages](https://github.com/ocaml/opam/tree/master/doc/pages).\n\n#### API, Code Documentation, and Developer Manual\n\nA more thorough technical document describing opam and specifying the package\ndescription format is available in the\n[developer manual](https://opam.ocaml.org/doc/Manual.html). `make\ndoc` will otherwise make the API documentation available under `doc/`.\n\n## Community\n\nKeep track of development and community news.\n\n* Have a question that's not a feature request or bug report?\n  [Ask on the mailing list](http://lists.ocaml.org/listinfo/infrastructure).\n\n* Chat with fellow opamers on IRC. On the `irc.libera.chat` server,\n  in the `#ocaml` or the `#opam` channel.\n\n## Contributing\n\nWe welcome contributions! Please use GitHub's pull-request mechanism against\nthe master branch of the [opam repository](https://github.com/ocaml/opam). If\nthat's not an option for you, you can use `git format-patch` and email us.\n\n## Versioning\n\nThe release cycle of the opam binary respects [Semantic Versioning](http://semver.org/).\nNote however that the version ordering used for user packages managed by opam\nfollows the Debian definition (more details in [this\nsection](https://opam.ocaml.org/doc/Manual.html#version-ordering) of the user manual).\n\n## Related Repositories\n\n- [ocaml/opam-repository](https://github.com/ocaml/opam-repository) is the\n  official repository for opam packages and compilers. A number of unofficial\n  repositories are also available on the interwebs, for instance on\n  [Github](https://github.com/search?q=opam-repo\u0026type=Repositories).\n- [opam2web](https://github.com/ocaml/opam2web) generates a collection of\n  browsable HTML files for a given repository. It is used to generate\n  http://opam.ocaml.org.\n- [opam-rt](https://github.com/ocaml/opam-rt) is the regression framework for opam.\n- [opam-publish](https://github.com/ocaml-opam/opam-publish) is a tool to facilitate\n  the creation, update, and publication of opam packages.\n\n## Copyright and license\n\nThe version comparison function in `src/core/opamVersionCompare.ml` is part of\nthe Dose library and Copyright 2011 Ralf Treinen.\n\nAll other code is:\n\nCopyright 2012-2020 OCamlPro\nCopyright 2012 INRIA\n\nAll rights reserved. Opam is distributed under the terms of the GNU Lesser\nGeneral Public License version 2.1, with the special exception on linking\ndescribed in the file LICENSE.\n\nOpam is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\n","funding_links":[],"categories":["OCaml","package-manager"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml%2Fopam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focaml%2Fopam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml%2Fopam/lists"}