diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix index 5e04b4258bbe..a1a716451f9d 100644 --- a/pkgs/development/ocaml-modules/caqti/default.nix +++ b/pkgs/development/ocaml-modules/caqti/default.nix @@ -12,6 +12,8 @@ mtime, ptime, uri, + stdenv, + darwin, }: buildDunePackage rec { @@ -38,6 +40,8 @@ buildDunePackage rec { uri ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ]; + # Checks depend on caqti-driver-sqlite3 (circural dependency) doCheck = false; diff --git a/pkgs/development/ocaml-modules/dream/default.nix b/pkgs/development/ocaml-modules/dream/default.nix index d35993507938..f7ca3b73e406 100644 --- a/pkgs/development/ocaml-modules/dream/default.nix +++ b/pkgs/development/ocaml-modules/dream/default.nix @@ -1,5 +1,4 @@ { - lib, buildDunePackage, dream-pure, lwt_ppx, @@ -18,14 +17,39 @@ markup, mirage-clock, mirage-crypto-rng, - mirage-crypto-rng-lwt, multipart_form-lwt, ssl, unstrctrd, uri, yojson, + # for mirage-crypro-rng-lwt 1.2.0 + # It is removed from mirage-crypto 2.1.0 now. + fetchurl, + duration, + logs, + mtime, + lwt, }: +let + mirage-crypto-rng-lwt = buildDunePackage rec { + pname = "mirage-crypto-rng-lwt"; + version = "1.2.0"; + src = fetchurl { + url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz"; + hash = "sha256-CVQrzZbB02j/m6iFMQX0wXgdjJTCQA3586wGEO4H5n4="; + }; + doCheck = true; + propagatedBuildInputs = [ + mirage-crypto-rng + duration + logs + mtime + lwt + ]; + }; +in + buildDunePackage { pname = "dream"; diff --git a/pkgs/development/ocaml-modules/dream/httpaf.nix b/pkgs/development/ocaml-modules/dream/httpaf.nix index 6ba186bceb7a..0b4d8dce6103 100644 --- a/pkgs/development/ocaml-modules/dream/httpaf.nix +++ b/pkgs/development/ocaml-modules/dream/httpaf.nix @@ -1,5 +1,4 @@ { - lib, buildDunePackage, dream-pure, lwt_ppx, diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index 99c71786d448..a78531277f65 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -14,11 +14,11 @@ buildDunePackage rec { minimalOCamlVersion = "4.13"; pname = "mirage-crypto"; - version = "1.2.0"; + version = "2.0.1"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz"; - hash = "sha256-CVQrzZbB02j/m6iFMQX0wXgdjJTCQA3586wGEO4H5n4="; + hash = "sha256-VDDOPD5AYn0tZ6jez1ZaH2EtOb2zP5t2fDvbYB/1oZY="; }; doCheck = true; @@ -36,14 +36,18 @@ buildDunePackage rec { ocaml-freestanding ]; - meta = with lib; { + meta = { homepage = "https://github.com/mirage/mirage-crypto"; description = "Simple symmetric cryptography for the modern age"; - license = [ - licenses.isc # default license - licenses.bsd2 # mirage-crypto-rng-mirage - licenses.mit # mirage-crypto-ec + changelog = "https://raw.githubusercontent.com/mirage/mirage-crypto/refs/tags/v${version}/CHANGES.md"; + license = with lib.licenses; [ + isc # default license + bsd2 # mirage-crypto-rng-mirage + mit # mirage-crypto-ec + ]; + maintainers = with lib.maintainers; [ + sternenseemann + momeemt ]; - maintainers = with maintainers; [ sternenseemann ]; }; } diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix deleted file mode 100644 index b5d5acc232ac..000000000000 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - buildDunePackage, - mirage-crypto, - mirage-crypto-rng, - dune-configurator, - async, - logs, - ohex, -}: - -buildDunePackage { - pname = "mirage-crypto-rng-async"; - - inherit (mirage-crypto) version src; - - buildInputs = [ - dune-configurator - ]; - - propagatedBuildInputs = [ - async - logs - mirage-crypto - mirage-crypto-rng - ]; - - doCheck = true; - checkInputs = [ ohex ]; - - meta = mirage-crypto.meta // { - description = "Feed the entropy source in an Async-friendly way"; - }; -} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-eio.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-eio.nix deleted file mode 100644 index c36dd79745ce..000000000000 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-eio.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - buildDunePackage, - mirage-crypto-rng, - eio, - eio_main, - ohex, -}: - -buildDunePackage { - pname = "mirage-crypto-rng-eio"; - - inherit (mirage-crypto-rng) version src; - - doCheck = true; - checkInputs = [ - eio_main - ohex - ]; - - propagatedBuildInputs = [ - mirage-crypto-rng - eio - ]; - - meta = mirage-crypto-rng.meta; -} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-lwt.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-lwt.nix deleted file mode 100644 index d36595708a9d..000000000000 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-lwt.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - buildDunePackage, - mirage-crypto-rng, - duration, - logs, - mtime, - lwt, -}: - -buildDunePackage { - pname = "mirage-crypto-rng-lwt"; - - inherit (mirage-crypto-rng) version src; - - doCheck = true; - - propagatedBuildInputs = [ - mirage-crypto-rng - duration - logs - mtime - lwt - ]; - - meta = mirage-crypto-rng.meta; -} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-miou-unix.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-miou-unix.nix new file mode 100644 index 000000000000..ec4d18a9597f --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-miou-unix.nix @@ -0,0 +1,39 @@ +{ + buildDunePackage, + mirage-crypto-rng, + miou, + logs, + duration, + mtime, + digestif, + ohex, +}: + +buildDunePackage { + pname = "mirage-crypto-rng-miou-unix"; + + inherit (mirage-crypto-rng) version src; + + doCheck = true; + checkInputs = [ + + ]; + + propagatedBuildInputs = [ + miou + logs + mirage-crypto-rng + duration + mtime + digestif + ohex + ]; + + meta = mirage-crypto-rng.meta // { + description = "Feed the entropy source in an miou.unix-friendly way"; + longDescription = '' + Mirage-crypto-rng-miou-unix feeds the entropy source for Mirage_crypto_rng-based + random number generator implementations, in an miou.unix-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 8265808c5732..b974a6adc0f7 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix @@ -3,8 +3,8 @@ mirage-crypto-rng, duration, mirage-runtime, - mirage-time, - mirage-clock, + mirage-mtime, + mirage-sleep, mirage-unix, mirage-time-unix, mirage-clock-unix, @@ -30,8 +30,8 @@ buildDunePackage { duration mirage-crypto-rng mirage-runtime - mirage-time - mirage-clock + mirage-mtime + mirage-sleep logs lwt ]; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 5cbe2995ad1b..506c88df82cd 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1308,16 +1308,14 @@ 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-eio = callPackage ../development/ocaml-modules/mirage-crypto/rng-eio.nix { }; - - mirage-crypto-rng-lwt = callPackage ../development/ocaml-modules/mirage-crypto/rng-lwt.nix { }; - mirage-crypto-rng-mirage = callPackage ../development/ocaml-modules/mirage-crypto/rng-mirage.nix { }; + mirage-crypto-rng-miou-unix = + callPackage ../development/ocaml-modules/mirage-crypto/rng-miou-unix.nix + { }; + mirage-device = callPackage ../development/ocaml-modules/mirage-device { }; mirage-flow = callPackage ../development/ocaml-modules/mirage-flow { };