summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/bls12-381/default.nix
blob: a31660575fe155cf329d44688dfc4b3836337d56 (plain)
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
{
  lib,
  buildDunePackage,
  fetchFromGitLab,
  zarith,
  zarith_stubs_js ? null,
  integers_stubs_js,
  integers,
  hex,
  alcotest,
}:

buildDunePackage (finalAttrs: {
  pname = "bls12-381";
  version = "6.1.0";
  src = fetchFromGitLab {
    owner = "nomadic-labs";
    repo = "cryptography/ocaml-bls12-381";
    rev = finalAttrs.version;
    hash = "sha256-z2ZSOrXgm+XjdrY91vqxXSKhA0DyJz6JkkNljDZznX8=";
  };

  minimalOCamlVersion = "4.08";

  postPatch = ''
    patchShebangs ./src/*.sh
  '';

  propagatedBuildInputs = [
    zarith
    zarith_stubs_js
    integers_stubs_js
    hex
    integers
  ];

  checkInputs = [
    alcotest
  ];

  doCheck = true;

  meta = {
    homepage = "https://nomadic-labs.gitlab.io/cryptography/ocaml-bls12-381/bls12-381/";
    description = "Implementation of BLS12-381 and some cryptographic primitives built on top of it";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.ulrikstrid ];
  };
})