diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/asn1-combinators/default.nix | 37 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/batteries/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/erm_xmpp/0.3.nix | 29 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/menhir/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/nocrypto/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/notty/default.nix | 37 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocplib-simplex/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/otr/default.nix | 43 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/tls/default.nix | 41 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/x509/default.nix | 28 |
11 files changed, 247 insertions, 48 deletions
diff --git a/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/pkgs/development/ocaml-modules/asn1-combinators/default.nix index 544db9e0d78b..feeb94a5c462 100644 --- a/pkgs/development/ocaml-modules/asn1-combinators/default.nix +++ b/pkgs/development/ocaml-modules/asn1-combinators/default.nix @@ -1,32 +1,39 @@ -{ stdenv, fetchzip, ocaml, findlib, cstruct, zarith, ounit }: +{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg, opam }: -assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; +let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in -let version = "0.1.2"; in +buildOcaml rec { + name = "asn1-combinators"; + version = "0.1.3"; -stdenv.mkDerivation { - name = "ocaml-asn1-combinators-${version}"; + minimumSupportedOcamlVersion = "4.01"; - src = fetchzip { - url = "https://github.com/mirleft/ocaml-asn1-combinators/archive/${version}.tar.gz"; - sha256 = "13vpdgcyph4vq3gcp8b16756s4nz3crpxhxfhcqgc1ffz61gc0h5"; + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-asn1-combinators"; + rev = "v${version}"; + sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj"; }; - buildInputs = [ ocaml findlib ounit ]; - propagatedBuildInputs = [ cstruct zarith ]; + buildInputs = [ ocaml findlib ounit topkg opam ]; + propagatedBuildInputs = [ result cstruct zarith ]; createFindlibDestdir = true; - configureFlags = "--enable-tests"; + buildPhase = "ocaml ${ocamlFlags} pkg/pkg.ml build --tests true"; + + installPhase = '' + opam-installer --script --prefix=$out | sh + ln -s $out/lib/asn1-combinators $out/lib/ocaml/${ocaml.version}/site-lib + ''; + doCheck = true; - checkTarget = "test"; + checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test"; meta = { homepage = https://github.com/mirleft/ocaml-asn1-combinators; description = "Combinators for expressing ASN.1 grammars in OCaml"; - platforms = ocaml.meta.platforms or []; - license = stdenv.lib.licenses.bsd2; + license = stdenv.lib.licenses.isc; maintainers = with stdenv.lib.maintainers; [ vbgl ]; - broken = stdenv.isi686; # https://github.com/mirleft/ocaml-asn1-combinators/issues/13 }; } diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 904a214c34f5..d24c61745104 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchzip, ocaml, findlib, ocamlbuild, qtest }: -let version = "2.5.2"; in +let version = "2.5.3"; in stdenv.mkDerivation { name = "ocaml-batteries-${version}"; src = fetchzip { url = "https://github.com/ocaml-batteries-team/batteries-included/archive/v${version}.tar.gz"; - sha256 = "01v7sp8vsqlfrmpji5pkrsjl43r3q8hk1a4z4lmyy9y2i0fqwl07"; + sha256 = "047v05qy0526ad52hzhfa0giczhyzbmw9fwsn6l319icq77ms6jh"; }; buildInputs = [ ocaml findlib ocamlbuild qtest ]; diff --git a/pkgs/development/ocaml-modules/cstruct/default.nix b/pkgs/development/ocaml-modules/cstruct/default.nix index dd6cffb979c5..8c1aac4d83b2 100644 --- a/pkgs/development/ocaml-modules/cstruct/default.nix +++ b/pkgs/development/ocaml-modules/cstruct/default.nix @@ -1,5 +1,5 @@ -{ stdenv, writeText, fetchFromGitHub, ocaml, ocplib-endian, sexplib_p4, findlib, ppx_tools -, async_p4 ? null, lwt ? null, camlp4 +{ stdenv, writeText, fetchFromGitHub, ocaml, ocplib-endian, sexplib, findlib, ppx_tools +, async ? null, lwt ? null }: assert stdenv.lib.versionAtLeast ocaml.version "4.01"; @@ -22,10 +22,10 @@ stdenv.mkDerivation { inherit (param) sha256; }; - configureFlags = [ "${opt lwt}-lwt" "${opt async_p4}-async" "${opt ppx_tools}-ppx" ]; + configureFlags = [ "${opt lwt}-lwt" "${opt async}-async" "${opt ppx_tools}-ppx" ]; - buildInputs = [ ocaml findlib ppx_tools camlp4 lwt async_p4 ]; - propagatedBuildInputs = [ ocplib-endian sexplib_p4 ]; + buildInputs = [ ocaml findlib ppx_tools lwt async ]; + propagatedBuildInputs = [ ocplib-endian sexplib ]; createFindlibDestdir = true; dontStrip = true; diff --git a/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix b/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix new file mode 100644 index 000000000000..a7290c8bb98f --- /dev/null +++ b/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix @@ -0,0 +1,29 @@ +{ stdenv, buildOcaml, fetchFromGitHub, fetchurl, ocaml, findlib, erm_xml, nocrypto }: + +buildOcaml rec { + version = "0.3"; + name = "erm_xmpp"; + + src = fetchFromGitHub { + owner = "hannesm"; + repo = "xmpp"; + rev = "eee18bd3dd343550169969c0b45548eafd51cfe1"; + sha256 = "0hzs528lrx1ayalv6fh555pjn0b4l8xch1f72hd3b07g1xahdas5"; + }; + + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ erm_xml nocrypto ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = { + homepage = https://github.com/hannesm/xmpp; + description = "OCaml based XMPP implementation (fork)"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix index 839a49615cd8..9592e9a68d81 100644 --- a/pkgs/development/ocaml-modules/menhir/default.nix +++ b/pkgs/development/ocaml-modules/menhir/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, ocaml, findlib, ocamlbuild -, version ? if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02" then "20160526" else "20140422" +, version ? if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02" then "20161115" else "20140422" }@args: let sha256 = if version == "20140422" then "1ki1f2id6a14h9xpv2k8yb6px7dyw8cvwh39csyzj4qpzx7wia0d" - else if version == "20160526" then "1i6yqxhs29n6qcvi6c5qbg5mh8752ywsyv1dr6x1qcv0ncqpxhns" + else if version == "20161115" then "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k" else throw ("menhir: unknown version " ++ version); in diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index fab048a9a9f8..d7f7ae0e3655 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -1,20 +1,30 @@ -{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ocaml_lwt, ounit }: +{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib +, cstruct, zarith, ounit, ocaml_oasis, ppx_sexp_conv, sexplib +, lwt ? null}: -assert stdenv.lib.versionAtLeast ocaml.version "4.01"; +with stdenv.lib; +let withLwt = lwt != null; in -stdenv.mkDerivation rec { - name = "ocaml-nocrypto-${version}"; - version = "0.5.1"; +buildOcaml rec { + name = "nocrypto"; + version = "0.5.3"; - src = fetchzip { - url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz"; - sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0"; + minimumSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-nocrypto"; + rev = "v${version}"; + sha256 = "0m3yvqpgfffqp15mcl08b78cv8zw25rnp6z1pkj5aimz6xg3gqbl"; }; - buildInputs = [ ocaml findlib type_conv ocaml_lwt ounit ]; - propagatedBuildInputs = [ cstruct zarith ]; + buildInputs = [ ocaml ocaml_oasis findlib ounit ppx_sexp_conv ]; + propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt lwt; + + configureFlags = [ "--enable-tests" ] ++ optional withLwt ["--enable-lwt"]; + + configurePhase = "./configure --prefix $out $configureFlags"; - configureFlags = "--enable-tests"; doCheck = true; checkTarget = "test"; createFindlibDestdir = true; @@ -22,7 +32,6 @@ stdenv.mkDerivation rec { meta = { homepage = https://github.com/mirleft/ocaml-nocrypto; description = "Simplest possible crypto to support TLS"; - platforms = ocaml.meta.platforms or []; license = stdenv.lib.licenses.bsd2; maintainers = with stdenv.lib.maintainers; [ vbgl ]; }; diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix new file mode 100644 index 000000000000..3178789c3993 --- /dev/null +++ b/pkgs/development/ocaml-modules/notty/default.nix @@ -0,0 +1,37 @@ +{ stdenv, buildOcaml, fetchFromGitHub, findlib +, result, uucp, uuseg, uutf +, lwt ? null }: + +with stdenv.lib; + +let withLwt = lwt != null; in + +buildOcaml rec { + version = "0.1.1"; + name = "notty"; + + minimumSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "pqwy"; + repo = "notty"; + rev = "v${version}"; + sha256 = "0bw3bq8z2y1rhc20zn13s78sazywyzpg8nmyjch33p7ypxfglf01"; + }; + + buildInputs = [ findlib ]; + propagatedBuildInputs = [ result uucp uuseg uutf ] ++ + optional withLwt [ lwt ]; + + configureFlags = [ "--enable-unix" ] ++ + (if withLwt then ["--enable-lwt"] else ["--disable-lwt"]); + + configurePhase = "./configure --prefix $out $configureFlags"; + + meta = { + inherit (src.meta) homepage; + description = "Declarative terminal graphics for OCaml"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/ocplib-simplex/default.nix b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix new file mode 100644 index 000000000000..4ce3ac6dff30 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, ocaml, findlib }: + +let + pname = "ocplib-simplex"; + version = "0.3"; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "OCamlPro-Iguernlala"; + repo = pname; + rev = version; + sha256 = "1fmz38w2cj9fny4adqqyil59dvndqkr59s7wk2gqs47r72b6sisa"; + }; + + buildInputs = [ autoreconfHook ocaml findlib ]; + + createFindlibDestdir = true; + + meta = { + description = "An OCaml library implementing a simplex algorithm, in a functional style, for solving systems of linear inequalities"; + homepage = https://github.com/OCamlPro-Iguernlala/ocplib-simplex; + inherit (ocaml.meta) platforms; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/otr/default.nix b/pkgs/development/ocaml-modules/otr/default.nix new file mode 100644 index 000000000000..dfee365cd750 --- /dev/null +++ b/pkgs/development/ocaml-modules/otr/default.nix @@ -0,0 +1,43 @@ +{stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml, opam, + ppx_tools, ppx_sexp_conv, cstruct, sexplib, result, nocrypto, astring}: + +let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in + +buildOcaml rec { + name = "otr"; + version = "0.3.3"; + + minimumSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "hannesm"; + repo = "ocaml-otr"; + rev = "${version}"; + sha256 = "07zzix5mfsasqpqdx811m0x04gp8mq1ayf4b64998k98027v01rr"; + }; + + buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv opam ]; + propagatedBuildInputs = [ cstruct sexplib result nocrypto astring ]; + + buildPhase = '' + ocaml ${ocamlFlags} pkg/pkg.ml build \ + --tests true + ''; + + installPhase = '' + opam-installer --prefix=$out --script | sh + ln -s $out/lib/otr $out/lib/ocaml/${ocaml.version}/site-lib + ''; + + doCheck = true; + checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test"; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = https://github.com/hannesm/ocaml-otr; + description = "Off-the-record messaging protocol, purely in OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix new file mode 100644 index 000000000000..b38138c55731 --- /dev/null +++ b/pkgs/development/ocaml-modules/tls/default.nix @@ -0,0 +1,41 @@ +{ stdenv, buildOcaml, fetchFromGitHub, findlib, ocamlbuild, ocaml_oasis +, ppx_tools, ppx_sexp_conv, result, x509, nocrypto, cstruct, ounit +, lwt ? null}: + +with stdenv.lib; + +let withLwt = lwt != null; in + +buildOcaml rec { + version = "0.7.1"; + name = "tls"; + + minimunSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-tls"; + rev = "${version}"; + sha256 = "19q2hzxiasz9pzczgb63kikg0mc9mw98dfvch5falf2rincycj24"; + }; + + buildInputs = [ ocamlbuild findlib ocaml_oasis ppx_sexp_conv ounit ]; + propagatedBuildInputs = [ cstruct nocrypto result x509 ] ++ + optional withLwt lwt; + + configureFlags = [ "--disable-mirage" "--enable-tests" ] ++ + optional withLwt ["--enable-lwt"]; + + configurePhase = "./configure --prefix $out $configureFlags"; + + doCheck = true; + checkTarget = "test"; + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = https://github.com/mirleft/ocaml-tls; + description = "TLS in pure OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/x509/default.nix b/pkgs/development/ocaml-modules/x509/default.nix index c44ccb18982a..ab82f6abdcbb 100644 --- a/pkgs/development/ocaml-modules/x509/default.nix +++ b/pkgs/development/ocaml-modules/x509/default.nix @@ -1,28 +1,32 @@ -{ stdenv, fetchzip, ocaml, findlib, asn1-combinators, nocrypto, ounit }: +{stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, asn1-combinators, nocrypto, ounit, ocaml_oasis, ppx_sexp_conv}: -let version = "0.5.0"; in +buildOcaml rec { + name = "x509"; + version = "0.5.3"; -stdenv.mkDerivation { - name = "ocaml-x509-${version}"; + mininimumSupportedOcamlVersion = "4.02"; - src = fetchzip { - url = "https://github.com/mirleft/ocaml-x509/archive/${version}.tar.gz"; - sha256 = "0i9618ph4i2yk5dvvhiqhm7wf3qmd6b795mxwff8jf856gb2gdyn"; + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-x509"; + rev = "${version}"; + sha256 = "07cc3z6h87460z3f4vz8nlczw5jkc4vjhix413z9x6nral876rn7"; }; - buildInputs = [ ocaml findlib ounit ]; + buildInputs = [ ocaml ocaml_oasis findlib ounit ppx_sexp_conv ]; propagatedBuildInputs = [ asn1-combinators nocrypto ]; configureFlags = "--enable-tests"; + configurePhase = "./configure --prefix $out $configureFlags"; + doCheck = true; checkTarget = "test"; createFindlibDestdir = true; - meta = { + meta = with stdenv.lib; { homepage = https://github.com/mirleft/ocaml-x509; description = "X509 (RFC5280) handling in OCaml"; - platforms = ocaml.meta.platforms or []; - license = stdenv.lib.licenses.bsd2; - maintainers = with stdenv.lib.maintainers; [ vbgl ]; + license = licenses.bsd2; + maintainers = with maintainers; [ vbgl ]; }; } |