From aa47da4c2c37d2889c85885c401c805bf4fb9844 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 21 Aug 2023 07:33:34 +0200 Subject: [PATCH 1/3] ocamlPackages.qcheck-multicoretests-util: init at 0.2 --- .../qcheck/multicoretests-util.nix | 28 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/ocaml-modules/qcheck/multicoretests-util.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 457f306698e9..3aea5e90b02e 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1464,6 +1464,8 @@ let qcheck-core = callPackage ../development/ocaml-modules/qcheck/core.nix { }; + qcheck-multicoretests-util = callPackage ../development/ocaml-modules/qcheck/multicoretests-util.nix { }; + qcheck-ounit = callPackage ../development/ocaml-modules/qcheck/ounit.nix { }; qtest = callPackage ../development/ocaml-modules/qtest { }; From 991356c8074eedea2ee40879188b9a8a622b3b4b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 21 Aug 2023 07:33:39 +0200 Subject: [PATCH 2/3] ocamlPackages.qcheck-lin: init at 0.2 --- pkgs/development/ocaml-modules/qcheck/lin.nix | 17 +++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/development/ocaml-modules/qcheck/lin.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 3aea5e90b02e..f62c7364302a 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1464,6 +1464,8 @@ 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 { }; From 6698fd456eed52fdf91e5fd48b6d6cef478ff3ff Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 21 Aug 2023 07:33:44 +0200 Subject: [PATCH 3/3] ocamlPackages.qcheck-stm: init at 0.2 --- pkgs/development/ocaml-modules/qcheck/stm.nix | 17 +++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/development/ocaml-modules/qcheck/stm.nix 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 f62c7364302a..b50358e4f2ec 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1470,6 +1470,8 @@ let 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 ###