diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/ocaml-modules/mirage-crypto | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/ocaml-modules/mirage-crypto')
4 files changed, 100 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index 71c044a8cc1..b35d7cc910c 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -1,14 +1,17 @@ -{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, pkg-config }: +{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, bigarray-compat, pkg-config +, withFreestanding ? false +, ocaml-freestanding +}: buildDunePackage rec { minimumOCamlVersion = "4.08"; pname = "mirage-crypto"; - version = "0.8.4"; + version = "0.10.2"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz"; - sha256 = "1w09wllls4rp1abq0awffxf69dn0xciy6hsqz413ing5r151wjxr"; + sha256 = "96c4826fa3532c9d2ba21cd5fa25df003be3df20b2cc01068b60d59e0222d906"; }; useDune2 = true; @@ -17,12 +20,20 @@ buildDunePackage rec { checkInputs = [ ounit ]; nativeBuildInputs = [ dune-configurator pkg-config ]; - propagatedBuildInputs = [ cstruct eqaf ]; + propagatedBuildInputs = [ + cstruct eqaf bigarray-compat + ] ++ lib.optionals withFreestanding [ + ocaml-freestanding + ]; meta = with lib; { homepage = "https://github.com/mirage/mirage-crypto"; description = "Simple symmetric cryptography for the modern age"; - license = licenses.isc; + license = [ + licenses.isc # default license + licenses.bsd2 # mirage-crypto-rng-mirage + licenses.mit # mirage-crypto-ec + ]; maintainers = with maintainers; [ sternenseemann ]; }; } diff --git a/pkgs/development/ocaml-modules/mirage-crypto/ec.nix b/pkgs/development/ocaml-modules/mirage-crypto/ec.nix new file mode 100644 index 00000000000..bcd7a1f04f2 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-crypto/ec.nix @@ -0,0 +1,55 @@ +{ lib +, buildDunePackage +, mirage-crypto +, dune-configurator +, pkg-config +, cstruct +, mirage-crypto-rng +, mirage-crypto-pk +, hex +, alcotest +, asn1-combinators +, ppx_deriving_yojson +, ppx_deriving +, yojson +, withFreestanding ? false +, ocaml-freestanding +}: + +buildDunePackage { + pname = "mirage-crypto-ec"; + + inherit (mirage-crypto) + minimumOCamlVersion + src + version + useDune2 + ; + + nativeBuildInputs = [ + pkg-config + dune-configurator + ]; + propagatedBuildInputs = [ + cstruct + mirage-crypto + mirage-crypto-rng + ] ++ lib.optionals withFreestanding [ + ocaml-freestanding + ]; + + doCheck = true; + checkInputs = [ + hex + alcotest + asn1-combinators + ppx_deriving_yojson + ppx_deriving + yojson + mirage-crypto-pk + ]; + + meta = mirage-crypto.meta // { + description = "Elliptic Curve Cryptography with primitives taken from Fiat"; + }; +} 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 00000000000..e8c8dd06eab --- /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 473704d7ea2..5152d3c8ecd 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"; |