Skip to content

Commit

Permalink
use dune to generate opam files
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragsoni committed Apr 29, 2020
1 parent 8ab0fd9 commit 7ced109
Show file tree
Hide file tree
Showing 14 changed files with 221 additions and 83 deletions.
102 changes: 101 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,102 @@
(lang dune 1.7)
(lang dune 1.11)

(using fmt 1.1)

(name pgx)

(generate_opam_files true)

(license "LGPL-2 with OCaml linking exception")

(maintainers "Arena Developers <silver-snakes@arena.io>")

(authors "Arena Developers <silver-snakes@arena.io>")

(source
(github arenadotio/pgx))

(package
(name pgx)
(synopsis "Pure-OCaml PostgreSQL client library")
(description
"PGX is a pure-OCaml PostgreSQL client library, supporting Async, LWT, or synchronous operations.")
(depends
(alcotest
(and
:with-test
(>= 1.0.0)))
(base64
(and
:with-test
(>= 3.0.0)))
(bisect_ppx
(and
:dev
(>= 2.0.0)))
(dune
(>= 1.11))
ipaddr
(ocaml
(>= 4.08))
(ppx_custom_printf
(>= v0.13.0))
(ppx_sexp_conv
(>= v0.13.0))
re
(sexplib0
(>= v0.13.0))
uuidm))

(package
(name pgx_unix)
(synopsis
"PGX using the standard library's Unix module for IO (synchronous)")
(depends
(ocaml
(>= 4.08))
(pgx
(= :version))))

(package
(name pgx_async)
(synopsis "Pgx using Async for IO")
(depends
(alcotest-async
(and
:with-test
(>= "1.0.0")))
(async_kernel
(>= "v0.13.0"))
(async_unix
(>= "v0.13.0"))
(ocaml
(>= 4.08))
(pgx
(= :version))
(pgx_value_core
(= :version))))

(package
(name pgx_lwt)
(synopsis "Pgx using Lwt for IO")
(depends
(alcotest-lwt
(and
:with-test
(>= "1.0.0")))
lwt
(ocaml
(>= 4.08))
(pgx
(= :version))))

(package
(name pgx_value_core)
(synopsis "Pgx_value converters for Core types like Date and Time")
(depends
(core_kernel
(>= "v0.13.0"))
(ocaml
(>= 4.08))
(pgx
(= :version))))
3 changes: 0 additions & 3 deletions pgx.descr

This file was deleted.

48 changes: 29 additions & 19 deletions pgx.opam
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Pure-OCaml PostgreSQL client library"
description:
"PGX is a pure-OCaml PostgreSQL client library, supporting Async, LWT, or synchronous operations."
maintainer: ["Arena Developers <silver-snakes@arena.io>"]
authors: ["Arena Developers <silver-snakes@arena.io>"]
maintainer: "Arena Developers <silver-snakes@arena.io>"
license: "LGPL-2 with OCaml linking exception"
homepage: "https://github.com/arenadotio/pgx"
dev-repo: "git+https://github.com/arenadotio/pgx.git"
bug-reports: "https://github.com/arenadotio/pgx/issues"
doc: "https://arenadotio.github.io/pgx/doc"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"alcotest" {with-test & >= "1.0.0"}
"base64" {with-test & >= "3.0.0"}
"bisect_ppx" {dev & >= "2.0.0"}
"dune" {>= "1.11"}
"ipaddr"
"ocaml" {>= "4.08.0"}
"ppx_custom_printf" { >= "v0.13.0" }
"ppx_sexp_conv" { >= "v0.13.0" }
"uuidm"
"ocaml" {>= "4.08"}
"ppx_custom_printf" {>= "v0.13.0"}
"ppx_sexp_conv" {>= "v0.13.0"}
"re"
"sexplib0" {>= "v0.13.0"}

"bisect_ppx" {dev & >= "2.0.0"}
"dune" {>= "1.7.0"}

"alcotest" {with-test & >= "1.0.0"}
"base64" {with-test & >= "3.0.0"}
"uuidm"
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/arenadotio/pgx.git"
6 changes: 3 additions & 3 deletions pgx/src/pgx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,9 @@ module Make (Thread : IO) = struct
*)
fail_msg "Pgx: crypt password authentication not supported"
| Message_in.AuthenticationMD5Password salt ->
(* (* This is a guess at how the salt is used ... *)
let password = salt ^ password in
let password = Digest.string password in*)
(* (* This is a guess at how the salt is used ... *)
let password = salt ^ password in
let password = Digest.string password in*)
let digest =
password ^ user
|> Digest.string
Expand Down
1 change: 0 additions & 1 deletion pgx_async.descr

This file was deleted.

34 changes: 22 additions & 12 deletions pgx_async.opam
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Pgx using Async for IO"
maintainer: ["Arena Developers <silver-snakes@arena.io>"]
authors: ["Arena Developers <silver-snakes@arena.io>"]
maintainer: "Arena Developers <silver-snakes@arena.io>"
license: "LGPL-2 with OCaml linking exception"
homepage: "https://github.com/arenadotio/pgx"
dev-repo: "git+https://github.com/arenadotio/pgx.git"
bug-reports: "https://github.com/arenadotio/pgx/issues"
doc: "https://arenadotio.github.io/pgx/doc"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"dune" {>= "1.11"}
"alcotest-async" {with-test & >= "1.0.0"}
"async_kernel" {>= "v0.13.0"}
"async_unix" {>= "v0.13.0"}
"ocaml" {>= "4.08"}
"pgx" {= version}
"pgx_value_core" {= version}

"alcotest-async" {with-test & >= "1.0.0"}
"base64" {with-test & >= "3.0.0"}
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/arenadotio/pgx.git"
1 change: 0 additions & 1 deletion pgx_lwt.descr

This file was deleted.

35 changes: 23 additions & 12 deletions pgx_lwt.opam
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Pgx using Lwt for IO"
maintainer: ["Arena Developers <silver-snakes@arena.io>"]
authors: ["Arena Developers <silver-snakes@arena.io>"]
maintainer: "Arena Developers <silver-snakes@arena.io>"
license: "LGPL-2 with OCaml linking exception"
homepage: "https://github.com/arenadotio/pgx"
dev-repo: "git+https://github.com/arenadotio/pgx.git"
bug-reports: "https://github.com/arenadotio/pgx/issues"
doc: "https://arenadotio.github.io/pgx/doc"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"pgx" {= version}
"lwt"

"dune" {>= "1.11"}
"alcotest-lwt" {with-test & >= "1.0.0"}
"lwt"
"ocaml" {>= "4.08"}
"pgx" {= version}
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/arenadotio/pgx.git"
2 changes: 1 addition & 1 deletion pgx_test/src/pgx_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ struct
with_conn (fun db ->
[ "SELECT decode($1, 'base64')", Base64.encode_exn all_chars, all_chars
(* Postgres adds whitespace to base64 encodings, so we strip it
back out *)
back out *)
; ( "SELECT regexp_replace(encode($1, 'base64'), '\\s', '', 'g')"
, all_chars
, Base64.encode_exn all_chars )
Expand Down
1 change: 0 additions & 1 deletion pgx_unix.descr

This file was deleted.

30 changes: 21 additions & 9 deletions pgx_unix.opam
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "PGX using the standard library's Unix module for IO (synchronous)"
maintainer: ["Arena Developers <silver-snakes@arena.io>"]
authors: ["Arena Developers <silver-snakes@arena.io>"]
maintainer: "Arena Developers <silver-snakes@arena.io>"
license: "LGPL-2 with OCaml linking exception"
homepage: "https://github.com/arenadotio/pgx"
dev-repo: "git+https://github.com/arenadotio/pgx.git"
bug-reports: "https://github.com/arenadotio/pgx/issues"
doc: "https://arenadotio.github.io/pgx/doc"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"dune" {>= "1.11"}
"ocaml" {>= "4.08"}
"pgx" {= version}
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/arenadotio/pgx.git"
1 change: 0 additions & 1 deletion pgx_value_core.descr

This file was deleted.

33 changes: 21 additions & 12 deletions pgx_value_core.opam
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Pgx_value converters for Core types like Date and Time"
maintainer: ["Arena Developers <silver-snakes@arena.io>"]
authors: ["Arena Developers <silver-snakes@arena.io>"]
maintainer: "Arena Developers <silver-snakes@arena.io>"
license: "LGPL-2 with OCaml linking exception"
homepage: "https://github.com/arenadotio/pgx"
dev-repo: "git+https://github.com/arenadotio/pgx.git"
bug-reports: "https://github.com/arenadotio/pgx/issues"
doc: "https://arenadotio.github.io/pgx/doc"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"dune" {>= "1.11"}
"core_kernel" {>= "v0.13.0"}
"ocaml" {>= "4.08"}
"pgx" {= version}

"alcotest" {with-test & >= "1.0.0"}
"base64" {with-test & >= "3.0.0"}
]
build: [
["dune" "subst"] {pinned}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/arenadotio/pgx.git"
7 changes: 0 additions & 7 deletions pkg/pkg.ml

This file was deleted.

0 comments on commit 7ced109

Please sign in to comment.