about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/awa/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/eqaf/cstruct.nix9
-rw-r--r--pkgs/development/ocaml-modules/eqaf/default.nix9
-rw-r--r--pkgs/development/ocaml-modules/mirage-crypto/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/mirage-crypto/pk.nix8
-rw-r--r--pkgs/development/ocaml-modules/yojson/default.nix4
6 files changed, 32 insertions, 16 deletions
diff --git a/pkgs/development/ocaml-modules/awa/default.nix b/pkgs/development/ocaml-modules/awa/default.nix
index 559b4fe62c4c2..6a4ed92cc079a 100644
--- a/pkgs/development/ocaml-modules/awa/default.nix
+++ b/pkgs/development/ocaml-modules/awa/default.nix
@@ -1,7 +1,7 @@
 { lib, buildDunePackage, fetchurl
 , ppx_sexp_conv
 , mirage-crypto, mirage-crypto-ec, mirage-crypto-rng, mirage-crypto-pk
-, x509, cstruct, cstruct-unix, cstruct-sexp, sexplib, eqaf
+, x509, cstruct, cstruct-unix, cstruct-sexp, sexplib, eqaf-cstruct
 , rresult, mtime, logs, fmt, cmdliner, base64
 , zarith
 }:
@@ -17,11 +17,15 @@ buildDunePackage rec {
     hash = "sha256-VejHFn07B/zoEG4LjLaen24ig9kAXtERl/pRo6UZCQk=";
   };
 
+  postPatch = ''
+    substituteInPlace lib/dune --replace-warn eqaf.cstruct eqaf-cstruct
+  '';
+
   propagatedBuildInputs = [
     mirage-crypto mirage-crypto-ec mirage-crypto-rng mirage-crypto-pk x509
     cstruct cstruct-sexp sexplib mtime
     logs base64 zarith
-    ppx_sexp_conv eqaf
+    ppx_sexp_conv eqaf-cstruct
   ];
 
   doCheck = true;
diff --git a/pkgs/development/ocaml-modules/eqaf/cstruct.nix b/pkgs/development/ocaml-modules/eqaf/cstruct.nix
new file mode 100644
index 0000000000000..b5f2f6e666831
--- /dev/null
+++ b/pkgs/development/ocaml-modules/eqaf/cstruct.nix
@@ -0,0 +1,9 @@
+{ buildDunePackage, eqaf, cstruct }:
+
+buildDunePackage {
+  pname = "eqaf-cstruct";
+
+  inherit (eqaf) src version meta;
+
+  propagatedBuildInputs = [ cstruct eqaf ];
+}
diff --git a/pkgs/development/ocaml-modules/eqaf/default.nix b/pkgs/development/ocaml-modules/eqaf/default.nix
index d777755253c27..9b5dadb7b710b 100644
--- a/pkgs/development/ocaml-modules/eqaf/default.nix
+++ b/pkgs/development/ocaml-modules/eqaf/default.nix
@@ -1,18 +1,15 @@
-{ lib, fetchurl, buildDunePackage, cstruct }:
+{ lib, fetchurl, buildDunePackage }:
 
 buildDunePackage rec {
   minimalOCamlVersion = "4.07";
-  duneVersion = "3";
   pname = "eqaf";
-  version = "0.9";
+  version = "0.10";
 
   src = fetchurl {
     url = "https://github.com/mirage/eqaf/releases/download/v${version}/eqaf-${version}.tbz";
-    hash = "sha256-7A4oqUasaBf5XVhU8FqZYa46hAi7YQ55z60BubJV3+A=";
+    hash = "sha256-Z9E2nFfE0tFKENAmMtReNVIkq+uYrsCJecC65YQwku4=";
   };
 
-  propagatedBuildInputs = [ cstruct ];
-
   meta = {
     description = "Constant time equal function to avoid timing attacks in OCaml";
     homepage = "https://github.com/mirage/eqaf";
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
index 74e9a455bebe6..7057d89806524 100644
--- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix
+++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
@@ -1,11 +1,10 @@
-{ lib, fetchurl, buildDunePackage, ounit2, cstruct, dune-configurator, eqaf, pkg-config
+{ lib, fetchurl, buildDunePackage, ounit2, dune-configurator, eqaf-cstruct, pkg-config
 , withFreestanding ? false
 , ocaml-freestanding
 }:
 
 buildDunePackage rec {
   minimalOCamlVersion = "4.08";
-  duneVersion = "3";
 
   pname = "mirage-crypto";
   version = "0.11.3";
@@ -21,11 +20,16 @@ buildDunePackage rec {
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ dune-configurator  ];
   propagatedBuildInputs = [
-    cstruct eqaf
+    eqaf-cstruct
   ] ++ lib.optionals withFreestanding [
     ocaml-freestanding
   ];
 
+  # Compatibility with eqaf 0.10
+  postPatch = ''
+    substituteInPlace src/dune --replace-warn eqaf.cstruct eqaf-cstruct
+  '';
+
   meta = with lib; {
     homepage = "https://github.com/mirage/mirage-crypto";
     description = "Simple symmetric cryptography for the modern age";
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/pk.nix b/pkgs/development/ocaml-modules/mirage-crypto/pk.nix
index e50838e50bbb8..11f09dfd5161e 100644
--- a/pkgs/development/ocaml-modules/mirage-crypto/pk.nix
+++ b/pkgs/development/ocaml-modules/mirage-crypto/pk.nix
@@ -1,16 +1,18 @@
 { buildDunePackage, ounit2, randomconv, mirage-crypto, mirage-crypto-rng
-, cstruct, sexplib0, zarith, eqaf, gmp }:
+, cstruct, sexplib0, zarith, eqaf-cstruct, gmp }:
 
 buildDunePackage rec {
   pname = "mirage-crypto-pk";
 
   inherit (mirage-crypto) version src;
 
-  duneVersion = "3";
+  postPatch = ''
+    substituteInPlace pk/dune --replace-warn eqaf.cstruct eqaf-cstruct
+  '';
 
   buildInputs = [ gmp ];
   propagatedBuildInputs = [ cstruct mirage-crypto mirage-crypto-rng
-                            zarith eqaf sexplib0 ];
+                            zarith eqaf-cstruct sexplib0 ];
 
   doCheck = true;
   checkInputs = [ ounit2 randomconv ];
diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix
index ec5c86036ad27..ddf8ca5f6d63b 100644
--- a/pkgs/development/ocaml-modules/yojson/default.nix
+++ b/pkgs/development/ocaml-modules/yojson/default.nix
@@ -2,11 +2,11 @@
 
 buildDunePackage rec {
   pname = "yojson";
-  version = "2.2.0";
+  version = "2.2.1";
 
   src = fetchurl {
     url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
-    hash = "sha256-v9wzvvMUG7qaj6ZqiFtUsp9r+rRQBAiE3Yz3zex4RRk=";
+    hash = "sha256-zTwdlPaViZoCbf9yaWmJvbENwWMpNLucvm9FmNSvptQ=";
   };
 
   propagatedBuildInputs = [ seq ];