about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/ec.nix
blob: bcd7a1f04f25e5c5868526cba345076031fe1f46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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";
  };
}