opam-version: "2.0"
maintainer: "gabe@fb.com"
authors: [
  "Avik Chaudhuri"
  "Basil Hosmer"
  "Gabe Levi"
  "Jeff Morrison"
  "Marshall Roch"
  "Sam Goldman"
]
homepage: "https://github.com/facebook/flow/tree/master/src/parser"
bug-reports: "https://github.com/facebook/flow/issues"
license: "BSD-3-Clause"

# This is pretty hacky, but v0.35.0 has already been release. We'll
# add a real META file and a Makefile rule for v0.36.0
build: [
  ["sh" "-c" "cd src/parser && ocamlbuild parser_flow.cma parser_flow.cmxa"]
  ["sh" "-c" "echo 'name=\"parser_flow\"' > src/parser/META"]
  ["sh" "-c" "echo 'version=\"0.35.0\"' >> src/parser/META"]
  ["sh" "-c" "echo 'description=\"flow parser ocamlfind package\"' >> src/parser/META"]
  ["sh" "-c" "echo 'archive(byte)=\"parser_flow.cma\"' >> src/parser/META"]
  ["sh" "-c" "echo 'archive(native)=\"parser_flow.cmxa\"' >> src/parser/META"]
]

install: [
  ["sh" "-c" "cd src/parser/ && ocamlfind install flow_parser META _build/parser_flow.a _build/parser_flow.cma _build/parser_flow.cmxa _build/*.cmi"]
]
remove: ["ocamlfind" "remove" "flow_parser"]
depends: [
  "ocaml" {>= "4.01.0" & < "4.06.0"}
  "ocamlfind" {build}
  "ocamlbuild" {build}
]
dev-repo: "git+https://github.com/facebook/flow.git"
synopsis:
  "The Flow parser is a JavaScript parser written in OCaml. It produces an AST"
description: """
that conforms to SpiderMonkey's Parser API and that mostly matches what esprima
produces. The Flow Parser can be compiled to native code or can be compiled to
JavaScript using js_of_ocaml.

To find out more about Flow, check out <http://flowtype.org>."""
flags: light-uninstall
url {
  src: "https://github.com/facebook/flow/archive/v0.35.0.tar.gz"
  checksum: "md5=8efb56b2c99c5a1949f7e09502075afa"
}
