about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2023-04-05 06:17:56 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2023-04-05 08:43:28 +0200
commitf80bf9ab05b5abb4f0664ae53720396afabc2560 (patch)
tree6f4b503b9de53767905fad4c61b555b08020ae06
parenteee0652b6b558cec01d7fb1490f4a520f08c246f (diff)
downloadnixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar.gz
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar.bz2
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar.lz
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar.xz
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.tar.zst
nixlib-f80bf9ab05b5abb4f0664ae53720396afabc2560.zip
ocamlPackages.qcheck: fix for OCaml ≥ 5.0
-rw-r--r--pkgs/development/ocaml-modules/qcheck/alcotest.nix4
-rw-r--r--pkgs/development/ocaml-modules/qcheck/bytes.patch36
-rw-r--r--pkgs/development/ocaml-modules/qcheck/core.nix3
-rw-r--r--pkgs/development/ocaml-modules/qcheck/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/qcheck/ounit.nix4
5 files changed, 48 insertions, 3 deletions
diff --git a/pkgs/development/ocaml-modules/qcheck/alcotest.nix b/pkgs/development/ocaml-modules/qcheck/alcotest.nix
index 4f1baec1e556..113b61eea180 100644
--- a/pkgs/development/ocaml-modules/qcheck/alcotest.nix
+++ b/pkgs/development/ocaml-modules/qcheck/alcotest.nix
@@ -3,7 +3,9 @@
 buildDunePackage {
   pname = "qcheck-alcotest";
 
-  inherit (qcheck-core) version src;
+  inherit (qcheck-core) version src patches;
+
+  duneVersion = "3";
 
   propagatedBuildInputs = [ qcheck-core alcotest ];
 
diff --git a/pkgs/development/ocaml-modules/qcheck/bytes.patch b/pkgs/development/ocaml-modules/qcheck/bytes.patch
new file mode 100644
index 000000000000..7e5e5f2efedc
--- /dev/null
+++ b/pkgs/development/ocaml-modules/qcheck/bytes.patch
@@ -0,0 +1,36 @@
+diff --git a/src/alcotest/dune b/src/alcotest/dune
+index 220a8b3..df1ffe0 100644
+--- a/src/alcotest/dune
++++ b/src/alcotest/dune
+@@ -3,6 +3,6 @@
+   (name qcheck_alcotest)
+   (public_name qcheck-alcotest)
+   (wrapped false)
+-  (libraries unix bytes qcheck-core qcheck-core.runner alcotest)
++  (libraries unix qcheck-core qcheck-core.runner alcotest)
+   (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
+   )
+diff --git a/src/core/dune b/src/core/dune
+index ad0939f..42dc8ac 100644
+--- a/src/core/dune
++++ b/src/core/dune
+@@ -3,6 +3,6 @@
+   (name qcheck_core)
+   (public_name qcheck-core)
+   (wrapped false)
+-  (libraries unix bytes)
++  (libraries unix)
+   (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
+   )
+diff --git a/src/ounit/dune b/src/ounit/dune
+index 2fadb7a..41f8d4b 100644
+--- a/src/ounit/dune
++++ b/src/ounit/dune
+@@ -3,6 +3,6 @@
+   (name qcheck_ounit)
+   (public_name qcheck-ounit)
+   (wrapped false)
+-  (libraries unix bytes qcheck-core qcheck-core.runner ounit2)
++  (libraries unix qcheck-core qcheck-core.runner ounit2)
+   (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
+   )
diff --git a/pkgs/development/ocaml-modules/qcheck/core.nix b/pkgs/development/ocaml-modules/qcheck/core.nix
index f61cba0639ec..cc24d0711b28 100644
--- a/pkgs/development/ocaml-modules/qcheck/core.nix
+++ b/pkgs/development/ocaml-modules/qcheck/core.nix
@@ -5,6 +5,7 @@ buildDunePackage rec {
   version = "0.20";
 
   minimalOCamlVersion = "4.08";
+  duneVersion = "3";
 
   src = fetchFromGitHub {
     owner = "c-cube";
@@ -13,6 +14,8 @@ buildDunePackage rec {
     sha256 = "sha256-d3gleiaPEDJTbHtieL4oAq1NlA/0NtzdW9SA1sItFeQ=";
   };
 
+  patches = [ ./bytes.patch ];
+
   meta = {
     description = "Core qcheck library";
     homepage = "https://c-cube.github.io/qcheck/";
diff --git a/pkgs/development/ocaml-modules/qcheck/default.nix b/pkgs/development/ocaml-modules/qcheck/default.nix
index 2a0e6c0ae40c..7189c2fb3461 100644
--- a/pkgs/development/ocaml-modules/qcheck/default.nix
+++ b/pkgs/development/ocaml-modules/qcheck/default.nix
@@ -3,7 +3,9 @@
 buildDunePackage {
   pname = "qcheck";
 
-  inherit (qcheck-ounit) version src;
+  inherit (qcheck-ounit) version src patches;
+
+  duneVersion = "3";
 
   propagatedBuildInputs = [ qcheck-ounit ];
 
diff --git a/pkgs/development/ocaml-modules/qcheck/ounit.nix b/pkgs/development/ocaml-modules/qcheck/ounit.nix
index 06897987a954..aef47005a27a 100644
--- a/pkgs/development/ocaml-modules/qcheck/ounit.nix
+++ b/pkgs/development/ocaml-modules/qcheck/ounit.nix
@@ -3,7 +3,9 @@
 buildDunePackage {
   pname = "qcheck-ounit";
 
-  inherit (qcheck-core) version src;
+  inherit (qcheck-core) version src patches;
+
+  duneVersion = "3";
 
   propagatedBuildInputs = [ qcheck-core ounit ];