opam-version: "2.0"
maintainer:   "thomas@gazagnaire.org"
authors:      "Thomas Gazagnaire"
license:      "ISC"
homepage:     "https://github.com/mirage/irmin"
bug-reports:  "https://github.com/mirage/irmin/issues"
dev-repo: "git+https://github.com/mirage/irmin.git"
build: [
  ["./configure" "--prefix" prefix
      "--%{cohttp:enable}%-http"
      "--%{git:enable}%-git"
      "--%{base-unix:enable}%-unix"
      "--%{mirage-git:enable}%-mirage"]
  [make]
]
#build-test: [
#  ["./configure" "--enable-tests" "--enable-examples"]
#  [make "test"]
#]
install: [make "install"]
remove: ["ocamlfind" "remove" "irmin"]

depends: [
  "ocaml" {>= "4.01.0"}
  "ocamlfind" {build}
  "ezjsonm" {>= "0.4.0" & < "0.4.2"}
  "ocamlgraph"
  "lwt" {>= "2.4.7" & < "2.7.0"}
  "dolog" {>= "0.4" & < "4.0.0"}
  "cstruct" {>= "1.0.1"}
  "mirage-tc" {>= "0.3.0"}
  "mstruct"
  "uri" {>= "1.3.12"}
  "stringext" {>= "1.1.0"}
  "hex"
  "re"
  "cmdliner"
  "crunch"
  "base-unix" {with-test}
  "git" {with-test}
  "cohttp" {with-test}
  "alcotest" {with-test & >= "0.4.1"}
  "ocamlbuild" {build}
]
depopts: [
  "base-unix"
  "git"
  "cohttp"
  "mirage-git"
]
conflicts: [
  "cohttp" {< "0.18.3"}
  "git" {< "1.6.0"}
  "git" {>= "1.7.0"}
]
synopsis: "Irmin, the database that never forgets"
description: """
Irmin is a distributed database with built-in snapshot, branch and
revert mechanisms. It is designed to use a large variety of backends,
although it is optimized for append-only store.

Irmin is written in pure OCaml. It can thus be compiled to Javascript
-- and run in the browsers; or into a MirageOS unikernel -- and run directly
on top of Xen."""
flags: light-uninstall
url {
  src: "https://github.com/mirage/irmin/archive/0.9.8.tar.gz"
  checksum: "md5=9e5cfc587458d18d0ed5fc3f12e3d2b6"
}
