From bec72bf65cd287d3da83e4681188b5a97d797a5a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 29 Dec 2017 20:08:40 +0000 Subject: ocamlPackages.otr: 0.3.3 -> 0.3.4 --- pkgs/development/ocaml-modules/otr/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/otr/default.nix b/pkgs/development/ocaml-modules/otr/default.nix index 189b3adf8739..ac853c94094b 100644 --- a/pkgs/development/ocaml-modules/otr/default.nix +++ b/pkgs/development/ocaml-modules/otr/default.nix @@ -1,22 +1,25 @@ -{ stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml -, ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, result, nocrypto, astring +{ stdenv, fetchFromGitHub, ocaml, ocamlbuild, findlib, topkg +, ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, rresult, nocrypto +, astring }: -buildOcaml rec { - name = "otr"; - version = "0.3.3"; +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "otr is not available for OCaml ${ocaml.version}" +else - minimumSupportedOcamlVersion = "4.02"; +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-otr-${version}"; + version = "0.3.4"; src = fetchFromGitHub { owner = "hannesm"; repo = "ocaml-otr"; rev = "${version}"; - sha256 = "07zzix5mfsasqpqdx811m0x04gp8mq1ayf4b64998k98027v01rr"; + sha256 = "0ixf0jvccmcbhk5mhzqakfzimvz200wkdkq3z2d0bdzyggslbdl4"; }; - buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv ppx_cstruct ]; - propagatedBuildInputs = [ cstruct sexplib result nocrypto astring ]; + buildInputs = [ ocaml ocamlbuild findlib topkg ppx_tools ppx_sexp_conv ppx_cstruct ]; + propagatedBuildInputs = [ cstruct sexplib rresult nocrypto astring ]; buildPhase = "${topkg.run} build --tests true"; @@ -26,6 +29,7 @@ buildOcaml rec { checkPhase = "${topkg.run} test"; meta = with stdenv.lib; { + inherit (ocaml.meta) platforms; homepage = https://github.com/hannesm/ocaml-otr; description = "Off-the-record messaging protocol, purely in OCaml"; license = licenses.bsd2; -- cgit 1.4.1