From 4c8681fea1df607ded96b75a920f2c35b36f7a3b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 21 Mar 2015 09:52:59 +0100 Subject: [PATCH] Adds ocaml-qtest-2.0.1 Inline test extraction utility for OCaml, originally developed internally for Batteries Homepage: https://github.com/vincent-hugot/iTeML --- .../ocaml-modules/qtest/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/ocaml-modules/qtest/default.nix diff --git a/pkgs/development/ocaml-modules/qtest/default.nix b/pkgs/development/ocaml-modules/qtest/default.nix new file mode 100644 index 00000000000..e68a8729c01 --- /dev/null +++ b/pkgs/development/ocaml-modules/qtest/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchzip, ocaml, oasis, findlib, ounit }: + +let version = "2.0.1"; in + +stdenv.mkDerivation { + name = "ocaml-qtest-${version}"; + src = fetchzip { + url = "https://github.com/vincent-hugot/iTeML/archive/v${version}.tar.gz"; + sha256 = "00sir7q7z78s22w8fzrgw9gqm7r8ww0bgwqxrq6nsbbclgxj9c6i"; + }; + + buildInputs = [ ocaml oasis findlib ]; + propagatedBuildInputs = [ ounit ]; + + buildPhase = "ocaml do.ml qtest build $out"; + createFindlibDestdir = true; + installPhase = "ocaml do.ml qtest install $out"; + + meta = { + description = "Inline (Unit) Tests for OCaml (formerly “qtest”)"; + homepage = https://github.com/vincent-hugot/iTeML; + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c980f25dc4..c91c1625196 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4179,6 +4179,10 @@ let pycaml = callPackage ../development/ocaml-modules/pycaml { }; + qtest = callPackage ../development/ocaml-modules/qtest { + oasis = ocaml_oasis; + }; + re = callPackage ../development/ocaml-modules/re { }; safepass = callPackage ../development/ocaml-modules/safepass { };