opam-version: "2.0"
maintainer: "Edgar Aroutiounian <edgar.factorial@gmail.com>"
authors: [ "Edgar Aroutiounian <edgar.factorial@gmail.com>" ]
license: "BSD-3-Clause"
homepage: "https://github.com/fxfactorial/ocaml-radare2"
dev-repo: "git+https://github.com/fxfactorial/ocaml-radare2.git"
bug-reports: "https://github.com/fxfactorial/ocaml-radare2/issues"
build: [
	["dune" "subst"] {pinned}
	["dune" "build" "-p" name "-j" jobs]
]
depexts: [
  ["radare2"] {os-family = "debian"}
  ["radare2"] {os-distribution = "fedora"}
  ["radare2"] {os-distribution = "arch"}
  ["radare2"] {os-distribution = "gentoo"}
  ["radare2"] {os-distribution = "homebrew" & os = "macos"}
]
depends: [
  "ocaml" {>= "4.03.0"}
  "dune" {>= "2.0"}
  "base-unix"
  "yojson" {>= "1.3.2"} | "yojson-android" {>= "1.3.2"}
]
messages:[
"You need to have r2 (radare2) installed and in your path"
"Use `opam depext radare2` to get it installed with your system package manager"
]

post-messages:[
"Play with radare2 interactively from within an OCaml repl like utop"
"Example in utop:"
""
"#require \"radare2\";;"
"let result = R2.with_command_j ~cmd:\"/j COLUMNS\" \"/bin/ls\";;
val result : Yojson.t =
`List
  [`Assoc
     [(\"offset\", `Int 109075); (\"type\", `String \"string\");
      (\"data\", `String \"eQUOTING_STYLECOLUMNSTABSIZEinvalid\")];
   `Assoc
     [(\"offset\", `Int 118247); (\"type\", `String \"string\");
      (\"data\", `String \"onment variable COLUMNS: %signori\")]]"
{success}]
synopsis: "OCaml interface to r2"
description: """
Interact with radare2,
See the mli for documentation, example usage in utop:

#require "radare2";;
let result = R2.with_command_j ~cmd:"/j COLUMNS" "/bin/ls";;
val result : Yojson.t =
`List
  [`Assoc
     [("offset", `Int 109075); ("type", `String "string");
      ("data", `String "eQUOTING_STYLECOLUMNSTABSIZEinvalid")];
   `Assoc
     [("offset", `Int 118247); ("type", `String "string");
      ("data", `String "onment variable COLUMNS: %signori")]]\""""
url {
  src: "https://github.com/fxfactorial/ocaml-radare2/archive/v0.0.5.tar.gz"
  checksum: [
    "md5=f77af13d20003537bb4cb9ed8ab3f4f8"
    "sha512=72606a1f59cf44725d863000b2993454fcbbbe09ef37571f156776956b582f4cb6bba8c8bd18951d6bc0dbd51669981a80577742b47ad2cb279d0b095134b798"
  ]
}
