diff --git a/pkgs/development/ocaml-modules/qcheck/lin.nix b/pkgs/development/ocaml-modules/qcheck/lin.nix new file mode 100644 index 000000000000..23164901ab6e --- /dev/null +++ b/pkgs/development/ocaml-modules/qcheck/lin.nix @@ -0,0 +1,17 @@ +{ buildDunePackage +, qcheck-multicoretests-util +}: + +buildDunePackage { + pname = "qcheck-lin"; + + inherit (qcheck-multicoretests-util) version src; + + propagatedBuildInputs = [ qcheck-multicoretests-util ]; + + doCheck = true; + + meta = qcheck-multicoretests-util.meta // { + description = "A multicore testing library for OCaml"; + }; +} diff --git a/pkgs/development/ocaml-modules/qcheck/multicoretests-util.nix b/pkgs/development/ocaml-modules/qcheck/multicoretests-util.nix new file mode 100644 index 000000000000..ec3ba0b1dac1 --- /dev/null +++ b/pkgs/development/ocaml-modules/qcheck/multicoretests-util.nix @@ -0,0 +1,28 @@ +{ lib, fetchFromGitHub, buildDunePackage +, qcheck-core +}: + +buildDunePackage rec { + pname = "qcheck-multicoretests-util"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "ocaml-multicore"; + repo = "multicoretests"; + rev = version; + hash = "sha256-U1ZqfWMwpAvbPq5yp2U9YTFklT4MypzTSfNvcKJfaYE="; + }; + + propagatedBuildInputs = [ qcheck-core ]; + + doCheck = true; + + minimalOCamlVersion = "4.12"; + + meta = { + homepage = "https://github.com/ocaml-multicore/multicoretests"; + description = "Utility functions for property-based testing of multicore programs"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/qcheck/stm.nix b/pkgs/development/ocaml-modules/qcheck/stm.nix new file mode 100644 index 000000000000..a4cd762ea5e4 --- /dev/null +++ b/pkgs/development/ocaml-modules/qcheck/stm.nix @@ -0,0 +1,17 @@ +{ buildDunePackage +, qcheck-multicoretests-util +}: + +buildDunePackage { + pname = "qcheck-stm"; + + inherit (qcheck-multicoretests-util) src version; + + propagatedBuildInputs = [ qcheck-multicoretests-util ]; + + doCheck = true; + + meta = qcheck-multicoretests-util.meta // { + description = "State-machine testing library for sequential and parallel model-based tests"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 457f306698e9..b50358e4f2ec 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1464,8 +1464,14 @@ let qcheck-core = callPackage ../development/ocaml-modules/qcheck/core.nix { }; + qcheck-lin = callPackage ../development/ocaml-modules/qcheck/lin.nix { }; + + qcheck-multicoretests-util = callPackage ../development/ocaml-modules/qcheck/multicoretests-util.nix { }; + qcheck-ounit = callPackage ../development/ocaml-modules/qcheck/ounit.nix { }; + qcheck-stm = callPackage ../development/ocaml-modules/qcheck/stm.nix { }; + qtest = callPackage ../development/ocaml-modules/qtest { }; ### R ###