diff --git a/pkgs/development/ocaml-modules/reason-native/default.nix b/pkgs/development/ocaml-modules/reason-native/default.nix index d54a1fd1322..024783cf618 100644 --- a/pkgs/development/ocaml-modules/reason-native/default.nix +++ b/pkgs/development/ocaml-modules/reason-native/default.nix @@ -1,23 +1,23 @@ -{ newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native }: +{ newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native, fetchpatch }: let generic = (somePath: let prepkg = import somePath { - inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason; + inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason fetchpatch; inherit (reason-native) console file-context-printer fp pastel rely; }; in buildDunePackage ({ - version = "2021-16-16-aec0ac6"; + version = "2022-08-31-a0ddab6"; src = fetchFromGitHub { owner = "reasonml"; repo = "reason-native"; - rev = "aec0ac681be7211b4d092262281689c46deb63e1"; - sha256 = "sha256-QoyI50MBY3RJBmM1y90n7oXrLmHe0CQxKojv+7YbegE="; + rev = "a0ddab6ab25237961e32d8732b0a222ec2372d4a"; + hash = "sha256-s2N5OFTwIbKXcv05gQRaBMCHO1Mj563yhryPeo8jMh8="; }; - useDune2 = true; + duneVersion = "3"; meta = with lib; { description = "Libraries for building and testing native Reason programs"; downloadPage = "https://github.com/reasonml/reason-native"; @@ -36,6 +36,7 @@ in fp = generic ./fp.nix; pastel = generic ./pastel.nix; pastel-console = generic ./pastel-console.nix; + qcheck-rely = generic ./qcheck-rely.nix; refmterr = generic ./refmterr.nix; rely = generic ./rely.nix; rely-junit-reporter = generic ./rely-junit-reporter.nix; diff --git a/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix new file mode 100644 index 00000000000..9d2770def09 --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix @@ -0,0 +1,31 @@ +{ qcheck-core, reason, console, rely, fetchpatch, ... }: + +{ + pname = "qcheck-rely"; + + nativeBuildInputs = [ + reason + ]; + + patches = [ + (fetchpatch { + url = "https://github.com/reasonml/reason-native/pull/269/commits/b42d66f5929a11739c13f849939007bf8610888b.patch"; + hash = "sha256-MMLl3eqF8xQZ2T+sIEuv2WpnGF6FZtatgH5fiF5hpP4="; + includes = [ + "src/qcheck-rely/QCheckRely.re" + "src/qcheck-rely/QCheckRely.rei" + ]; + }) + ]; + + propagatedBuildInputs = [ + qcheck-core + console + rely + ]; + + meta = { + description = "A library containing custom Rely matchers allowing for easily using QCheck with Rely. QCheck is a 'QuickCheck inspired property-based testing for OCaml, and combinators to generate random values to run tests on'"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/qcheck-rely"; + }; +} diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix b/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix index e1a995d33c5..fc7f1891339 100644 --- a/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix +++ b/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix @@ -6,7 +6,7 @@ buildDunePackage rec { src = ./.; - useDune2 = true; + duneVersion = "3"; buildInputs = [ reason