diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2016-11-21 13:11:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-21 13:11:33 +0100 |
commit | c2072e12a054558b3ba23978838cdf5dc87c4f58 (patch) | |
tree | 864fe01bb9921fe8e1e22405099c9974e7d43ffd /pkgs/development | |
parent | 57b8454c5a9b3f435a2d417729f7f27da62778b6 (diff) | |
parent | c7dc06655aab39216ecccb1266e56aa2ded9739f (diff) | |
download | nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar.gz nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar.bz2 nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar.lz nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar.xz nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.tar.zst nixpkgs-c2072e12a054558b3ba23978838cdf5dc87c4f58.zip |
Merge pull request #20530 from sternenseemann/otr
ocaml-otr: init at 0.3.3
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/ocaml-modules/otr/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/otr/default.nix b/pkgs/development/ocaml-modules/otr/default.nix new file mode 100644 index 00000000000..dfee365cd75 --- /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 ]; + }; +} |