diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index f78ed2ef77f..d778a7eb487 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.7.0"; + version = "0.8.0"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz"; - sha256 = "0k7kllv3bh192yj6p9dk2z81r56w7x2kyr46pxygb5gnhqqxcncf"; + sha256 = "1wb2923v17z179v866ragil0r601w5b3kvpnbkmkwlijp4i5grih"; }; useDune2 = true; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix new file mode 100644 index 00000000000..473704d7ea2 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, mirage-crypto-rng, duration, cstruct, mirage-runtime +, mirage-time, mirage-clock, mirage-unix, mirage-time-unix, mirage-clock-unix }: + +buildDunePackage { + pname = "mirage-crypto-rng-mirage"; + + inherit (mirage-crypto-rng) version src useDune2 minimumOCamlVersion; + + doCheck = true; + checkInputs = [ mirage-unix mirage-clock-unix mirage-time-unix ]; + + propagatedBuildInputs = [ duration cstruct mirage-crypto-rng mirage-runtime + mirage-time mirage-clock ]; + + meta = mirage-crypto-rng.meta // { + description = "Entropy collection for a cryptographically secure PRNG"; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix index 3a12580f89f..b4da0681635 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix @@ -1,6 +1,5 @@ { buildDunePackage, mirage-crypto, ounit, randomconv, dune-configurator -, cstruct, duration, logs, mtime, ocaml_lwt, mirage-runtime, mirage-time -, mirage-clock, mirage-time-unix, mirage-clock-unix, mirage-unix }: +, cstruct, duration, logs, mtime, ocaml_lwt }: buildDunePackage { pname = "mirage-crypto-rng"; @@ -11,9 +10,7 @@ buildDunePackage { checkInputs = [ ounit randomconv ]; nativeBuildInputs = [ dune-configurator ]; - propagatedBuildInputs = [ cstruct mirage-crypto duration logs mtime ocaml_lwt - mirage-runtime mirage-time mirage-clock mirage-time-unix - mirage-clock-unix mirage-unix ]; + propagatedBuildInputs = [ cstruct mirage-crypto duration logs mtime ocaml_lwt ]; meta = mirage-crypto.meta // { description = "A cryptographically secure PRNG"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5ee24287dd6..d5d7a81a087 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -531,6 +531,8 @@ let mirage-crypto-rng = callPackage ../development/ocaml-modules/mirage-crypto/rng.nix { }; + mirage-crypto-rng-mirage = callPackage ../development/ocaml-modules/mirage-crypto/rng-mirage.nix { }; + mirage-device = callPackage ../development/ocaml-modules/mirage-device { }; mirage-flow = callPackage ../development/ocaml-modules/mirage-flow { };