diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index f963e8e15d08..c2ede31dd3f1 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -4,11 +4,11 @@ buildDunePackage rec { minimumOCamlVersion = "4.08"; pname = "mirage-crypto"; - version = "0.8.7"; + version = "0.8.8"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz"; - sha256 = "1gx86h6kk39zq3kvl854jc2ap2755paalp1f7iv8r9js2xnbxfxy"; + sha256 = "19czylfyakckfzzcbqgv9ygl243wix7ak8zkbdcb9hcl2k2shswb"; }; useDune2 = true; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix new file mode 100644 index 000000000000..e8c8dd06eab5 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage +, mirage-crypto, mirage-crypto-rng +, dune-configurator, async, logs +}: + +buildDunePackage { + pname = "mirage-crypto-rng-async"; + + inherit (mirage-crypto) useDune2 version minimumOCamlVersion src; + + nativeBuildInputs = [ + dune-configurator + ]; + + propagatedBuildInputs = [ + async + logs + mirage-crypto + mirage-crypto-rng + ]; + + meta = mirage-crypto.meta // { + description = "Feed the entropy source in an Async-friendly way"; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix index 473704d7ea22..5152d3c8ecde 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix @@ -1,5 +1,7 @@ { buildDunePackage, mirage-crypto-rng, duration, cstruct, mirage-runtime -, mirage-time, mirage-clock, mirage-unix, mirage-time-unix, mirage-clock-unix }: +, mirage-time, mirage-clock, mirage-unix, mirage-time-unix, mirage-clock-unix +, logs, lwt +}: buildDunePackage { pname = "mirage-crypto-rng-mirage"; @@ -10,7 +12,7 @@ buildDunePackage { checkInputs = [ mirage-unix mirage-clock-unix mirage-time-unix ]; propagatedBuildInputs = [ duration cstruct mirage-crypto-rng mirage-runtime - mirage-time mirage-clock ]; + mirage-time mirage-clock logs lwt ]; meta = mirage-crypto-rng.meta // { description = "Entropy collection for a cryptographically secure PRNG"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e5d0f60ee5d0..54335c3f14e0 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -601,6 +601,8 @@ let mirage-crypto-rng = callPackage ../development/ocaml-modules/mirage-crypto/rng.nix { }; + mirage-crypto-rng-async = callPackage ../development/ocaml-modules/mirage-crypto/rng-async.nix { }; + mirage-crypto-rng-mirage = callPackage ../development/ocaml-modules/mirage-crypto/rng-mirage.nix { }; mirage-device = callPackage ../development/ocaml-modules/mirage-device { };